diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-05-20 22:50:35 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-05-20 22:50:35 +0000 |
commit | e63d5d1633b84bac7623967d1cbef19e3aeecc9d (patch) | |
tree | fe07f0c38e64c8853c4bed0087fbc282d61ef100 /llvm/lib/CodeGen/AsmPrinter | |
parent | 0519e142b82b7e67d5072d0f16bcd5ae7ef80847 (diff) | |
download | bcm5719-llvm-e63d5d1633b84bac7623967d1cbef19e3aeecc9d.tar.gz bcm5719-llvm-e63d5d1633b84bac7623967d1cbef19e3aeecc9d.zip |
PR14606: Debug Info for namespace aliases/DW_TAG_imported_module
This resolves the last of the PR14606 failures in the GDB 7.5 test
suite by implementing an optional name field for
DW_TAG_imported_modules/DIImportedEntities and using that to implement
C++ namespace aliases (eg: "namespace X = Y;").
llvm-svn: 182328
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 19bbc738154..b72e65340f8 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -817,6 +817,9 @@ void DwarfDebug::constructImportedEntityDIE(CompileUnit *TheCU, TheCU->addUInt(IMDie, dwarf::DW_AT_decl_file, 0, FileID); TheCU->addUInt(IMDie, dwarf::DW_AT_decl_line, 0, Module.getLineNumber()); TheCU->addDIEEntry(IMDie, dwarf::DW_AT_import, dwarf::DW_FORM_ref4, EntityDie); + StringRef Name = Module.getName(); + if (!Name.empty()) + TheCU->addString(IMDie, dwarf::DW_AT_name, Name); Context->addChild(IMDie); } |