Use "auto &" in range-based for-loop and remove the extra braces.
authorAdrian Prantl <aprantl@apple.com>
Tue, 26 May 2015 20:06:51 +0000 (20:06 +0000)
committerAdrian Prantl <aprantl@apple.com>
Tue, 26 May 2015 20:06:51 +0000 (20:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238243 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index c4ab3e99c893ee856e8f73923d499884110bc542..105ff6c198f88e98816f64f38517be04f20f9f61 100644 (file)
@@ -859,9 +859,8 @@ DwarfDebug::buildLocationList(SmallVectorImpl<DebugLocEntry> &DebugLoc,
     auto CurEntry = DebugLoc.rbegin();
     DEBUG({
       dbgs() << CurEntry->getValues().size() << " Values:\n";
-      for (auto Value : CurEntry->getValues()) {
+      for (auto &Value : CurEntry->getValues())
         Value.getExpression()->dump();
-      }
       dbgs() << "-----\n";
     });