DI: Strengthen block-byref cast to DIDerivedType, NFC

This code is visiting the members of a block-byref, and we know those
are all `DIDerivedType`.  Strengthen the cast.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243138 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith 2015-07-24 18:58:32 +00:00
parent 2914cbf164
commit e4a9f1b6e7

View File

@ -189,7 +189,7 @@ const DIType *DbgVariable::getType() const {
auto Elements = cast<DICompositeType>(subType)->getElements();
for (unsigned i = 0, N = Elements.size(); i < N; ++i) {
auto *DT = cast<DIDerivedTypeBase>(Elements[i]);
auto *DT = cast<DIDerivedType>(Elements[i]);
if (getName() == DT->getName())
return resolve(DT->getBaseType());
}