mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-15 12:23:13 +01:00
Fix the LLVM 3.4 build.
The disable-simplify-libcalls is gone.
This commit is contained in:
@@ -80,10 +80,12 @@ disableSimplifyDruntimeCalls("disable-simplify-drtcalls",
|
||||
cl::desc("Disable simplification of druntime calls"),
|
||||
cl::ZeroOrMore);
|
||||
|
||||
#if LDC_LLVM_VER < 304
|
||||
static cl::opt<bool>
|
||||
disableSimplifyLibCalls("disable-simplify-libcalls",
|
||||
cl::desc("Disable simplification of well-known C runtime calls"),
|
||||
cl::ZeroOrMore);
|
||||
#endif
|
||||
|
||||
static cl::opt<bool>
|
||||
disableGCToStack("disable-gc2stack",
|
||||
@@ -179,7 +181,9 @@ static void addOptimizationPasses(PassManagerBase &mpm, FunctionPassManager &fpm
|
||||
} else {
|
||||
builder.Inliner = createAlwaysInlinerPass();
|
||||
}
|
||||
#if LDC_LLVM_VER < 304
|
||||
builder.DisableSimplifyLibCalls = disableSimplifyLibCalls;
|
||||
#endif
|
||||
builder.DisableUnitAtATime = !unitAtATime;
|
||||
builder.DisableUnrollLoops = optLevel == 0;
|
||||
/* builder.Vectorize is set in ctor from command line switch */
|
||||
@@ -211,9 +215,11 @@ bool ldc_optimize_module(llvm::Module* m)
|
||||
// Add an appropriate TargetLibraryInfo pass for the module's triple.
|
||||
TargetLibraryInfo *tli = new TargetLibraryInfo(Triple(m->getTargetTriple()));
|
||||
|
||||
#if LDC_LLVM_VER < 304
|
||||
// The -disable-simplify-libcalls flag actually disables all builtin optzns.
|
||||
if (disableSimplifyLibCalls)
|
||||
tli->disableAllFunctions();
|
||||
#endif
|
||||
mpm.add(tli);
|
||||
|
||||
// Add an appropriate TargetData instance for this module.
|
||||
|
||||
Reference in New Issue
Block a user