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:
parent
3af4500090
commit
2365974d09
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user