aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-11-13 00:47:57 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-11-13 00:47:57 +0000
commit781d7ca9b2fd626ef34bdc3fe06765eeff7ab2bc (patch)
tree71f181d7621adf5035ff03e99cca1af20a9a07b1
parent006dd8a2bd3723d4b6f3526be8f1a4dc0e9cfac3 (diff)
For if blocks with no else, name the join block ifend instead of the
more confusing ifelse. Use dotted names for if blocks (if.then vs ifthen). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59201 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/CGStmt.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp
index e40508669a..a66b6fec04 100644
--- a/lib/CodeGen/CGStmt.cpp
+++ b/lib/CodeGen/CGStmt.cpp
@@ -250,13 +250,12 @@ void CodeGenFunction::EmitIfStmt(const IfStmt &S) {
// Otherwise, the condition did not fold, or we couldn't elide it. Just emit
// the conditional branch.
- llvm::BasicBlock *ThenBlock = createBasicBlock("ifthen");
- llvm::BasicBlock *ElseBlock = createBasicBlock("ifelse");
- EmitBranchOnBoolExpr(S.getCond(), ThenBlock, ElseBlock);
-
- llvm::BasicBlock *ContBlock = ElseBlock;
+ llvm::BasicBlock *ThenBlock = createBasicBlock("if.then");
+ llvm::BasicBlock *ContBlock = createBasicBlock("if.end");
+ llvm::BasicBlock *ElseBlock = ContBlock;
if (S.getElse())
- ContBlock = createBasicBlock("ifend");
+ ElseBlock = createBasicBlock("if.else");
+ EmitBranchOnBoolExpr(S.getCond(), ThenBlock, ElseBlock);
// Emit the 'then' code.
EmitBlock(ThenBlock);