From: Dávid Bolvanský Date: Thu, 24 Mar 2022 06:56:03 +0000 (+0100) Subject: [NFCI] Fix set-but-unused warning in AddressSanitizer.cpp X-Git-Tag: upstream/15.0.7~12486 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=470e1d958405a84482780824f7429aebbbc07441;p=platform%2Fupstream%2Fllvm.git [NFCI] Fix set-but-unused warning in AddressSanitizer.cpp --- diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp index db877ff..a3a7300 100644 --- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -2880,7 +2880,6 @@ bool AddressSanitizer::instrumentFunction(Function &F, SmallVector NoReturnCalls; SmallVector AllBlocks; SmallVector PointerComparisonsOrSubtracts; - int NumAllocas = 0; // Fill the set of memory operations to instrument. for (auto &BB : F) { @@ -2920,7 +2919,6 @@ bool AddressSanitizer::instrumentFunction(Function &F, IntrinToInstrument.push_back(MI); NumInsnsPerBB++; } else { - if (isa(Inst)) NumAllocas++; if (auto *CB = dyn_cast(&Inst)) { // A call inside BB. TempsToInstrument.clear();