aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp')
-rw-r--r--llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp b/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp
index 810fee052b5a..165533eba346 100644
--- a/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp
+++ b/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp
@@ -372,9 +372,9 @@ X86LoadValueInjectionLoadHardeningPass::getGadgetGraph(
auto Use = DFG.addr<UseNode *>(UseID);
if (Use.Addr->getFlags() & NodeAttrs::PhiRef) { // phi node
NodeAddr<PhiNode *> Phi = Use.Addr->getOwner(DFG);
- for (auto I : L.getRealUses(Phi.Id)) {
+ for (const auto& I : L.getRealUses(Phi.Id)) {
if (DFG.getPRI().alias(RegisterRef(I.first), DefReg)) {
- for (auto UA : I.second)
+ for (const auto &UA : I.second)
Uses.emplace(UA.first);
}
}
@@ -417,7 +417,7 @@ X86LoadValueInjectionLoadHardeningPass::getGadgetGraph(
// Check whether the use propagates to more defs.
NodeAddr<InstrNode *> Owner{Use.Addr->getOwner(DFG)};
rdf::NodeList AnalyzedChildDefs;
- for (auto &ChildDef :
+ for (const auto &ChildDef :
Owner.Addr->members_if(DataFlowGraph::IsDef, DFG)) {
if (!DefsVisited.insert(ChildDef.Id).second)
continue; // Already visited this def