brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 5fe83a6 Raw
29 lines · cpp
1// expected-no-diagnostics2// Create PCH with #pragma hdrstop3// RUN: %clang_cc1 -verify -I %S -emit-pch -pch-through-hdrstop-create \4// RUN:   -fms-extensions -o %t.pch -x c++-header %s5 6// Create PCH object with #pragma hdrstop7// RUN: %clang_cc1 -verify -I %S -emit-obj -include-pch %t.pch \8// RUN:   -pch-through-hdrstop-create -fms-extensions -o %t.obj -x c++ %s9 10// Use PCH with #pragma hdrstop11// RUN: %clang_cc1 -verify -I %S -emit-obj -include-pch %t.pch \12// RUN:   -pch-through-hdrstop-use -fms-extensions -o %t.obj \13// RUN:   -x c++ %S/Inputs/pch-hdrstop-use.cpp14 15// Ensure the PCH stops at the hdrstop16// RUN: %clang_cc1 -ast-dump -I %S -include-pch %t.pch \17// RUN:   -pch-through-hdrstop-use -fms-extensions -o %t.obj \18// RUN:   -x c++ %S/Inputs/pch-hdrstop-use.cpp 2>&1 \19// RUN:   | FileCheck %S/Inputs/pch-hdrstop-use.cpp20 21#include "Inputs/pch-through1.h"22static int bar() { return 42; }23#include "Inputs/pch-through2.h"24int pch();25#pragma hdrstop26 27int pch() { return 42*42; }28int other() { return 42; }29