MemDepPrinter: Fix some nits introduced in r228596
authorRamkumar Ramachandra <artagnon@gmail.com>
Wed, 25 Feb 2015 23:55:00 +0000 (23:55 +0000)
committerRamkumar Ramachandra <artagnon@gmail.com>
Wed, 25 Feb 2015 23:55:00 +0000 (23:55 +0000)
Differential Revision: http://reviews.llvm.org/D7644

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230582 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/MemDepPrinter.cpp

index 854197badfbcb091af7d78bf2ce9d88fdf36bda2..e1b7b4b8509df99642f70fc8f563f75645365e99 100644 (file)
@@ -96,7 +96,7 @@ bool MemDepPrinter::runOnFunction(Function &F) {
 
   // All this code uses non-const interfaces because MemDep is not
   // const-friendly, though nothing is actually modified.
-  for (auto &I: inst_range(F)) {
+  for (auto &I : inst_range(F)) {
     Instruction *Inst = &I;
 
     if (!Inst->mayReadFromMemory() && !Inst->mayWriteToMemory())
@@ -135,7 +135,7 @@ bool MemDepPrinter::runOnFunction(Function &F) {
 }
 
 void MemDepPrinter::print(raw_ostream &OS, const Module *M) const {
-  for (auto &I: inst_range(*F)) {
+  for (const auto &I : inst_range(*F)) {
     const Instruction *Inst = &I;
 
     DepSetMap::const_iterator DI = Deps.find(Inst);
@@ -144,7 +144,7 @@ void MemDepPrinter::print(raw_ostream &OS, const Module *M) const {
 
     const DepSet &InstDeps = DI->second;
 
-    for (auto &I: InstDeps) {
+    for (const auto &I : InstDeps) {
       const Instruction *DepInst = I.first.getPointer();
       DepType type = I.first.getInt();
       const BasicBlock *DepBB = I.second;