projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7481d07
)
GCC fails to understand that NextBB is always initialized if EvaluateBlock
author
Duncan Sands
<baldrick@free.fr>
Thu, 23 Feb 2012 08:23:06 +0000
(08:23 +0000)
committer
Duncan Sands
<baldrick@free.fr>
Thu, 23 Feb 2012 08:23:06 +0000
(08:23 +0000)
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
lib/Transforms/IPO/GlobalOpt.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/IPO/GlobalOpt.cpp
b/lib/Transforms/IPO/GlobalOpt.cpp
index 7c78a2054487709e132c684e4c6907430b47dbbb..acb723e1cc894bb83684f3469b3f00ecc5d4d306 100644
(file)
--- a/
lib/Transforms/IPO/GlobalOpt.cpp
+++ b/
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;