annotate clang/test/PCH/pragma-comment.c @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // Test this without pch.
anatofuz
parents:
diff changeset
2 // RUN: %clang_cc1 %s -Wunknown-pragmas -Werror -triple thumbv7-windows -fms-extensions -emit-llvm -include %s -o - | FileCheck %s
anatofuz
parents:
diff changeset
3 // RUN: %clang_cc1 %s -Wunknown-pragmas -Werror -triple x86_64-pc-win32 -fms-extensions -emit-llvm -include %s -o - | FileCheck %s
anatofuz
parents:
diff changeset
4
anatofuz
parents:
diff changeset
5 // Test with pch.
anatofuz
parents:
diff changeset
6 // RUN: %clang_cc1 %s -Wunknown-pragmas -Werror -triple thumbv7-windows -fms-extensions -emit-pch -o %t
anatofuz
parents:
diff changeset
7 // RUN: %clang_cc1 %s -Wunknown-pragmas -Werror -triple thumbv7-windows -fms-extensions -emit-llvm -include-pch %t -o - | FileCheck %s
anatofuz
parents:
diff changeset
8 // RUN: %clang_cc1 %s -Wunknown-pragmas -Werror -triple x86_64-pc-win32 -fms-extensions -emit-pch -o %t
anatofuz
parents:
diff changeset
9 // RUN: %clang_cc1 %s -Wunknown-pragmas -Werror -triple x86_64-pc-win32 -fms-extensions -emit-llvm -include-pch %t -o - | FileCheck %s
anatofuz
parents:
diff changeset
10
anatofuz
parents:
diff changeset
11 // The first run line creates a pch, and since at that point HEADER is not
anatofuz
parents:
diff changeset
12 // defined, the only thing contained in the pch is the pragma. The second line
anatofuz
parents:
diff changeset
13 // then includes that pch, so HEADER is defined and the actual code is compiled.
anatofuz
parents:
diff changeset
14 // The check then makes sure that the pragma is in effect in the file that
anatofuz
parents:
diff changeset
15 // includes the pch.
anatofuz
parents:
diff changeset
16
anatofuz
parents:
diff changeset
17 #ifndef HEADER
anatofuz
parents:
diff changeset
18 #define HEADER
anatofuz
parents:
diff changeset
19 #pragma comment(lib, "foo.lib")
anatofuz
parents:
diff changeset
20
anatofuz
parents:
diff changeset
21 #else
anatofuz
parents:
diff changeset
22
anatofuz
parents:
diff changeset
23 // CHECK: "/DEFAULTLIB:foo.lib"
anatofuz
parents:
diff changeset
24
anatofuz
parents:
diff changeset
25 #endif