From 3fa07dee94368643cdbc38fb24d8d2734b9bf42c Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Tue, 3 Sep 2019 22:27:27 +0000 Subject: Revert [Windows] Disable TrapUnreachable for Win64, add SEH_NoReturn This reverts r370525 (git commit 0bb1630685fba255fa93def92603f064c2ffd203) Also reverts r370543 (git commit 185ddc08eed6542781040b8499ef7ad15c8ae9f4) The approach I took only works for functions marked `noreturn`. In general, a call that is not known to be noreturn may be followed by unreachable for other reasons. For example, there could be multiple call sites to a function that throws sometimes, and at some call sites, it is known to always throw, so it is followed by unreachable. We need to insert an `int3` in these cases to pacify the Windows unwinder. I think this probably deserves its own standalone, Win64-only fixup pass that runs after block placement. Implementing that will take some time, so let's revert to TrapUnreachable in the mean time. llvm-svn: 370829 --- llvm/test/CodeGen/X86/empty-function.ll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/test/CodeGen/X86/empty-function.ll') diff --git a/llvm/test/CodeGen/X86/empty-function.ll b/llvm/test/CodeGen/X86/empty-function.ll index 7d908311ec8..92bebd0ab1a 100644 --- a/llvm/test/CodeGen/X86/empty-function.ll +++ b/llvm/test/CodeGen/X86/empty-function.ll @@ -15,7 +15,7 @@ entry: ; CHECK-LABEL: f: ; WIN32: nop -; WIN64: nop +; WIN64: ud2 ; LINUX-NOT: nop ; LINUX-NOT: ud2 -- cgit v1.2.3