From 845a30e5b89baeda769457d3bf9fb0a409ac207c Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Mon, 27 Jul 2015 01:35:30 +0000 Subject: [PATCH] LoopAccessAnalysis.cpp: Tweak r243239 to avoid side effects. It caused different emissions between gcc and clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243258 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/LoopAccessAnalysis.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Analysis/LoopAccessAnalysis.cpp b/lib/Analysis/LoopAccessAnalysis.cpp index 99b5aebaeabc..7fe2c999ddc7 100644 --- a/lib/Analysis/LoopAccessAnalysis.cpp +++ b/lib/Analysis/LoopAccessAnalysis.cpp @@ -1635,9 +1635,10 @@ static SmallVector, 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;