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:
@@ -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);
|
||||
|
||||
@@ -68,6 +68,7 @@ LLVMAddScalarReplAggregatesPass
|
||||
LLVMAddScalarReplAggregatesPassSSA
|
||||
LLVMAddScalarReplAggregatesPassWithThreshold
|
||||
LLVMAddSimplifyLibCallsPass
|
||||
LLVMAddStandardFunctionPasses
|
||||
LLVMAddStandardModulePasses
|
||||
LLVMAddStripDeadPrototypesPass
|
||||
LLVMAddStripSymbolsPass
|
||||
|
||||
Reference in New Issue
Block a user