diff options
author | Devang Patel <dpatel@apple.com> | 2010-03-22 23:11:36 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-03-22 23:11:36 +0000 |
commit | d22ed622b3cb1f6f022189befdd5c31a4b66217d (patch) | |
tree | ce9df0af15f3968dc2d417d9fb2515fdc726f803 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 9a7b270825000c7377228c092ee720a5485eda4b (diff) | |
download | bcm5719-llvm-d22ed622b3cb1f6f022189befdd5c31a4b66217d.tar.gz bcm5719-llvm-d22ed622b3cb1f6f022189befdd5c31a4b66217d.zip |
Emit DW_AT_low_pc and DW_AT_high_pc attributes for TAG_compile_unit.
llvm-svn: 99225
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 83cac7916b4..68402b84c2a 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1656,15 +1656,19 @@ void DwarfDebug::constructCompileUnit(MDNode *N) { unsigned ID = GetOrCreateSourceID(Dir, FN); DIE *Die = new DIE(dwarf::DW_TAG_compile_unit); - // DW_AT_stmt_list is a offset of line number information for this - // compile unit in debug_line section. It is always zero when only one - // compile unit is emitted in one object file. - addUInt(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4, 0); addString(Die, dwarf::DW_AT_producer, dwarf::DW_FORM_string, DIUnit.getProducer()); addUInt(Die, dwarf::DW_AT_language, dwarf::DW_FORM_data1, DIUnit.getLanguage()); addString(Die, dwarf::DW_AT_name, dwarf::DW_FORM_string, FN); + addLabel(Die, dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr, + getTempLabel("text_begin")); + addLabel(Die, dwarf::DW_AT_high_pc, dwarf::DW_FORM_addr, + getTempLabel("text_end")); + // DW_AT_stmt_list is a offset of line number information for this + // compile unit in debug_line section. It is always zero when only one + // compile unit is emitted in one object file. + addUInt(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4, 0); if (!Dir.empty()) addString(Die, dwarf::DW_AT_comp_dir, dwarf::DW_FORM_string, Dir); |