24 lines · cpp
1// REQUIRES: host-supports-jit2// UNSUPPORTED: system-aix3//4// RUN: rm -rf %t5// RUN: mkdir -p %t6// RUN: split-file %s %t7//8// RUN: %clang -fmax-type-align=16 -Xclang -fdeprecated-macro -fno-stack-protector -Xclang -fwrapv -Xclang -fblocks -Xclang -fskip-odr-check-in-gmf -fexceptions -fcxx-exceptions -fgnuc-version=0 -target %host-jit-triple -Xclang -fblocks -Xclang -fmax-type-align=8 -Xclang -fincremental-extensions -Xclang -emit-pch -x c++-header -o %t/include.pch %t/include.hpp9//10// RUN: cat %t/main.cpp \11// RUN: | clang-repl -Xcc -fgnuc-version=0 -Xcc -fno-stack-protector -Xcc -fwrapv -Xcc -fblocks -Xcc -fskip-odr-check-in-gmf -Xcc -fmax-type-align=8 -Xcc -include-pch -Xcc %t/include.pch \12// RUN: | FileCheck %s13 14//--- include.hpp15 16int f_pch() { return 5; }17 18//--- main.cpp19 20extern "C" int printf(const char *, ...);21printf("f_pch = %d\n", f_pch());22 23// CHECK: f_pch = 524