From bc879a4e1e72295ad46a482f7abadc41005340e3 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 6 May 2011 18:56:11 -0700 Subject: rustc: Replace our homebrew list of passes with the standard function and module passes, along with the TargetData passes. --- src/comp/lib/llvm.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/comp/lib') diff --git a/src/comp/lib/llvm.rs b/src/comp/lib/llvm.rs index 80b216e6..c4114261 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, -- cgit v1.2.3