[NFCI] Fix set-but-unused warning in AddressSanitizer.cpp
authorDávid Bolvanský <david.bolvansky@gmail.com>
Thu, 24 Mar 2022 06:56:03 +0000 (07:56 +0100)
committerDávid Bolvanský <david.bolvansky@gmail.com>
Thu, 24 Mar 2022 07:13:29 +0000 (08:13 +0100)
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp

index db877ff..a3a7300 100644 (file)
@@ -2880,7 +2880,6 @@ bool AddressSanitizer::instrumentFunction(Function &F,
   SmallVector<Instruction *, 8> NoReturnCalls;
   SmallVector<BasicBlock *, 16> AllBlocks;
   SmallVector<Instruction *, 16> 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<AllocaInst>(Inst)) NumAllocas++;
         if (auto *CB = dyn_cast<CallBase>(&Inst)) {
           // A call inside BB.
           TempsToInstrument.clear();