diff options
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(); |