aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2011-05-06 18:12:11 -0700
committerPatrick Walton <[email protected]>2011-05-06 18:13:22 -0700
commitca1b1666e09af0f56b8c8ff2fc31d022b44ca90c (patch)
tree585c18cb390577a493eb33bc2456d268e08a5222 /src
parentFailure to re-stage changes strikes again. (diff)
downloadrust-ca1b1666e09af0f56b8c8ff2fc31d022b44ca90c.tar.xz
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')
-rw-r--r--src/rustllvm/Passes2.cpp11
-rw-r--r--src/rustllvm/rustllvm.def.in1
2 files changed, 9 insertions, 3 deletions
diff --git a/src/rustllvm/Passes2.cpp b/src/rustllvm/Passes2.cpp
index a0a6a20c..c4ead0de 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);
diff --git a/src/rustllvm/rustllvm.def.in b/src/rustllvm/rustllvm.def.in
index e52f2908..69e79210 100644
--- a/src/rustllvm/rustllvm.def.in
+++ b/src/rustllvm/rustllvm.def.in
@@ -68,6 +68,7 @@ LLVMAddScalarReplAggregatesPass
LLVMAddScalarReplAggregatesPassSSA
LLVMAddScalarReplAggregatesPassWithThreshold
LLVMAddSimplifyLibCallsPass
+LLVMAddStandardFunctionPasses
LLVMAddStandardModulePasses
LLVMAddStripDeadPrototypesPass
LLVMAddStripSymbolsPass