mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-27 04:18:42 +00:00
DI: Strengthen some dyn_casts to DIDerivedType, NFC
The surrounding code proves in both cases that these must be `DIDerivedType` if they're `DIDerivedTypeBase`, so strengthen the `dyn_cast`s to the more specific type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243143 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
1 parent
ab0a70d3a3
commit
c63e16a6d4
1 file changed
+2
-2
@@ -60,7 +60,7 @@ DICompositeTypeBase *llvm::getDICompositeType(DIType *T) {
|
|||||||
if (auto *C = dyn_cast_or_null<DICompositeTypeBase>(T))
|
if (auto *C = dyn_cast_or_null<DICompositeTypeBase>(T))
|
||||||
return C;
|
return C;
|
||||||
|
|
||||||
if (auto *D = dyn_cast_or_null<DIDerivedTypeBase>(T)) {
|
if (auto *D = dyn_cast_or_null<DIDerivedType>(T)) {
|
||||||
// This function is currently used by dragonegg and dragonegg does
|
// This function is currently used by dragonegg and dragonegg does
|
||||||
// not generate identifier for types, so using an empty map to resolve
|
// not generate identifier for types, so using an empty map to resolve
|
||||||
// DerivedFrom should be fine.
|
// DerivedFrom should be fine.
|
||||||
@@ -177,7 +177,7 @@ void DebugInfoFinder::processType(DIType *DT) {
|
|||||||
else if (auto *SP = dyn_cast<DISubprogram>(D))
|
else if (auto *SP = dyn_cast<DISubprogram>(D))
|
||||||
processSubprogram(SP);
|
processSubprogram(SP);
|
||||||
}
|
}
|
||||||
} else if (auto *DDT = dyn_cast<DIDerivedTypeBase>(DT)) {
|
} else if (auto *DDT = dyn_cast<DIDerivedType>(DT)) {
|
||||||
processType(DDT->getBaseType().resolve(TypeIdentifierMap));
|
processType(DDT->getBaseType().resolve(TypeIdentifierMap));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user