From 1168f93c2b16b7eb9972d093cbee97372a0d1210 Mon Sep 17 00:00:00 2001 From: Sanjoy Das Date: Wed, 2 Mar 2016 02:34:20 +0000 Subject: [PATCH] Perturb code in an attempt to appease MSVC For some reason MSVC seems to think I'm calling getConstant() from a static context. Try to avoid this issue by explicitly specifying 'this->' (though I'm not confident that this will actually work). llvm-svn: 262451 --- llvm/lib/Analysis/ScalarEvolution.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 5f8db62..d5e97a3 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -4577,15 +4577,15 @@ ConstantRange ScalarEvolution::getRangeViaFactoring(const SCEV *Start, // from deep in the call stack, and calling getSCEV (on a sext instruction, // say) can end up caching a suboptimal value. - APInt TrueStart = *StartPattern.TrueValue + Offset; - APInt TrueStep = *StepPattern.TrueValue; - APInt FalseStart = *StartPattern.FalseValue + Offset; - APInt FalseStep = *StepPattern.FalseValue; - - ConstantRange TrueRange = getRangeForAffineAR( - getConstant(TrueStart), getConstant(TrueStep), MaxBECount, BitWidth); - ConstantRange FalseRange = getRangeForAffineAR( - getConstant(FalseStart), getConstant(FalseStep), MaxBECount, BitWidth); + const SCEV *TrueStart = this->getConstant(*StartPattern.TrueValue + Offset); + const SCEV *TrueStep = this->getConstant(*StepPattern.TrueValue); + const SCEV *FalseStart = this->getConstant(*StartPattern.FalseValue + Offset); + const SCEV *FalseStep = this->getConstant(*StepPattern.FalseValue); + + ConstantRange TrueRange = + getRangeForAffineAR(TrueStart, TrueStep, MaxBECount, BitWidth); + ConstantRange FalseRange = + getRangeForAffineAR(FalseStart, FalseStep, MaxBECount, BitWidth); return TrueRange.unionWith(FalseRange); } -- 2.7.4