diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2011-05-06 18:12:11 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2011-05-06 18:13:22 -0700 |
| commit | ca1b1666e09af0f56b8c8ff2fc31d022b44ca90c (patch) | |
| tree | 585c18cb390577a493eb33bc2456d268e08a5222 /src/rustllvm/Passes2.cpp | |
| parent | 10a2093d37bcf13f375a7c3637f4c227b7a21b0c (diff) | |
| download | rust-ca1b1666e09af0f56b8c8ff2fc31d022b44ca90c.tar.gz rust-ca1b1666e09af0f56b8c8ff2fc31d022b44ca90c.zip | |
rustllvm: Add a function to add the standard function passes to a module; change uses of bool in LLVMAddStandardModulePasses() to LLVMBool
Diffstat (limited to 'src/rustllvm/Passes2.cpp')
| -rw-r--r-- | src/rustllvm/Passes2.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/rustllvm/Passes2.cpp b/src/rustllvm/Passes2.cpp index a0a6a20c5c4..c4ead0de5aa 100644 --- a/src/rustllvm/Passes2.cpp +++ b/src/rustllvm/Passes2.cpp @@ -6,10 +6,15 @@ using namespace llvm; +extern "C" void LLVMAddStandardFunctionPasses(LLVMPassManagerRef PM, + unsigned int OptimizationLevel) { + createStandardFunctionPasses(unwrap(PM), OptimizationLevel); +} + extern "C" void LLVMAddStandardModulePasses(LLVMPassManagerRef PM, - unsigned int OptimizationLevel, bool OptimizeSize, bool UnitAtATime, - bool UnrollLoops, bool SimplifyLibCalls, bool HaveExceptions, - unsigned int InliningThreshold) { + unsigned int OptimizationLevel, LLVMBool OptimizeSize, + LLVMBool UnitAtATime, LLVMBool UnrollLoops, LLVMBool SimplifyLibCalls, + LLVMBool HaveExceptions, unsigned int InliningThreshold) { Pass *InliningPass; if (InliningThreshold) InliningPass = createFunctionInliningPass(InliningThreshold); |
