summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2012-02-23 08:23:06 +0000
committerDuncan Sands <baldrick@free.fr>2012-02-23 08:23:06 +0000
commit4730cb9c7c4644437ed2e352b025281852dea3ad (patch)
tree5c241fe0b9dc7999c8aadeba3e83130db444dfb6 /llvm/lib/Transforms
parent6427a5ef018805571d7d6a17cef19c9b9619d666 (diff)
downloadbcm5719-llvm-4730cb9c7c4644437ed2e352b025281852dea3ad.tar.gz
bcm5719-llvm-4730cb9c7c4644437ed2e352b025281852dea3ad.zip
GCC fails to understand that NextBB is always initialized if EvaluateBlock
returns 'true' and emits a warning. Help it out. llvm-svn: 151242
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/GlobalOpt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
index 7c78a205448..acb723e1cc8 100644
--- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
@@ -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;
OpenPOWER on IntegriCloud