summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/microsoft-abi-throw.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-03-13 18:26:17 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-03-13 18:26:17 +0000
commitb986906ec94130fe363fe7ed42b336219e35fb9e (patch)
treebb162a76402326d701140cb36f45b8308d338612 /test/CodeGenCXX/microsoft-abi-throw.cpp
parenta6eaa6b50b02278eacfb52504ad4a1a04a0bf00e (diff)
MS ABI: Implement __GetExceptionInfo for std::make_exception_ptr
std::make_exception_ptr calls std::__GetExceptionInfo in order to figure out how to properly copy the exception object. Differential Revision: http://reviews.llvm.org/D8280 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@232188 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/microsoft-abi-throw.cpp')
-rw-r--r--test/CodeGenCXX/microsoft-abi-throw.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/CodeGenCXX/microsoft-abi-throw.cpp b/test/CodeGenCXX/microsoft-abi-throw.cpp
index 8e7231ba63..080a98e0d9 100644
--- a/test/CodeGenCXX/microsoft-abi-throw.cpp
+++ b/test/CodeGenCXX/microsoft-abi-throw.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -o - -triple=i386-pc-win32 -std=c++11 %s -fcxx-exceptions | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -o - -triple=i386-pc-win32 -std=c++11 %s -fcxx-exceptions -fms-extensions | FileCheck %s
// CHECK-DAG: @"\01??_R0?AUY@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"\01??_7type_info@@6B@", i8* null, [8 x i8] c".?AUY@@\00" }, comdat
// CHECK-DAG: @"_CT??_R0?AUY@@@8??0Y@@QAE@ABU0@@Z8" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 4, i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUY@@@8" to i8*), i32 0, i32 -1, i32 0, i32 8, i8* bitcast (%struct.Y* (%struct.Y*, %struct.Y*, i32)* @"\01??0Y@@QAE@ABU0@@Z" to i8*) }, section ".xdata", comdat
@@ -89,6 +89,18 @@ void j(TemplateWithDefault &twd) {
throw twd;
}
+
void h() {
throw nullptr;
}
+
+namespace std {
+template <typename T>
+void *__GetExceptionInfo(T);
+}
+
+void *GetExceptionInfo_test0() {
+// CHECK-LABEL: @"\01?GetExceptionInfo_test0@@YAPAXXZ"
+// CHECK: ret i8* bitcast (%eh.ThrowInfo* @_TI1H to i8*)
+ return std::__GetExceptionInfo(0);
+}