diff options
author | Frederic Riss <friss@apple.com> | 2014-11-18 02:46:11 +0000 |
---|---|---|
committer | Frederic Riss <friss@apple.com> | 2014-11-18 02:46:11 +0000 |
commit | fdccfc1e199a2ec27e9bfc5b6839dcc37d33839c (patch) | |
tree | 035a67cfadf9010b8e903f413118fafdc5341cd7 /llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | |
parent | 774aadf1441f687f49ba0db351124f4b59fd8a38 (diff) | |
download | bcm5719-llvm-fdccfc1e199a2ec27e9bfc5b6839dcc37d33839c.tar.gz bcm5719-llvm-fdccfc1e199a2ec27e9bfc5b6839dcc37d33839c.zip |
Allow DwarfCompileUnit::constructImportedEntityDIE to instanciate a GlobalVariable DIE.
Usually global variables are in a retain list and instanciated before
any call to constructImportedEntityDIE is made. This isn't true for
forward declarations though.
The testcase for this change is generated by a clang patched to emit
such forward declarations (patch at http://reviews.llvm.org/D6173
which will land soon). The updated testcase tests more than just
global variables, it now tests every type of 'using' clause we
support.
llvm-svn: 222217
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index 4dc1224c4a4..2f1b0e5b161 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -646,6 +646,8 @@ DwarfCompileUnit::constructImportedEntityDIE(const DIImportedEntity &Module) { EntityDie = getOrCreateSubprogramDIE(DISubprogram(Entity)); else if (Entity.isType()) EntityDie = getOrCreateTypeDIE(DIType(Entity)); + else if (Entity.isGlobalVariable()) + EntityDie = getOrCreateGlobalVariableDIE(DIGlobalVariable(Entity)); else EntityDie = getDIE(Entity); assert(EntityDie); |