LoopAccessAnalysis.cpp: Tweak r243239 to avoid side effects. It caused different...
authorNAKAMURA Takumi <geek4civic@gmail.com>
Mon, 27 Jul 2015 01:35:30 +0000 (01:35 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Mon, 27 Jul 2015 01:35:30 +0000 (01:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243258 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/LoopAccessAnalysis.cpp

index 99b5aeb..7fe2c99 100644 (file)
@@ -1635,9 +1635,10 @@ static SmallVector<std::pair<PointerBounds, PointerBounds>, 4> expandBounds(
       PointerChecks.begin(), PointerChecks.end(),
       std::back_inserter(ChecksWithBounds),
       [&](const RuntimePointerChecking::PointerCheck &Check) {
-        return std::make_pair(
-            expandBounds(Check.first, L, Loc, Exp, SE, PtrRtChecking),
-            expandBounds(Check.second, L, Loc, Exp, SE, PtrRtChecking));
+        PointerBounds
+          First = expandBounds(Check.first, L, Loc, Exp, SE, PtrRtChecking),
+          Second = expandBounds(Check.second, L, Loc, Exp, SE, PtrRtChecking);
+        return std::make_pair(First, Second);
       });
 
   return ChecksWithBounds;