提交 ca1b1666 编写于 作者: P Patrick Walton

rustllvm: Add a function to add the standard function passes to a module;...

rustllvm: Add a function to add the standard function passes to a module; change uses of bool in LLVMAddStandardModulePasses() to LLVMBool
上级 10a2093d
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册