[llvm] 470e1d9 - [NFCI] Fix set-but-unused warning in AddressSanitizer.cpp
Dávid Bolvanský via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 24 00:13:40 PDT 2022
Author: Dávid Bolvanský
Date: 2022-03-24T08:13:29+01:00
New Revision: 470e1d958405a84482780824f7429aebbbc07441
URL: https://github.com/llvm/llvm-project/commit/470e1d958405a84482780824f7429aebbbc07441
DIFF: https://github.com/llvm/llvm-project/commit/470e1d958405a84482780824f7429aebbbc07441.diff
LOG: [NFCI] Fix set-but-unused warning in AddressSanitizer.cpp
Added:
Modified:
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index db877ff5581d2..a3a73006a3c78 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<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();
More information about the llvm-commits
mailing list