1 // RUN: rm -rf %t 2 // RUN: split-file %s %t 3 // RUN: cd %t 4 // 5 // RUN: cp a1.h a.h 6 // RUN: %clang_cc1 -fmodules -fvalidate-ast-input-files-content -fno-pch-timestamp -fmodule-map-file=module.modulemap -fmodules-cache-path=%t test1.cpp 7 // RUN: cp a2.h a.h 8 // RUN: %clang_cc1 -fmodules -fvalidate-ast-input-files-content -fno-pch-timestamp -fmodule-map-file=module.modulemap -fmodules-cache-path=%t test2.cpp 9 10 //--- a1.h 11 #define FOO 12 13 //--- a2.h 14 #define BAR 15 16 //--- module.modulemap 17 module a { 18 header "a.h" 19 } 20 21 //--- test1.cpp 22 #include "a.h" 23 24 #ifndef FOO 25 #error foo 26 #endif 27 28 //--- test2.cpp 29 #include "a.h" 30 31 #ifndef BAR 32 #error bar 33 #endif 34