34 lines · cpp
1// RUN: rm -rf %t2// RUN: split-file %s %t3// RUN: cd %t4//5// RUN: cp a1.h a.h6// RUN: %clang_cc1 -fmodules -fvalidate-ast-input-files-content -fno-pch-timestamp -fmodule-map-file=module.modulemap -fmodules-cache-path=%t test1.cpp7// RUN: cp a2.h a.h8// RUN: %clang_cc1 -fmodules -fvalidate-ast-input-files-content -fno-pch-timestamp -fmodule-map-file=module.modulemap -fmodules-cache-path=%t test2.cpp9 10//--- a1.h11#define FOO12 13//--- a2.h14#define BAR15 16//--- module.modulemap17module a {18 header "a.h"19}20 21//--- test1.cpp22#include "a.h"23 24#ifndef FOO25#error foo26#endif27 28//--- test2.cpp29#include "a.h"30 31#ifndef BAR32#error bar33#endif34