1f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -triple i686-pc-win32 -fms-extensions -emit-llvm -o - | FileCheck %s 2f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -triple x86_64-pc-win32 -fms-extensions -emit-llvm -o - | FileCheck %s 3f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -triple i686-pc-linux -fms-extensions -emit-llvm -o - | FileCheck -check-prefix LINUX %s 4f4a2713aSLionel Sambuc 5f4a2713aSLionel Sambuc #pragma comment(lib, "msvcrt.lib") 6f4a2713aSLionel Sambuc #pragma comment(lib, "kernel32") 7f4a2713aSLionel Sambuc #pragma comment(lib, "USER32.LIB") 8f4a2713aSLionel Sambuc 9f4a2713aSLionel Sambuc #define BAR "2" 10f4a2713aSLionel Sambuc #pragma comment(linker," /bar=" BAR) 11f4a2713aSLionel Sambuc 12*0a6a1f1dSLionel Sambuc // CHECK: !llvm.module.flags = !{{{.*}}} 13*0a6a1f1dSLionel Sambuc // CHECK: !{{[0-9]+}} = !{i32 6, !"Linker Options", ![[link_opts:[0-9]+]]} 14*0a6a1f1dSLionel Sambuc // CHECK: ![[link_opts]] = !{![[msvcrt:[0-9]+]], ![[kernel32:[0-9]+]], ![[USER32:[0-9]+]], ![[bar:[0-9]+]]} 15*0a6a1f1dSLionel Sambuc // CHECK: ![[msvcrt]] = !{!"/DEFAULTLIB:msvcrt.lib"} 16*0a6a1f1dSLionel Sambuc // CHECK: ![[kernel32]] = !{!"/DEFAULTLIB:kernel32.lib"} 17*0a6a1f1dSLionel Sambuc // CHECK: ![[USER32]] = !{!"/DEFAULTLIB:USER32.LIB"} 18*0a6a1f1dSLionel Sambuc // CHECK: ![[bar]] = !{!" /bar=2"} 19f4a2713aSLionel Sambuc 20*0a6a1f1dSLionel Sambuc // LINUX: !{!"-lmsvcrt.lib"} 21*0a6a1f1dSLionel Sambuc // LINUX: !{!"-lkernel32"} 22*0a6a1f1dSLionel Sambuc // LINUX: !{!"-lUSER32.LIB"} 23*0a6a1f1dSLionel Sambuc // LINUX: !{!" /bar=2"} 24