2013-05-10 05:10:06 +08:00
|
|
|
// RUN: %clang_cc1 %s -triple i686-pc-win32 -fms-extensions -emit-llvm -o - | FileCheck %s
|
2016-06-23 21:45:33 +08:00
|
|
|
// RUN: %clang_cc1 %s -triple thumbv7-windows -fms-extensions -emit-llvm -o - | FileCheck %s
|
2013-05-10 05:10:06 +08:00
|
|
|
// RUN: %clang_cc1 %s -triple x86_64-pc-win32 -fms-extensions -emit-llvm -o - | FileCheck %s
|
2016-06-23 21:45:33 +08:00
|
|
|
// RUN: %clang_cc1 %s -triple thumbv7-linux-gnueabihf -fms-extensions -emit-llvm -o - | FileCheck -check-prefix LINUX %s
|
2013-05-10 05:10:06 +08:00
|
|
|
// RUN: %clang_cc1 %s -triple i686-pc-linux -fms-extensions -emit-llvm -o - | FileCheck -check-prefix LINUX %s
|
2015-01-29 02:26:15 +08:00
|
|
|
// RUN: %clang_cc1 %s -triple x86_64-scei-ps4 -fms-extensions -emit-llvm -o - | FileCheck -check-prefix PS4 %s
|
2013-05-10 05:10:06 +08:00
|
|
|
|
|
|
|
#pragma comment(lib, "msvcrt.lib")
|
2013-05-24 23:06:56 +08:00
|
|
|
#pragma comment(lib, "kernel32")
|
|
|
|
#pragma comment(lib, "USER32.LIB")
|
2015-02-16 19:57:43 +08:00
|
|
|
#pragma comment(lib, "with space")
|
2013-05-10 05:10:06 +08:00
|
|
|
|
|
|
|
#define BAR "2"
|
|
|
|
#pragma comment(linker," /bar=" BAR)
|
2015-02-16 19:57:43 +08:00
|
|
|
#pragma comment(linker," /foo=\"foo bar\"")
|
2013-05-10 05:10:06 +08:00
|
|
|
|
2014-06-20 00:10:21 +08:00
|
|
|
// CHECK: !llvm.module.flags = !{{{.*}}}
|
2014-12-16 03:10:08 +08:00
|
|
|
// CHECK: !{{[0-9]+}} = !{i32 6, !"Linker Options", ![[link_opts:[0-9]+]]}
|
2015-02-16 19:57:43 +08:00
|
|
|
// CHECK: ![[link_opts]] = !{![[msvcrt:[0-9]+]], ![[kernel32:[0-9]+]], ![[USER32:[0-9]+]], ![[space:[0-9]+]], ![[bar:[0-9]+]], ![[foo:[0-9]+]]}
|
2014-12-16 03:10:08 +08:00
|
|
|
// CHECK: ![[msvcrt]] = !{!"/DEFAULTLIB:msvcrt.lib"}
|
|
|
|
// CHECK: ![[kernel32]] = !{!"/DEFAULTLIB:kernel32.lib"}
|
|
|
|
// CHECK: ![[USER32]] = !{!"/DEFAULTLIB:USER32.LIB"}
|
2015-02-16 19:57:43 +08:00
|
|
|
// CHECK: ![[space]] = !{!"/DEFAULTLIB:\22with space.lib\22"}
|
2014-12-16 03:10:08 +08:00
|
|
|
// CHECK: ![[bar]] = !{!" /bar=2"}
|
2015-02-16 19:57:43 +08:00
|
|
|
// CHECK: ![[foo]] = !{!" /foo=\22foo bar\22"}
|
2013-05-10 05:10:06 +08:00
|
|
|
|
2014-12-16 03:10:08 +08:00
|
|
|
// LINUX: !{!"-lmsvcrt.lib"}
|
|
|
|
// LINUX: !{!"-lkernel32"}
|
|
|
|
// LINUX: !{!"-lUSER32.LIB"}
|
|
|
|
// LINUX: !{!" /bar=2"}
|
2015-01-29 02:26:15 +08:00
|
|
|
|
|
|
|
// PS4: !{!"\01msvcrt.lib"}
|
|
|
|
// PS4: !{!"\01kernel32"}
|
|
|
|
// PS4: !{!"\01USER32.LIB"}
|
2015-07-21 01:46:56 +08:00
|
|
|
// PS4: !{!"\01\22with space\22"}
|