[llvm] r243138 - DI: Strengthen block-byref cast to DIDerivedType, NFC
Duncan P. N. Exon Smith
dexonsmith at apple.com
Fri Jul 24 11:58:32 PDT 2015
Author: dexonsmith
Date: Fri Jul 24 13:58:32 2015
New Revision: 243138
URL: http://llvm.org/viewvc/llvm-project?rev=243138&view=rev
Log:
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.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=243138&r1=243137&r2=243138&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Fri Jul 24 13:58:32 2015
@@ -189,7 +189,7 @@ const DIType *DbgVariable::getType() con
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());
}
More information about the llvm-commits
mailing list