From: Adrian Prantl Date: Thu, 16 Mar 2017 18:33:01 +0000 (+0000) Subject: Fix unused variable warnings. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b789f7bdf04b6306142a16d6bfe38913ef7c64da;p=llvm Fix unused variable warnings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297973 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp index 26cb1a8c8b0..431055233e9 100644 --- a/lib/Transforms/Utils/Local.cpp +++ b/lib/Transforms/Utils/Local.cpp @@ -1358,14 +1358,14 @@ void llvm::salvageDebugInfo(Instruction &I) { }; auto &M = *I.getModule(); if (auto *BitCast = dyn_cast(&I)) - findDbgValues(&I, [&](DbgValueInst &DVI) { + findDbgValues(BitCast, [&](DbgValueInst &DVI) { // Bitcasts are entirely irrelevant for debug info. Rewrite the dbg.value // to use the cast's source. DVI.setOperand(0, MDWrap(I.getOperand(0))); DEBUG(dbgs() << "SALVAGE: " << DVI << '\n'); }); else if (auto *GEP = dyn_cast(&I)) - findDbgValues(&I, [&](DbgValueInst &DVI) { + findDbgValues(GEP, [&](DbgValueInst &DVI) { unsigned BitWidth = M.getDataLayout().getPointerSizeInBits(GEP->getPointerAddressSpace()); APInt Offset(BitWidth, 0); @@ -1381,7 +1381,7 @@ void llvm::salvageDebugInfo(Instruction &I) { } }); else if (auto *Load = dyn_cast(&I)) - findDbgValues(&I, [&](DbgValueInst &DVI) { + findDbgValues(Load, [&](DbgValueInst &DVI) { // Rewrite the load into DW_OP_deref. auto *DIExpr = DVI.getExpression(); DIBuilder DIB(M, /*AllowUnresolved*/ false);