Add CodeGenFunction::EmitBranch.
- Emits an unconditional branch, with extra logic to avoid generating
spurious branches out of dummy blocks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59037 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGExprComplex.cpp b/lib/CodeGen/CGExprComplex.cpp
index d12d355..9222662 100644
--- a/lib/CodeGen/CGExprComplex.cpp
+++ b/lib/CodeGen/CGExprComplex.cpp
@@ -479,14 +479,14 @@
assert(E->getLHS() && "Must have LHS for complex value");
ComplexPairTy LHS = Visit(E->getLHS());
- Builder.CreateBr(ContBlock);
LHSBlock = Builder.GetInsertBlock();
+ CGF.EmitBranch(ContBlock);
CGF.EmitBlock(RHSBlock);
ComplexPairTy RHS = Visit(E->getRHS());
- Builder.CreateBr(ContBlock);
RHSBlock = Builder.GetInsertBlock();
+ CGF.EmitBranch(ContBlock);
CGF.EmitBlock(ContBlock);