aboutsummaryrefslogtreecommitdiff
path: root/src/comp/lib
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2011-03-25 18:44:52 -0700
committerGraydon Hoare <[email protected]>2011-03-25 18:45:00 -0700
commit027368b885848377a0025ced2734cabf5ff201e1 (patch)
tree312d2a76d7a8e02686f5b6a81678ee07b8a869cd /src/comp/lib
parentTweak rustllvm bindings to work on linux, where bool != LLVMBool. (diff)
downloadrust-027368b885848377a0025ced2734cabf5ff201e1.tar.xz
rust-027368b885848377a0025ced2734cabf5ff201e1.zip
Janitorial: move llvmext back to llvm module, as they're the same thing now.
Diffstat (limited to 'src/comp/lib')
-rw-r--r--src/comp/lib/llvm.rs22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/comp/lib/llvm.rs b/src/comp/lib/llvm.rs
index 73881fd9..6c1e5042 100644
--- a/src/comp/lib/llvm.rs
+++ b/src/comp/lib/llvm.rs
@@ -22,8 +22,8 @@ import llvm.CallConv;
import llvm.IntPredicate;
import llvm.RealPredicate;
import llvm.Opcode;
-import llvmext.ObjectFileRef;
-import llvmext.SectionIteratorRef;
+import llvm.ObjectFileRef;
+import llvm.SectionIteratorRef;
type ULongLong = u64;
type LongLong = i64;
@@ -740,9 +740,10 @@ native mod llvm = llvm_lib {
/** Destroys a memory buffer. */
fn LLVMDisposeMemoryBuffer(MemoryBufferRef MemBuf);
-}
-native mod llvmext = llvm_lib {
+
+ /* Stuff that's in rustllvm/ because it's not upstream yet. */
+
type ObjectFileRef;
type SectionIteratorRef;
@@ -777,6 +778,11 @@ native mod llvmext = llvm_lib {
/** Returns a string describing the last error caused by an LLVMRust*
call. */
fn LLVMRustGetLastError() -> sbuf;
+
+
+}
+
+native mod rustllvm = llvm_lib {
}
/* Slightly more terse object-interface to LLVM's 'builder' functions. */
@@ -1384,26 +1390,26 @@ fn mk_pass_manager() -> pass_manager {
/* Memory-managed interface to object files. */
obj object_file_dtor(ObjectFileRef ObjectFile) {
- drop { llvmext.LLVMDisposeObjectFile(ObjectFile); }
+ drop { llvm.LLVMDisposeObjectFile(ObjectFile); }
}
type object_file = rec(ObjectFileRef llof, object_file_dtor dtor);
fn mk_object_file(MemoryBufferRef llmb) -> object_file {
- auto llof = llvmext.LLVMCreateObjectFile(llmb);
+ auto llof = llvm.LLVMCreateObjectFile(llmb);
ret rec(llof=llof, dtor=object_file_dtor(llof));
}
/* Memory-managed interface to section iterators. */
obj section_iter_dtor(SectionIteratorRef SI) {
- drop { llvmext.LLVMDisposeSectionIterator(SI); }
+ drop { llvm.LLVMDisposeSectionIterator(SI); }
}
type section_iter = rec(SectionIteratorRef llsi, section_iter_dtor dtor);
fn mk_section_iter(ObjectFileRef llof) -> section_iter {
- auto llsi = llvmext.LLVMGetSections(llof);
+ auto llsi = llvm.LLVMGetSections(llof);
ret rec(llsi=llsi, dtor=section_iter_dtor(llsi));
}