Skip to content

Commit

Permalink
rustllvm: Add a function to add the standard function passes to a mod…
Browse files Browse the repository at this point in the history
…ule; change uses of bool in LLVMAddStandardModulePasses() to LLVMBool
  • Loading branch information
pcwalton committed May 7, 2011
1 parent 10a2093 commit ca1b166
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/rustllvm/Passes2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions src/rustllvm/rustllvm.def.in
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ LLVMAddScalarReplAggregatesPass
LLVMAddScalarReplAggregatesPassSSA
LLVMAddScalarReplAggregatesPassWithThreshold
LLVMAddSimplifyLibCallsPass
LLVMAddStandardFunctionPasses
LLVMAddStandardModulePasses
LLVMAddStripDeadPrototypesPass
LLVMAddStripSymbolsPass
Expand Down

0 comments on commit ca1b166

Please sign in to comment.