mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
PR13337: Omit DW_TAG_restrict_type when compiling for DWARF2
DWARF3 introduced DW_TAG_restrict_type, so avoid using it in prior versions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206105 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -985,6 +985,10 @@ DIE *DwarfUnit::getOrCreateTypeDIE(const MDNode *TyNode) {
|
||||
assert(Ty == resolve(Ty.getRef()) &&
|
||||
"type was not uniqued, possible ODR violation.");
|
||||
|
||||
// DW_TAG_restrict_type is not supported in DWARF2
|
||||
if (Ty.getTag() == dwarf::DW_TAG_restrict_type && DD->getDwarfVersion() <= 2)
|
||||
return getOrCreateTypeDIE(resolve(DIDerivedType(Ty).getTypeDerivedFrom()));
|
||||
|
||||
// Construct the context before querying for the existence of the DIE in case
|
||||
// such construction creates the DIE.
|
||||
DIScope Context = resolve(Ty.getContext());
|
||||
|
Reference in New Issue
Block a user