Force 'fast' compilation when debug info is requested. LLVM trunk seems to

skip debug info for non-fast compilation.
This commit is contained in:
Christian Kamm
2009-04-26 18:21:07 +02:00
parent 5b71e2ef81
commit 17dbddfe41

View File

@@ -269,8 +269,8 @@ void write_asm_to_file(llvm::TargetMachine &Target, llvm::Module& m, llvm::raw_f
// 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);