zig/deps/lld/test/COFF/lto-opt-level.ll
Andrew Kelley 4794281d64 embed LLD 5.0.0
This is 48aaa9f66120f72b5d7e4a90b32fee40a3386ce9 from the
git monorepo.
2017-08-27 17:46:59 -04:00

22 lines
703 B
LLVM

; RUN: llvm-as -o %t.obj %s
; RUN: lld-link /out:%t0.exe /entry:main /subsystem:console /opt:lldlto=0 /debug %t.obj
; RUN: llvm-nm %t0.exe | FileCheck --check-prefix=CHECK-O0 %s
; RUN: lld-link /out:%t2.exe /entry:main /subsystem:console /opt:lldlto=2 /debug %t.obj
; RUN: llvm-nm %t2.exe | FileCheck --check-prefix=CHECK-O2 %s
; RUN: lld-link /out:%t2a.exe /entry:main /subsystem:console /debug %t.obj
; RUN: llvm-nm %t2a.exe | FileCheck --check-prefix=CHECK-O2 %s
target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-windows-msvc"
; CHECK-O0: foo
; CHECK-O2-NOT: foo
define internal void @foo() {
ret void
}
define void @main() {
call void @foo()
ret void
}