1 // Test macro preservation in C++20 Header Units.
5 // RUN: split-file %s %t
8 // Produce a pre-processed file.
9 // RUN: %clang_cc1 -std=c++20 -E -xc++-user-header hu-01.h -o hu-01.iih
11 // consume that to produce the heder unit.
12 // RUN: %clang_cc1 -std=c++20 -emit-header-unit \
13 // RUN: -xc++-header-unit-header-cpp-output hu-01.iih -o hu-01.pcm
15 // check that the header unit is named for the original file, not the .iih.
16 // RUN: %clang_cc1 -std=c++20 -module-file-info hu-01.pcm | \
17 // RUN: FileCheck --check-prefix=CHECK-HU %s -DTDIR=%t
26 #define SHOULD_NOT_BE_DEFINED -1
27 #undef SHOULD_NOT_BE_DEFINED
31 // CHECK-HU: ====== C++20 Module structure ======
32 // CHECK-HU-NEXT: Header Unit '.{{/|\\\\?}}hu-01.h' is the Primary Module at index #1