summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-03-12 16:51:06 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-03-12 16:51:06 +0000
commita3802ac246e2637f47c4a87292783ad00184dcef (patch)
treeef535925aff90ff2511ff8238a0072ba0702866e /lib
parent4c871b7880bf08e5fd4145b3bc489bdb6059a2c2 (diff)
downloadllvm-a3802ac246e2637f47c4a87292783ad00184dcef.tar.gz
llvm-a3802ac246e2637f47c4a87292783ad00184dcef.tar.bz2
llvm-a3802ac246e2637f47c4a87292783ad00184dcef.tar.xz
DebugInfo: Use common line/file attribute construction code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203676 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 401145d923..a9c31ad797 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/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())