aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/microsoft-abi-throw.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-03-06 23:45:20 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-03-06 23:45:20 +0000
commita6e301dd4153ad7bfef61da0304fa57ad92032ab (patch)
treefbbc7e820aac0c470f444d3edfe105987b5d588d /test/CodeGenCXX/microsoft-abi-throw.cpp
parentfe85506967c38cad114ef2014c363b7b14ca81c8 (diff)
MS ABI: Correctly generate throw-info for pointer to const qual types
We didn't create type info based on the unqualified pointee type, causing RTTI mismatches. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231533 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/microsoft-abi-throw.cpp')
-rw-r--r--test/CodeGenCXX/microsoft-abi-throw.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/CodeGenCXX/microsoft-abi-throw.cpp b/test/CodeGenCXX/microsoft-abi-throw.cpp
index f0151c5d39..ec63d01da7 100644
--- a/test/CodeGenCXX/microsoft-abi-throw.cpp
+++ b/test/CodeGenCXX/microsoft-abi-throw.cpp
@@ -26,6 +26,12 @@ void f(const Y &y) {
// CHECK-LABEL: @"\01?f@@YAXABUY@@@Z"
// CHECK: call x86_thiscallcc %struct.Y* @"\01??0Y@@QAE@ABU0@@Z"(%struct.Y* %[[mem:.*]], %struct.Y*
// CHECK: %[[cast:.*]] = bitcast %struct.Y* %[[mem]] to i8*
- // CHECK: call void @_CxxThrowException(i8* %[[cast]], %eh.ThrowInfo* @"_TI5?AUY@@") #4
+ // CHECK: call void @_CxxThrowException(i8* %[[cast]], %eh.ThrowInfo* @"_TI5?AUY@@")
+ throw y;
+}
+
+void g(const int *const *y) {
+ // CHECK-LABEL: @"\01?g@@YAXPBQBH@Z"
+ // CHECK: call void @_CxxThrowException(i8* %{{.*}}, %eh.ThrowInfo* @_TIC2PAPBH)
throw y;
}