summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/microsoft-abi-try-throw.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2015-09-16 20:15:55 +0000
committerReid Kleckner <rnk@google.com>2015-09-16 20:15:55 +0000
commit837f189b75742d1a7c18e4664722c815043eeda7 (patch)
treecf56c51bff91e52c1ea13e9fed4d672f5b0346f5 /test/CodeGenCXX/microsoft-abi-try-throw.cpp
parent911a7794522f96206fcd315f215cb4c3cffb9e71 (diff)
[WinEH] Pass the catch adjectives to catchpad directly
This avoids building a fake LLVM IR global variable just to ferry an i32 down into LLVM codegen. It also puts a nail in the coffin of using MS ABI C++ EH with landingpads, since now we'll assert in the lpad code when flags are present. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247843 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/microsoft-abi-try-throw.cpp')
-rw-r--r--test/CodeGenCXX/microsoft-abi-try-throw.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/test/CodeGenCXX/microsoft-abi-try-throw.cpp b/test/CodeGenCXX/microsoft-abi-try-throw.cpp
index 93d6a689ce..b87d9e1ad4 100644
--- a/test/CodeGenCXX/microsoft-abi-try-throw.cpp
+++ b/test/CodeGenCXX/microsoft-abi-try-throw.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 -mconstructor-aliases -fcxx-exceptions -fexceptions -fno-rtti -DTRY | FileCheck %s -check-prefix=TRY
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 -mconstructor-aliases -fcxx-exceptions -fexceptions -fno-rtti -DTRY -fnew-ms-eh | FileCheck %s -check-prefix=TRY
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 -mconstructor-aliases -fcxx-exceptions -fexceptions -fno-rtti -DTHROW | FileCheck %s -check-prefix=THROW
// THROW-DAG: @"\01??_R0H@8" = linkonce_odr global %rtti.TypeDescriptor2 { i8** @"\01??_7type_info@@6B@", i8* null, [3 x i8] c".H\00" }, comdat
@@ -6,8 +6,6 @@
// THROW-DAG: @_CTA1H = linkonce_odr unnamed_addr constant %eh.CatchableTypeArray.1 { i32 1, [1 x %eh.CatchableType*] [%eh.CatchableType* @"_CT??_R0H@84"] }, section ".xdata", comdat
// THROW-DAG: @_TI1H = linkonce_odr unnamed_addr constant %eh.ThrowInfo { i32 0, i8* null, i8* null, i8* bitcast (%eh.CatchableTypeArray.1* @_CTA1H to i8*) }, section ".xdata", comdat
-// TRY-DAG: @llvm.eh.handlertype.PAH.1 = private unnamed_addr constant %eh.CatchHandlerType { i32 1, i8* bitcast (%rtti.TypeDescriptor4* @"\01??_R0PAH@8" to i8*) }, section "llvm.metadata"
-
void external();
inline void not_emitted() {
@@ -21,8 +19,8 @@ int main() {
external(); // TRY: invoke void @"\01?external@@YAXXZ"
} catch (int) {
rv = 1;
- // TRY: call void @llvm.eh.begincatch(i8* %{{.*}}, i8* null)
- // TRY: call void @llvm.eh.endcatch()
+ // TRY: catchpad [%rtti.TypeDescriptor2* @"\01??_R0H@8", i32 0, i8* null]
+ // TRY: catchret
}
#endif
#ifdef THROW
@@ -41,7 +39,7 @@ void qual_catch() {
external();
} catch (const int *) {
}
- // TRY: catch %eh.CatchHandlerType* @llvm.eh.handlertype.PAH.1
- // TRY: call i32 @llvm.eh.typeid.for(i8* bitcast (%eh.CatchHandlerType* @llvm.eh.handlertype.PAH.1 to i8*))
+ // TRY: catchpad [%rtti.TypeDescriptor4* @"\01??_R0PAH@8", i32 1, i8* null]
+ // TRY: catchret
}
#endif