David Blaikie | 1deeedb | 2012-09-19 18:46:03 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -triple x86_64-none-linux-gnu -emit-llvm -fcxx-exceptions -fexceptions -std=c++11 -o - | FileCheck %s |
Eli Friedman | ea66f9f | 2012-08-02 00:10:24 +0000 | [diff] [blame] | 2 | // PR13359 |
| 3 | |
| 4 | struct X { |
| 5 | ~X(); |
| 6 | }; |
| 7 | struct Error { |
| 8 | Error(const X&) noexcept; |
| 9 | }; |
| 10 | |
| 11 | void f() { |
| 12 | try { |
| 13 | throw Error(X()); |
| 14 | } catch (...) { } |
| 15 | } |
| 16 | |
| 17 | // CHECK: define void @_Z1fv |
| 18 | // CHECK: call void @_ZN5ErrorC1ERK1X |
| 19 | // CHECK: invoke void @__cxa_throw |
| 20 | // CHECK: landingpad |
| 21 | // CHECK: call void @_ZN1XD1Ev |
| 22 | // CHECK-NOT: __cxa_free_exception |