Mercurial > projects > ldc
diff gen/toobj.cpp @ 1266:17d4d554300a
Force 'fast' compilation when debug info is requested. LLVM trunk seems to
skip debug info for non-fast compilation.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sun, 26 Apr 2009 18:21:07 +0200 |
parents | 2a92c115461d |
children | 0686701178d3 |
line wrap: on
line diff
--- a/gen/toobj.cpp Sun Apr 26 11:29:30 2009 +0200 +++ b/gen/toobj.cpp Sun Apr 26 18:21:07 2009 +0200 @@ -269,8 +269,8 @@ // Ask the target to add backend passes as necessary. MachineCodeEmitter *MCE = 0; -//TODO: May want to switch it on for -O0? - bool Fast = false; + // debug info doesn't work properly without fast! + bool Fast = !optimize() || global.params.symdebug; FileModel::Model mod = Target.addPassesToEmitFile(Passes, out, TargetMachine::AssemblyFile, Fast); assert(mod == FileModel::AsmFile);