forked from OSchip/llvm-project
Bug fix in CFG construction: VisitCompoundStmt should return the last created block.
llvm-svn: 48460
This commit is contained in:
parent
cf87e71053
commit
fff4fc7e6d
|
@ -475,13 +475,15 @@ CFGBlock* CFGBuilder::VisitNullStmt(NullStmt* Statement) {
|
|||
}
|
||||
|
||||
CFGBlock* CFGBuilder::VisitCompoundStmt(CompoundStmt* C) {
|
||||
|
||||
CFGBlock* LastBlock = NULL;
|
||||
|
||||
for (CompoundStmt::reverse_body_iterator I=C->body_rbegin(), E=C->body_rend();
|
||||
I != E; ++I ) {
|
||||
Visit(*I);
|
||||
LastBlock = Visit(*I);
|
||||
}
|
||||
|
||||
return Block;
|
||||
return LastBlock;
|
||||
}
|
||||
|
||||
CFGBlock* CFGBuilder::VisitIfStmt(IfStmt* I) {
|
||||
|
|
Loading…
Reference in New Issue