diff options
author | David Majnemer <david.majnemer@gmail.com> | 2015-03-06 23:45:20 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2015-03-06 23:45:20 +0000 |
commit | d3d7669cedc58bec2a320317b68456cbfceb127c (patch) | |
tree | 51974fbee537fd173b783fdafb04f6d8ce7d914c /clang/test/CodeGenCXX | |
parent | 6661a67d50d240a9a1cd882cf5fb312144499a56 (diff) | |
download | bcm5719-llvm-d3d7669cedc58bec2a320317b68456cbfceb127c.tar.gz bcm5719-llvm-d3d7669cedc58bec2a320317b68456cbfceb127c.zip |
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.
llvm-svn: 231533
Diffstat (limited to 'clang/test/CodeGenCXX')
-rw-r--r-- | clang/test/CodeGenCXX/microsoft-abi-throw.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/microsoft-abi-throw.cpp b/clang/test/CodeGenCXX/microsoft-abi-throw.cpp index f0151c5d39b..ec63d01da7b 100644 --- a/clang/test/CodeGenCXX/microsoft-abi-throw.cpp +++ b/clang/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; } |