changeset 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 bbe6d2b87842
children 381c3ee0ca00
files gen/toobj.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
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);