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