Hans Wennborg | 9b9a535 | 2017-04-21 21:48:41 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -mtriple=i686-pc-win32 | FileCheck -check-prefix=CHECK -check-prefix=WIN32 %s |
| 2 | ; RUN: llc < %s -mtriple=x86_64-pc-win32 | FileCheck -check-prefix=CHECK -check-prefix=WIN64 %s |
| 3 | ; RUN: llc < %s -mtriple=i386-linux-gnu | FileCheck -check-prefix=LINUX %s |
| 4 | |
| 5 | target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32" |
| 6 | target triple = "i686-pc-windows-msvc18.0.0" |
| 7 | |
| 8 | ; Don't emit empty functions on Windows; it can lead to duplicate entries |
| 9 | ; (multiple functions sharing the same RVA) in the Guard CF Function Table which |
| 10 | ; the kernel refuses to load. |
| 11 | |
| 12 | define void @f() { |
| 13 | entry: |
| 14 | unreachable |
| 15 | |
| 16 | ; CHECK-LABEL: f: |
| 17 | ; WIN32: nop |
| 18 | ; WIN64: ud2 |
| 19 | ; LINUX-NOT: nop |
| 20 | ; LINUX-NOT: ud2 |
| 21 | |
| 22 | } |