diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-03-12 16:51:06 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-03-12 16:51:06 +0000 |
commit | 7066f7bc39426fdfd8646a7469a0945fe660e654 (patch) | |
tree | 74b28492cd589ee6e0970eb0efb10ca270fdc88f /llvm/lib | |
parent | 95b540f221bdcf6db0c0dd03fc00d3cf7d91ac02 (diff) | |
download | bcm5719-llvm-7066f7bc39426fdfd8646a7469a0945fe660e654.tar.gz bcm5719-llvm-7066f7bc39426fdfd8646a7469a0945fe660e654.zip |
DebugInfo: Use common line/file attribute construction code
llvm-svn: 203676
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 401145d923c..a9c31ad7978 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -838,11 +838,9 @@ void DwarfDebug::constructImportedEntityDIE(DwarfCompileUnit *TheCU, EntityDie = TheCU->getOrCreateTypeDIE(DIType(Entity)); else EntityDie = TheCU->getDIE(Entity); - unsigned FileID = getOrCreateSourceID(Module.getContext().getFilename(), - Module.getContext().getDirectory(), - TheCU->getUniqueID()); - TheCU->addUInt(IMDie, dwarf::DW_AT_decl_file, None, FileID); - TheCU->addUInt(IMDie, dwarf::DW_AT_decl_line, None, Module.getLineNumber()); + TheCU->addSourceLine(IMDie, Module.getLineNumber(), + Module.getContext().getFilename(), + Module.getContext().getDirectory()); TheCU->addDIEEntry(IMDie, dwarf::DW_AT_import, EntityDie); StringRef Name = Module.getName(); if (!Name.empty()) |