LTO type uniquing: store the Decl field of a DIImportedEntity as a DIRef.
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfDebug.cpp
index f4182d0b79b20975a55422556c6fc626bda8b89e..a21fa673118386582b17a4e5545fc6cfa69d9d98 100644 (file)
@@ -794,7 +794,7 @@ void DwarfDebug::constructImportedEntityDIE(DwarfCompileUnit *TheCU,
   DIE *IMDie = new DIE(Module.getTag());
   TheCU->insertDIE(Module, IMDie);
   DIE *EntityDie;
-  DIDescriptor Entity = Module.getEntity();
+  DIDescriptor Entity = resolve(Module.getEntity());
   if (Entity.isNameSpace())
     EntityDie = TheCU->getOrCreateNameSpace(DINameSpace(Entity));
   else if (Entity.isSubprogram())