1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00

DebugInfo: Use common line/file attribute construction code

llvm-svn: 203676
This commit is contained in:
David Blaikie 2014-03-12 16:51:06 +00:00
parent 3af4500090
commit 2365974d09

View File

@ -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())