diff options
author | Adrian Prantl <aprantl@apple.com> | 2017-03-20 16:39:41 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2017-03-20 16:39:41 +0000 |
commit | 6d80a262d53459cd0d4464f3922705a45449ed94 (patch) | |
tree | 974a1a16b2dbf4e9e4938ad8a4362d76a23ab477 /llvm/lib | |
parent | 5971469566b3b52201857a17491c1ca1375257e9 (diff) | |
download | bcm5719-llvm-6d80a262d53459cd0d4464f3922705a45449ed94.tar.gz bcm5719-llvm-6d80a262d53459cd0d4464f3922705a45449ed94.zip |
Use isa<> instead of dyn_cast<> (NFC).
llvm-svn: 298268
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index 46996323b59..3b1e501bd73 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -1361,8 +1361,8 @@ void llvm::salvageDebugInfo(Instruction &I) { return MetadataAsValue::get(I.getContext(), ValueAsMetadata::get(V)); }; - if (auto *BitCast = dyn_cast<BitCastInst>(&I)) { - findDbgValues(DbgValues, BitCast); + if (isa<BitCastInst>(&I)) { + findDbgValues(DbgValues, &I); for (auto *DVI : DbgValues) { // Bitcasts are entirely irrelevant for debug info. Rewrite the dbg.value // to use the cast's source. @@ -1370,7 +1370,7 @@ void llvm::salvageDebugInfo(Instruction &I) { DEBUG(dbgs() << "SALVAGE: " << *DVI << '\n'); } } else if (auto *GEP = dyn_cast<GetElementPtrInst>(&I)) { - findDbgValues(DbgValues, GEP); + findDbgValues(DbgValues, &I); for (auto *DVI : DbgValues) { unsigned BitWidth = M.getDataLayout().getPointerSizeInBits(GEP->getPointerAddressSpace()); @@ -1386,8 +1386,8 @@ void llvm::salvageDebugInfo(Instruction &I) { DEBUG(dbgs() << "SALVAGE: " << *DVI << '\n'); } } - } else if (auto *Load = dyn_cast<LoadInst>(&I)) { - findDbgValues(DbgValues, Load); + } else if (isa<LoadInst>(&I)) { + findDbgValues(DbgValues, &I); for (auto *DVI : DbgValues) { // Rewrite the load into DW_OP_deref. auto *DIExpr = DVI->getExpression(); |