forked from OSchip/llvm-project
[Scalar] ConstantHoistingPass - iterate with const references. NFCI.
Fix some clang-tidy warnings.
This commit is contained in:
parent
bdd6af3a58
commit
81a408808f
|
@ -951,7 +951,7 @@ bool ConstantHoistingPass::runImpl(Function &Fn, TargetTransformInfo &TTI,
|
|||
// base constant.
|
||||
if (!ConstIntCandVec.empty())
|
||||
findBaseConstants(nullptr);
|
||||
for (auto &MapEntry : ConstGEPCandMap)
|
||||
for (const auto &MapEntry : ConstGEPCandMap)
|
||||
if (!MapEntry.second.empty())
|
||||
findBaseConstants(MapEntry.first);
|
||||
|
||||
|
@ -960,7 +960,7 @@ bool ConstantHoistingPass::runImpl(Function &Fn, TargetTransformInfo &TTI,
|
|||
bool MadeChange = false;
|
||||
if (!ConstIntInfoVec.empty())
|
||||
MadeChange = emitBaseConstants(nullptr);
|
||||
for (auto MapEntry : ConstGEPInfoMap)
|
||||
for (const auto &MapEntry : ConstGEPInfoMap)
|
||||
if (!MapEntry.second.empty())
|
||||
MadeChange |= emitBaseConstants(MapEntry.first);
|
||||
|
||||
|
|
Loading…
Reference in New Issue