about summary refs log tree commit diff
path: root/src/comp/lib/llvm.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2011-05-06 18:56:11 -0700
committerPatrick Walton <pcwalton@mimiga.net>2011-05-09 11:44:47 -0700
commitbc879a4e1e72295ad46a482f7abadc41005340e3 (patch)
tree3ff0f6136012e2953bc9993bb60d822ab9a73e3f /src/comp/lib/llvm.rs
parentd97c5d97de5858cd287f4e45d9ba257ad97cfe03 (diff)
downloadrust-bc879a4e1e72295ad46a482f7abadc41005340e3.tar.gz
rust-bc879a4e1e72295ad46a482f7abadc41005340e3.zip
rustc: Replace our homebrew list of passes with the standard function and module passes, along with the TargetData passes.
Diffstat (limited to 'src/comp/lib/llvm.rs')
-rw-r--r--src/comp/lib/llvm.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/comp/lib/llvm.rs b/src/comp/lib/llvm.rs
index 80b216e6146..c4114261797 100644
--- a/src/comp/lib/llvm.rs
+++ b/src/comp/lib/llvm.rs
@@ -748,6 +748,9 @@ native mod llvm = llvm_lib {
 
     /** Creates target data from a target layout string. */
     fn LLVMCreateTargetData(sbuf StringRep) -> TargetDataRef;
+    /** Adds the target data to the given pass manager. The pass manager
+        references the target data only weakly. */
+    fn LLVMAddTargetData(TargetDataRef TD, PassManagerRef PM);
     /** Returns the size of a type. FIXME: rv is actually a ULongLong! */
     fn LLVMStoreSizeOfType(TargetDataRef TD, TypeRef Ty) -> uint;
     /** Returns the alignment of a type. */
@@ -802,7 +805,8 @@ native mod llvm = llvm_lib {
     fn LLVMAddTypeBasedAliasAnalysisPass(PassManagerRef PM);
     fn LLVMAddBasicAliasAnalysisPass(PassManagerRef PM);
 
-    // FIXME: Native stubs don't allow this many arguments yet.
+    fn LLVMAddStandardFunctionPasses(PassManagerRef PM,
+                                     uint OptimizationLevel);
     fn LLVMAddStandardModulePasses(PassManagerRef PM,
                                    uint OptimizationLevel,
                                    Bool OptimizeSize,