Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / pragma-comment.c
bloba4746f5c47bf6b5246753b5342d2912bb1d5880c
1 // RUN: %clang_cc1 %s -triple i686-pc-win32 -fms-extensions -emit-llvm -o - | FileCheck %s
2 // RUN: %clang_cc1 %s -triple thumbv7-windows -fms-extensions -emit-llvm -o - | FileCheck %s
3 // RUN: %clang_cc1 %s -triple x86_64-pc-win32 -fms-extensions -emit-llvm -o - | FileCheck %s
4 // RUN: %clang_cc1 %s -triple thumbv7-linux-gnueabihf -fms-extensions -emit-llvm -o - | FileCheck -check-prefix ELF %s --implicit-check-not llvm.linker.options
5 // RUN: %clang_cc1 %s -triple i686-pc-linux -fms-extensions -emit-llvm -o - | FileCheck -check-prefix ELF %s --implicit-check-not llvm.linker.options
6 // RUN: %clang_cc1 %s -triple x86_64-scei-ps4 -fms-extensions -emit-llvm -o - | FileCheck -check-prefix ELF %s --implicit-check-not llvm.linker.options
7 // RUN: %clang_cc1 %s -triple x86_64-sie-ps5 -fms-extensions -emit-llvm -o - | FileCheck -check-prefix ELF %s --implicit-check-not llvm.linker.options
8 // RUN: %clang_cc1 %s -triple aarch64-windows-msvc -fms-extensions -emit-llvm -o - | FileCheck %s
10 #pragma comment(lib, "msvcrt.lib")
11 #pragma comment(lib, "kernel32")
12 #pragma comment(lib, "USER32.LIB")
13 #pragma comment(lib, "with space")
15 #define BAR "2"
16 #pragma comment(linker," /bar=" BAR)
17 #pragma comment(linker," /foo=\"foo bar\"")
19 // CHECK: !llvm.linker.options = !{![[msvcrt:[0-9]+]], ![[kernel32:[0-9]+]], ![[USER32:[0-9]+]], ![[space:[0-9]+]], ![[bar:[0-9]+]], ![[foo:[0-9]+]]}
20 // CHECK: ![[msvcrt]] = !{!"/DEFAULTLIB:msvcrt.lib"}
21 // CHECK: ![[kernel32]] = !{!"/DEFAULTLIB:kernel32.lib"}
22 // CHECK: ![[USER32]] = !{!"/DEFAULTLIB:USER32.LIB"}
23 // CHECK: ![[space]] = !{!"/DEFAULTLIB:\22with space.lib\22"}
24 // CHECK: ![[bar]] = !{!" /bar=2"}
25 // CHECK: ![[foo]] = !{!" /foo=\22foo bar\22"}
27 // ELF: !llvm.dependent-libraries = !{![[msvcrt:[0-9]+]], ![[kernel32:[0-9]+]], ![[USER32:[0-9]+]], ![[space:[0-9]+]]
28 // ELF: ![[msvcrt]] = !{!"msvcrt.lib"}
29 // ELF: ![[kernel32]] = !{!"kernel32"}
30 // ELF: ![[USER32]] = !{!"USER32.LIB"}
31 // ELF: ![[space]] = !{!"with space"}
32 // ELF-NOT: bar
33 // ELF-NOT: foo