summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprCXX.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-11-23 03:01:14 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-11-23 03:01:14 +0000
commit67528eaacfdcd938ba75b1d9fc6074a5002ea486 (patch)
tree3853c8504a74c329df505d552c38053e0986f4ab /clang/lib/CodeGen/CGExprCXX.cpp
parent6f93df81058631a61f81e90f07a779ffa468df83 (diff)
downloadbcm5719-llvm-67528eaacfdcd938ba75b1d9fc6074a5002ea486.tar.gz
bcm5719-llvm-67528eaacfdcd938ba75b1d9fc6074a5002ea486.zip
[MS ABI] Tolerate invokes of __RTDynamicCast
The pointer returned by __RTDynamicCast must be bitcasted. However, it was not expected that __RTDynamicCast would be invoked, resulting in the bitcast occuring in a different BasicBlock than the invoke. This caused a down-stream PHI to get confused about which BasicBlock the incomming value was from. This fixes PR25606. llvm-svn: 253843
Diffstat (limited to 'clang/lib/CodeGen/CGExprCXX.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprCXX.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGExprCXX.cpp b/clang/lib/CodeGen/CGExprCXX.cpp
index 6565f8346fa..604cde76a7b 100644
--- a/clang/lib/CodeGen/CGExprCXX.cpp
+++ b/clang/lib/CodeGen/CGExprCXX.cpp
@@ -1904,6 +1904,7 @@ llvm::Value *CodeGenFunction::EmitDynamicCast(Address ThisAddr,
"destination type must be a record type!");
Value = CGM.getCXXABI().EmitDynamicCastCall(*this, ThisAddr, SrcRecordTy,
DestTy, DestRecordTy, CastEnd);
+ CastNotNull = Builder.GetInsertBlock();
}
if (ShouldNullCheckSrcValue) {
OpenPOWER on IntegriCloud