26 lines · c
1// Test this without pch.2// RUN: %clang_cc1 %s -Wunknown-pragmas -Werror -triple thumbv7-windows -fms-extensions -emit-llvm -include %s -o - | FileCheck %s3// RUN: %clang_cc1 %s -Wunknown-pragmas -Werror -triple x86_64-pc-win32 -fms-extensions -emit-llvm -include %s -o - | FileCheck %s4 5// Test with pch.6// RUN: %clang_cc1 %s -Wunknown-pragmas -Werror -triple thumbv7-windows -fms-extensions -emit-pch -o %t7// RUN: %clang_cc1 %s -Wunknown-pragmas -Werror -triple thumbv7-windows -fms-extensions -emit-llvm -include-pch %t -o - | FileCheck %s8// RUN: %clang_cc1 %s -Wunknown-pragmas -Werror -triple x86_64-pc-win32 -fms-extensions -emit-pch -o %t9// RUN: %clang_cc1 %s -Wunknown-pragmas -Werror -triple x86_64-pc-win32 -fms-extensions -emit-llvm -include-pch %t -o - | FileCheck %s10 11// The first run line creates a pch, and since at that point HEADER is not12// defined, the only thing contained in the pch is the pragma. The second line13// then includes that pch, so HEADER is defined and the actual code is compiled.14// The check then makes sure that the pragma is in effect in the file that15// includes the pch.16 17#ifndef HEADER18#define HEADER19#pragma comment(lib, "foo.lib")20 21#else22 23// CHECK: "/DEFAULTLIB:foo.lib"24 25#endif26