[cfe-commits] r59201 - /cfe/trunk/lib/CodeGen/CGStmt.cpp

Daniel Dunbar daniel at zuster.org
Wed Nov 12 16:48:00 PST 2008


Author: ddunbar
Date: Wed Nov 12 18:47:57 2008
New Revision: 59201

URL: http://llvm.org/viewvc/llvm-project?rev=59201&view=rev
Log:
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).

Modified:
    cfe/trunk/lib/CodeGen/CGStmt.cpp

Modified: cfe/trunk/lib/CodeGen/CGStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGStmt.cpp?rev=59201&r1=59200&r2=59201&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGStmt.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGStmt.cpp Wed Nov 12 18:47:57 2008
@@ -250,13 +250,12 @@
 
   // 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);





More information about the cfe-commits mailing list