]> granicus.if.org Git - clang/commit
CodeGen: Use EmitBranchOnBool when generating For and CXXForRange
authorJustin Bogner <mail@justinbogner.com>
Mon, 4 Nov 2013 16:13:21 +0000 (16:13 +0000)
committerJustin Bogner <mail@justinbogner.com>
Mon, 4 Nov 2013 16:13:21 +0000 (16:13 +0000)
commitcbefd402338f6de100acf2d05ede553a0d009d3c
tree02a77748c5d4180816a8142acc4a821539d777fc
parentfd93e4a31b1c1a2c0ec8891e4560b61fcdc0d926
CodeGen: Use EmitBranchOnBool when generating For and CXXForRange

A while ago EmitForStmt was changed to explicitly evaluate the
condition expression and create a branch instead of using
EmitBranchOnBool, so that the condition expression could be used for
some cleanup logic. The cleanup stuff has since been reorganized, and
this is no longer necessary.

In EmitCXXForRange, the evaluated condition was never used for
anything else. The logic was presumably modeled on EmitForStmt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193994 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGStmt.cpp