diff options
author | Manman Ren <mren@apple.com> | 2013-02-09 00:41:44 +0000 |
---|---|---|
committer | Manman Ren <mren@apple.com> | 2013-02-09 00:41:44 +0000 |
commit | d2c95eb995e92ccbe07b10f0741408ea3553c6b1 (patch) | |
tree | 6eb49962b3515865ac57236e9d4022f3d07f572b /llvm/lib | |
parent | eba9e4a3aaaf280d76db0e8eb4af80f374a3a04e (diff) | |
download | bcm5719-llvm-d2c95eb995e92ccbe07b10f0741408ea3553c6b1.tar.gz bcm5719-llvm-d2c95eb995e92ccbe07b10f0741408ea3553c6b1.zip |
Dwarf: do not use line_table_start in at_stmt_list since we do not always emit
line table entries in assembly.
llvm-svn: 174785
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 5d19a8d765e..6d3759d19a7 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -670,9 +670,12 @@ CompileUnit *DwarfDebug::constructCompileUnit(const MDNode *N) { // DW_AT_stmt_list is a offset of line number information for this // compile unit in debug_line section. + // The line table entries are not always emitted in assembly, so it + // is not okay to use line_table_start here. if (Asm->MAI->doesDwarfUseRelocationsAcrossSections()) NewCU->addLabel(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4, - LineTableStartSym); + NewCU->getUniqueID() == 0 ? + Asm->GetTempSymbol("section_line") : LineTableStartSym); else if (NewCU->getUniqueID() == 0) NewCU->addUInt(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4, 0); else |