diff options
Diffstat (limited to 'llvm/lib/Analysis/LazyValueInfo.cpp')
| -rw-r--r-- | llvm/lib/Analysis/LazyValueInfo.cpp | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp index d49b20798c82..2fae260e0d8f 100644 --- a/llvm/lib/Analysis/LazyValueInfo.cpp +++ b/llvm/lib/Analysis/LazyValueInfo.cpp @@ -1896,7 +1896,7 @@ void LazyValueInfoAnnotatedWriter::emitBasicBlockStartAnnot(      const BasicBlock *BB, formatted_raw_ostream &OS) {    // Find if there are latticevalues defined for arguments of the function.    auto *F = BB->getParent(); -  for (auto &Arg : F->args()) { +  for (const auto &Arg : F->args()) {      ValueLatticeElement Result = LVIImpl->getValueInBlock(          const_cast<Argument *>(&Arg), const_cast<BasicBlock *>(BB));      if (Result.isUnknown()) @@ -1932,12 +1932,12 @@ void LazyValueInfoAnnotatedWriter::emitInstructionAnnot(    printResult(ParentBB);    // Print the LVI analysis results for the immediate successor blocks, that    // are dominated by `ParentBB`. -  for (auto *BBSucc : successors(ParentBB)) +  for (const auto *BBSucc : successors(ParentBB))      if (DT.dominates(ParentBB, BBSucc))        printResult(BBSucc);    // Print LVI in blocks where `I` is used. -  for (auto *U : I->users()) +  for (const auto *U : I->users())      if (auto *UseI = dyn_cast<Instruction>(U))        if (!isa<PHINode>(UseI) || DT.dominates(ParentBB, UseI->getParent()))          printResult(UseI->getParent()); | 
