mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 17:25:21 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222217 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user