aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-05-08 06:01:41 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-05-08 06:01:41 +0000
commitaa76a93cd35abd922b66825bb4e3e0b6e14ccfd5 (patch)
tree4f527fa2c3ab20f4d290094c26f36476d5cabec3 /lib
parentd1221e377d8e37e41539ed9f36b60b4cd48b6988 (diff)
downloadexternal_llvm-aa76a93cd35abd922b66825bb4e3e0b6e14ccfd5.zip
external_llvm-aa76a93cd35abd922b66825bb4e3e0b6e14ccfd5.tar.gz
external_llvm-aa76a93cd35abd922b66825bb4e3e0b6e14ccfd5.tar.bz2
Debug Info: Support DW_TAG_imported_declaration
This provides basic functionality for imported declarations. For subprograms and types some amount of lazy construction is supported (so the definition of a function can proceed the using declaration), but it still doesn't handle declared-but-not-defined functions (since we don't generally emit function declarations). Variable support is really rudimentary at the moment - simply looking up the existing definition with no support for out of order (declaration, imported_module, then definition). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181392 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 4b2e86a..d8de3ca 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -807,8 +807,10 @@ void DwarfDebug::constructImportedEntityDIE(CompileUnit *TheCU,
EntityDie = TheCU->getOrCreateNameSpace(DINameSpace(Entity));
else if (Entity.isSubprogram())
EntityDie = TheCU->getOrCreateSubprogramDIE(DISubprogram(Entity));
+ else if (Entity.isType())
+ EntityDie = TheCU->getOrCreateTypeDIE(DIType(Entity));
else
- return;
+ EntityDie = TheCU->getDIE(Entity);
unsigned FileID = getOrCreateSourceID(Module.getContext().getFilename(),
Module.getContext().getDirectory(),
TheCU->getUniqueID());