mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 18:24:00 +00:00
DebugInfo: Gut DIDescriptor
PR23080 is almost finished. With this commit, there's no consequential API in `DIDescriptor` and its subclasses. What's left? - Default-constructed to `nullptr`. - Handy `const_cast<>` (constructed from `const`, but accessors are non-`const`). I think the safe way to catch those is to delete the classes and fix compile errors. That'll be my next step, after I delete the `DITypeRef` (etc.) wrapper around `MDTypeRef`. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235069 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1405,9 +1405,10 @@ void DwarfUnit::constructArrayTypeDIE(DIE &Buffer, DICompositeType CTy) {
|
||||
// Add subranges to array type.
|
||||
DIArray Elements = CTy->getElements();
|
||||
for (unsigned i = 0, N = Elements.size(); i < N; ++i) {
|
||||
DIDescriptor Element = Elements[i];
|
||||
if (Element.getTag() == dwarf::DW_TAG_subrange_type)
|
||||
constructSubrangeDIE(Buffer, cast<MDSubrange>(Element), IdxTy);
|
||||
// FIXME: Should this really be such a loose cast?
|
||||
if (auto *Element = dyn_cast_or_null<DebugNode>(Elements[i]))
|
||||
if (Element->getTag() == dwarf::DW_TAG_subrange_type)
|
||||
constructSubrangeDIE(Buffer, cast<MDSubrange>(Element), IdxTy);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user