Attempt to recover gdb bot after r174445.

Failure: undefined symbol 'Lline_table_start0'.
Root-cause: we use a symbol subtraction to calculate at_stmt_list, but
the line table entries are not dumped in the assembly.
Fix: use zero instead of a symbol subtraction for Compile Unit 0.

llvm-svn: 174479
This commit is contained in:
Manman Ren
2013-02-06 00:59:41 +00:00
parent 434fb1f6d5
commit d2c38d684a
6 changed files with 8 additions and 6 deletions

View File

@@ -674,6 +674,8 @@ CompileUnit *DwarfDebug::constructCompileUnit(const MDNode *N) {
if (Asm->MAI->doesDwarfUseRelocationsAcrossSections())
NewCU->addLabel(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4,
LineTableStartSym);
else if (NewCU->getUniqueID() == 0)
NewCU->addUInt(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4, 0);
else
NewCU->addDelta(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4,
LineTableStartSym, Asm->GetTempSymbol("section_line"));