summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/microsoft-abi-try-throw.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenCXX/microsoft-abi-try-throw.cpp')
-rw-r--r--clang/test/CodeGenCXX/microsoft-abi-try-throw.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/microsoft-abi-try-throw.cpp b/clang/test/CodeGenCXX/microsoft-abi-try-throw.cpp
index 5af1b0b479f..8484ef18d30 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-try-throw.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-try-throw.cpp
@@ -1,6 +1,11 @@
// 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 -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
+// THROW-DAG: @"_CT??_R0H@84" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*), i32 0, i32 -1, i32 0, i32 4, i8* null }, comdat
+// THROW-DAG: @_CTA1H = linkonce_odr unnamed_addr constant %eh.CatchableTypeArray.1 { i32 1, [1 x %eh.CatchableType*] [%eh.CatchableType* @"_CT??_R0H@84"] }, 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*) }, comdat
+
void external();
inline void not_emitted() {
@@ -19,7 +24,9 @@ int main() {
}
#endif
#ifdef THROW
- // THROW: call void @"\01?terminate@@YAXXZ"
+ // THROW: store i32 42, i32* %[[mem_for_throw:.*]]
+ // THROW: %[[cast:.*]] = bitcast i32* %[[mem_for_throw]] to i8*
+ // THROW: call void @_CxxThrowException(i8* %[[cast]], %eh.ThrowInfo* @_TI1H)
throw int(42);
#endif
return rv;
OpenPOWER on IntegriCloud