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; using namespace llvm;
extern "C" void LLVMAddStandardFunctionPasses(LLVMPassManagerRef PM,
unsigned int OptimizationLevel) {
createStandardFunctionPasses(unwrap(PM), OptimizationLevel);
}
extern "C" void LLVMAddStandardModulePasses(LLVMPassManagerRef PM, extern "C" void LLVMAddStandardModulePasses(LLVMPassManagerRef PM,
unsigned int OptimizationLevel, bool OptimizeSize, bool UnitAtATime, unsigned int OptimizationLevel, LLVMBool OptimizeSize,
bool UnrollLoops, bool SimplifyLibCalls, bool HaveExceptions, LLVMBool UnitAtATime, LLVMBool UnrollLoops, LLVMBool SimplifyLibCalls,
unsigned int InliningThreshold) { LLVMBool HaveExceptions, unsigned int InliningThreshold) {
Pass *InliningPass; Pass *InliningPass;
if (InliningThreshold) if (InliningThreshold)
InliningPass = createFunctionInliningPass(InliningThreshold); InliningPass = createFunctionInliningPass(InliningThreshold);

View File

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