diff options
| author | Reid Kleckner <reid@kleckner.net> | 2015-04-08 22:48:50 +0000 |
|---|---|---|
| committer | Reid Kleckner <reid@kleckner.net> | 2015-04-08 22:48:50 +0000 |
| commit | e5b064205ac22c0cd3ad67f317f0c5bbbbb53059 (patch) | |
| tree | 17c75f0196cd05352620f00da7bca181a311ace3 /clang/test | |
| parent | 31a1bb0c146aae195308b4b1c8154ba5aced80ce (diff) | |
| download | bcm5719-llvm-e5b064205ac22c0cd3ad67f317f0c5bbbbb53059.tar.gz bcm5719-llvm-e5b064205ac22c0cd3ad67f317f0c5bbbbb53059.zip | |
[WinEH] Don't wrap cleanups in terminate actions
_CxxFrameHandler3 calls terminate if a cleanup action throws, regardless
of what bits you put in the xdata tables. There's no need to model this
in the IR, since we just have to take it out later.
llvm-svn: 234448
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CodeGenCXX/microsoft-abi-eh-cleanups.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/microsoft-abi-eh-cleanups.cpp b/clang/test/CodeGenCXX/microsoft-abi-eh-cleanups.cpp index 642d8e23fa9..68f1430ace5 100644 --- a/clang/test/CodeGenCXX/microsoft-abi-eh-cleanups.cpp +++ b/clang/test/CodeGenCXX/microsoft-abi-eh-cleanups.cpp @@ -165,6 +165,29 @@ C::C() { foo(); } // WIN32: getelementptr inbounds i8, i8* %{{.*}}, i64 4 // WIN32-NOT: load // WIN32: bitcast i8* %{{.*}} to %"struct.crash_on_partial_destroy::A"* -// WIN32: invoke x86_thiscallcc void @"\01??1A@crash_on_partial_destroy@@UAE@XZ" +// WIN32: call x86_thiscallcc void @"\01??1A@crash_on_partial_destroy@@UAE@XZ" // WIN32: } } + +namespace dont_call_terminate { +struct C { + ~C(); +}; +void g(); +void f() { + C c; + g(); +} + +// WIN32-LABEL: define void @"\01?f@dont_call_terminate@@YAXXZ"() +// WIN32: invoke void @"\01?g@dont_call_terminate@@YAXXZ"() +// WIN32-NEXT: to label %[[cont:[^ ]*]] unwind label %[[lpad:[^ ]*]] +// +// WIN32: [[cont]] +// WIN32: call x86_thiscallcc void @"\01??1C@dont_call_terminate@@QAE@XZ"({{.*}}) +// +// WIN32: [[lpad]] +// WIN32-NEXT: landingpad +// WIN32-NEXT: cleanup +// WIN32: call x86_thiscallcc void @"\01??1C@dont_call_terminate@@QAE@XZ"({{.*}}) +} |

