about summary refs log tree commit diff
path: root/src/rustllvm/Passes2.cpp
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2011-05-06 18:12:11 -0700
committerPatrick Walton <pcwalton@mimiga.net>2011-05-06 18:13:22 -0700
commitca1b1666e09af0f56b8c8ff2fc31d022b44ca90c (patch)
tree585c18cb390577a493eb33bc2456d268e08a5222 /src/rustllvm/Passes2.cpp
parent10a2093d37bcf13f375a7c3637f4c227b7a21b0c (diff)
downloadrust-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.cpp11
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);