GCC fails to understand that NextBB is always initialized if EvaluateBlock

returns 'true' and emits a warning.  Help it out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151242 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan Sands 2012-02-23 08:23:06 +00:00
parent 7481d07a07
commit 4b794f8191

View File

@ -2645,7 +2645,7 @@ bool Evaluator::EvaluateFunction(Function *F, Constant *&RetVal,
BasicBlock::iterator CurInst = CurBB->begin();
while (1) {
BasicBlock *NextBB;
BasicBlock *NextBB = 0; // Initialized to avoid compiler warnings.
if (!EvaluateBlock(CurInst, NextBB))
return false;