1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/MC/COFF/linker-options.ll
Peter Collingbourne 54103de7c1 IR: Replace the "Linker Options" module flag with "llvm.linker.options" named metadata.
The new metadata is easier to manipulate than module flags.

Differential Revision: https://reviews.llvm.org/D31349

llvm-svn: 305227
2017-06-12 20:10:48 +00:00

20 lines
651 B
LLVM

; RUN: llc -O0 -mtriple=i386-pc-win32 -filetype=asm -o - %s | FileCheck %s
!0 = !{!"/DEFAULTLIB:msvcrt.lib"}
!1 = !{!"/DEFAULTLIB:msvcrt.lib", !"/DEFAULTLIB:secur32.lib"}
!2 = !{!"/DEFAULTLIB:\22C:\5Cpath to\5Casan_rt.lib\22"}
!3 = !{!"\22/with spaces\22"}
!llvm.linker.options = !{!0, !1, !2, !3}
define dllexport void @foo() {
ret void
}
; CHECK: .section .drectve,"yn"
; CHECK: .ascii " /DEFAULTLIB:msvcrt.lib"
; CHECK: .ascii " /DEFAULTLIB:msvcrt.lib"
; CHECK: .ascii " /DEFAULTLIB:secur32.lib"
; CHECK: .ascii " /DEFAULTLIB:\"C:\\path to\\asan_rt.lib\""
; CHECK: .ascii " \"/with spaces\""
; CHECK: .ascii " /EXPORT:_foo"