mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
DwarfDebug: Only unique retained types instead of all types.
This is a follow-up to r203983 based on feedback from dblaikie and mren (Thanks!) No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204107 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -846,8 +846,13 @@ void DwarfDebug::beginModule() {
|
||||
for (unsigned i = 0, e = EnumTypes.getNumElements(); i != e; ++i)
|
||||
CU->getOrCreateTypeDIE(EnumTypes.getElement(i));
|
||||
DIArray RetainedTypes = CUNode.getRetainedTypes();
|
||||
for (unsigned i = 0, e = RetainedTypes.getNumElements(); i != e; ++i)
|
||||
CU->getOrCreateTypeDIE(RetainedTypes.getElement(i));
|
||||
for (unsigned i = 0, e = RetainedTypes.getNumElements(); i != e; ++i) {
|
||||
DIType Ty(RetainedTypes.getElement(i));
|
||||
// The retained types array by design contains pointers to
|
||||
// MDNodes rather than DIRefs. Unique them here.
|
||||
DIType UniqueTy(resolve(Ty.getRef()));
|
||||
CU->getOrCreateTypeDIE(UniqueTy);
|
||||
}
|
||||
// Emit imported_modules last so that the relevant context is already
|
||||
// available.
|
||||
for (unsigned i = 0, e = ImportedEntities.getNumElements(); i != e; ++i)
|
||||
|
Reference in New Issue
Block a user