aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCXXExpr.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-11-10 22:39:09 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-11-10 22:39:09 +0000
commit7f1de456fe6b6fb6d3fb8144df6173d2354f595a (patch)
treec9ec8c29e098eac40ec9fe666129c57cb3dc2a2f /lib/CodeGen/CGCXXExpr.cpp
parent69a2c268dbc2844bbdecfbbbb82602e6bb4bd1df (diff)
Fix for PR5454: make sure to use the right block as the predecessor in the
generated PHI node for the null check of a new operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86738 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCXXExpr.cpp')
-rw-r--r--lib/CodeGen/CGCXXExpr.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/CGCXXExpr.cpp b/lib/CodeGen/CGCXXExpr.cpp
index 2d62df6c58..8b0490fe32 100644
--- a/lib/CodeGen/CGCXXExpr.cpp
+++ b/lib/CodeGen/CGCXXExpr.cpp
@@ -218,6 +218,7 @@ llvm::Value *CodeGenFunction::EmitCXXNewExpr(const CXXNewExpr *E) {
if (NullCheckResult) {
Builder.CreateBr(NewEnd);
+ NewNotNull = Builder.GetInsertBlock();
EmitBlock(NewNull);
Builder.CreateBr(NewEnd);
EmitBlock(NewEnd);