rustllvm: Add a function to add the standard function passes to a module; change uses of bool in LLVMAddStandardModulePasses() to LLVMBool

This commit is contained in:
Patrick Walton
2011-05-06 18:12:11 -07:00
parent 10a2093d37
commit ca1b1666e0
2 changed files with 9 additions and 3 deletions

View File

@@ -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);

View File

@@ -68,6 +68,7 @@ LLVMAddScalarReplAggregatesPass
LLVMAddScalarReplAggregatesPassSSA
LLVMAddScalarReplAggregatesPassWithThreshold
LLVMAddSimplifyLibCallsPass
LLVMAddStandardFunctionPasses
LLVMAddStandardModulePasses
LLVMAddStripDeadPrototypesPass
LLVMAddStripSymbolsPass