DI: Strengthen block-byref cast to DIDerivedType, NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 24 Jul 2015 18:58:32 +0000 (18:58 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 24 Jul 2015 18:58:32 +0000 (18:58 +0000)
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

lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index d05df017d7aec1618395ad24a9350d6480df9051..5611ae6fcd8034e1ea285b46ca7ce1802b1963d6 100644 (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());
     }