[cfe-commits] r79507 - /cfe/trunk/lib/Analysis/CFG.cpp
Zhongxing Xu
xuzhongxing at gmail.com
Wed Aug 19 19:56:48 PDT 2009
Author: zhongxingxu
Date: Wed Aug 19 21:56:48 2009
New Revision: 79507
URL: http://llvm.org/viewvc/llvm-project?rev=79507&view=rev
Log:
If the body of for loop is empty, set its body to the continue target.
Otherwise we get a wrong CFG.
Modified:
cfe/trunk/lib/Analysis/CFG.cpp
Modified: cfe/trunk/lib/Analysis/CFG.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFG.cpp?rev=79507&r1=79506&r2=79507&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CFG.cpp (original)
+++ cfe/trunk/lib/Analysis/CFG.cpp Wed Aug 19 21:56:48 2009
@@ -925,7 +925,7 @@
CFGBlock* BodyBlock = addStmt(F->getBody());
if (!BodyBlock)
- BodyBlock = EntryConditionBlock; // can happen for "for (...;...; ) ;"
+ BodyBlock = ContinueTargetBlock; // can happen for "for (...;...;...) ;"
else if (Block && !FinishBlock(BodyBlock))
return 0;
More information about the cfe-commits
mailing list