mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-09 12:32:33 +03:00
Now the backend wants an enum value as optimization level.
Hopefully this'll be the last change to that code...
This commit is contained in:
parent
ca39bb4f4d
commit
96108f8e7c
1 changed files with 9 additions and 1 deletions
|
@ -268,10 +268,18 @@ void write_asm_to_file(llvm::TargetMachine &Target, llvm::Module& m, llvm::raw_f
|
|||
// Last argument is bool Fast
|
||||
// debug info doesn't work properly without fast!
|
||||
bool LastArg = !optimize() || global.params.symdebug;
|
||||
#else
|
||||
#elif LLVM_REV < 70459
|
||||
// Last argument is unsigned OptLevel
|
||||
// debug info doesn't work properly with OptLevel > 0!
|
||||
unsigned LastArg = global.params.symdebug ? 0 : optLevel();
|
||||
#else
|
||||
// Last argument is enum CodeGenOpt::Level OptLevel
|
||||
// debug info doesn't work properly with OptLevel != None!
|
||||
CodeGenOpt::Level LastArg = CodeGenOpt::Default;
|
||||
if (global.params.symdebug)
|
||||
LastArg = CodeGenOpt::None;
|
||||
else if (optLevel() >= 3)
|
||||
LastArg = CodeGenOpt::Aggressive;
|
||||
#endif
|
||||
FileModel::Model mod = Target.addPassesToEmitFile(Passes, out, TargetMachine::AssemblyFile, LastArg);
|
||||
assert(mod == FileModel::AsmFile);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue