[llvm] r230582 - MemDepPrinter: Fix some nits introduced in r228596

Ramkumar Ramachandra artagnon at gmail.com
Wed Feb 25 15:55:00 PST 2015


Author: artagnon
Date: Wed Feb 25 17:55:00 2015
New Revision: 230582

URL: http://llvm.org/viewvc/llvm-project?rev=230582&view=rev
Log:
MemDepPrinter: Fix some nits introduced in r228596

Differential Revision: http://reviews.llvm.org/D7644

Modified:
    llvm/trunk/lib/Analysis/MemDepPrinter.cpp

Modified: llvm/trunk/lib/Analysis/MemDepPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemDepPrinter.cpp?rev=230582&r1=230581&r2=230582&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/MemDepPrinter.cpp (original)
+++ llvm/trunk/lib/Analysis/MemDepPrinter.cpp Wed Feb 25 17:55:00 2015
@@ -96,7 +96,7 @@ bool MemDepPrinter::runOnFunction(Functi
 
   // 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(Functi
 }
 
 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 &O
 
     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;





More information about the llvm-commits mailing list