summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2015-10-07 21:03:41 +0000
committerReid Kleckner <rnk@google.com>2015-10-07 21:03:41 +0000
commit1f88e93973024e8e59611553ad63fc913f6699e4 (patch)
treef7142c0d9a6a146fa08ddb2e88836a20ece8d738 /clang/test/CodeGenCXX
parent4462c6190e7164009bce6d6f0d2f37f14a41eabd (diff)
downloadbcm5719-llvm-1f88e93973024e8e59611553ad63fc913f6699e4.tar.gz
bcm5719-llvm-1f88e93973024e8e59611553ad63fc913f6699e4.zip
[WinEH] Don't use lifetime markers for MS catch parameters
We don't have a good place to put them. Our previous spot was causing us to optimize loads from the exception object to undef, because it was after the catchpad instruction that models the write to the catch object. llvm-svn: 249616
Diffstat (limited to 'clang/test/CodeGenCXX')
-rw-r--r--clang/test/CodeGenCXX/microsoft-abi-eh-catch.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/microsoft-abi-eh-catch.cpp b/clang/test/CodeGenCXX/microsoft-abi-eh-catch.cpp
index d14edf8986b..e742f8b1c4a 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-eh-catch.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-eh-catch.cpp
@@ -1,5 +1,6 @@
// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple=x86_64-pc-windows-msvc \
// RUN: -mconstructor-aliases -fexceptions -fcxx-exceptions -fnew-ms-eh \
+// RUN: -O1 -disable-llvm-optzns \
// RUN: | FileCheck -check-prefix WIN64 %s
extern "C" void might_throw();
@@ -47,8 +48,17 @@ extern "C" void catch_int() {
// WIN64-LABEL: define void @catch_int()
// WIN64: catchpad [%rtti.TypeDescriptor2* @"\01??_R0H@8", i32 0, i32* %[[e_addr:[^\]]*]]]
+//
+// The catchpad instruction starts the lifetime of 'e'. Unfortunately, that
+// leaves us with nowhere to put lifetime.start, so we don't emit lifetime
+// markers for now.
+// WIN64-NOT: lifetime.start
+//
// WIN64: %[[e_i8:[^ ]*]] = bitcast i32* %[[e_addr]] to i8*
-// WIN64: call void @handle_exception(i8* %[[e_i8]])
+// WIN64-NOT: lifetime.start
+// WIN64: call void @handle_exception
+// WIN64-SAME: (i8* %[[e_i8]])
+// WIN64-NOT: lifetime.end
// WIN64: catchret
extern "C" void catch_int_unnamed() {
OpenPOWER on IntegriCloud