diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-07-24 19:17:20 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-07-24 19:17:20 +0000 |
commit | 2ecfb1e269645e4a2bbfab366e80218efc380c93 (patch) | |
tree | 827225749f019fc21043ecf3bee0bb8e0811292b /llvm/lib/IR | |
parent | d3059f3853fca4b0f0e7a3c1bf81e2c6f326d49e (diff) | |
download | bcm5719-llvm-2ecfb1e269645e4a2bbfab366e80218efc380c93.tar.gz bcm5719-llvm-2ecfb1e269645e4a2bbfab366e80218efc380c93.zip |
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.
llvm-svn: 243143
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r-- | llvm/lib/IR/DebugInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index 9646d1aa4d7..ca343f7fac8 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -60,7 +60,7 @@ DICompositeTypeBase *llvm::getDICompositeType(DIType *T) { if (auto *C = dyn_cast_or_null<DICompositeTypeBase>(T)) 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 // not generate identifier for types, so using an empty map to resolve // DerivedFrom should be fine. @@ -177,7 +177,7 @@ void DebugInfoFinder::processType(DIType *DT) { else if (auto *SP = dyn_cast<DISubprogram>(D)) processSubprogram(SP); } - } else if (auto *DDT = dyn_cast<DIDerivedTypeBase>(DT)) { + } else if (auto *DDT = dyn_cast<DIDerivedType>(DT)) { processType(DDT->getBaseType().resolve(TypeIdentifierMap)); } } |