# HG changeset patch # User Christian Kamm # Date 1240762867 -7200 # Node ID 17d4d554300aedfc698bfdcb5a5e6c2ae4318f1d # Parent bbe6d2b878426d5dafe6ccdd21772e12aeb6b647 Force 'fast' compilation when debug info is requested. LLVM trunk seems to skip debug info for non-fast compilation. diff -r bbe6d2b87842 -r 17d4d554300a gen/toobj.cpp --- 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);