[llvm] 03e7fb9 - [NFCI] Fix set-but-unused warning in X86LoadValueInjectionLoadHardening.cpp
Dávid Bolvanský via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 24 00:33:52 PDT 2022
Author: Dávid Bolvanský
Date: 2022-03-24T08:33:40+01:00
New Revision: 03e7fb9d5317d365a6a4d58bca1a1f8dbfe67365
URL: https://github.com/llvm/llvm-project/commit/03e7fb9d5317d365a6a4d58bca1a1f8dbfe67365
DIFF: https://github.com/llvm/llvm-project/commit/03e7fb9d5317d365a6a4d58bca1a1f8dbfe67365.diff
LOG: [NFCI] Fix set-but-unused warning in X86LoadValueInjectionLoadHardening.cpp
Added:
Modified:
llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp b/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp
index 4710e524931ca..23976fb1a1426 100644
--- a/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp
+++ b/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp
@@ -558,7 +558,7 @@ int X86LoadValueInjectionLoadHardeningPass::elimMitigatedEdgesAndNodes(
}
// Find and eliminate gadget edges that have been mitigated.
- int MitigatedGadgets = 0, RemainingGadgets = 0;
+ int RemainingGadgets = 0;
NodeSet ReachableNodes{G};
for (const Node &RootN : G.nodes()) {
if (llvm::none_of(RootN.edges(), MachineGadgetGraph::isGadgetEdge))
@@ -586,7 +586,6 @@ int X86LoadValueInjectionLoadHardeningPass::elimMitigatedEdgesAndNodes(
// This gadget's sink is reachable
++RemainingGadgets;
} else { // This gadget's sink is unreachable, and therefore mitigated
- ++MitigatedGadgets;
ElimEdges.insert(E);
}
}
More information about the llvm-commits
mailing list