mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-02 19:24:25 +00:00
[Debug Info] unique MDNodes in the enum types of each compile unit.
The enum types array by design contains pointers to MDNodes rather than DIRefs. Unique them when handling the enum types in DwarfDebug. rdar://17628609 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214139 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -762,8 +762,13 @@ void DwarfDebug::beginModule() {
|
||||
for (unsigned i = 0, e = SPs.getNumElements(); i != e; ++i)
|
||||
SPMap.insert(std::make_pair(SPs.getElement(i), &CU));
|
||||
DIArray EnumTypes = CUNode.getEnumTypes();
|
||||
for (unsigned i = 0, e = EnumTypes.getNumElements(); i != e; ++i)
|
||||
CU.getOrCreateTypeDIE(EnumTypes.getElement(i));
|
||||
for (unsigned i = 0, e = EnumTypes.getNumElements(); i != e; ++i) {
|
||||
DIType Ty(EnumTypes.getElement(i));
|
||||
// The enum types array by design contains pointers to
|
||||
// MDNodes rather than DIRefs. Unique them here.
|
||||
DIType UniqueTy(resolve(Ty.getRef()));
|
||||
CU.getOrCreateTypeDIE(UniqueTy);
|
||||
}
|
||||
DIArray RetainedTypes = CUNode.getRetainedTypes();
|
||||
for (unsigned i = 0, e = RetainedTypes.getNumElements(); i != e; ++i) {
|
||||
DIType Ty(RetainedTypes.getElement(i));
|
||||
|
Reference in New Issue
Block a user