Skip to content

Commit

Permalink
LoopAccessAnalysis.cpp: Tweak r243239 to avoid side effects. It cause…
Browse files Browse the repository at this point in the history
…d different emissions between gcc and clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243258 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
chapuni committed Jul 27, 2015
1 parent 508c047 commit 845a30e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/Analysis/LoopAccessAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 845a30e

Please sign in to comment.