From c63e16a6d466e60dab77f109056e9d8faba157e0 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Fri, 24 Jul 2015 19:17:20 +0000 Subject: [PATCH] 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 --- lib/IR/DebugInfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp index 9646d1aa4d7..ca343f7fac8 100644 --- a/lib/IR/DebugInfo.cpp +++ b/lib/IR/DebugInfo.cpp @@ -60,7 +60,7 @@ DICompositeTypeBase *llvm::getDICompositeType(DIType *T) { if (auto *C = dyn_cast_or_null(T)) return C; - if (auto *D = dyn_cast_or_null(T)) { + if (auto *D = dyn_cast_or_null(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(D)) processSubprogram(SP); } - } else if (auto *DDT = dyn_cast(DT)) { + } else if (auto *DDT = dyn_cast(DT)) { processType(DDT->getBaseType().resolve(TypeIdentifierMap)); } } -- 2.34.1