• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: rm -rf %t
2// RUN: mkdir %t
3// RUN: echo '// A' > %t/A.h
4// RUN: echo '#include "C.h"' > %t/B.h
5// RUN: echo '// C' > %t/C.h
6// RUN: echo 'module A { header "A.h" }' > %t/module.modulemap
7// RUN: echo 'module B { header "B.h" }' >> %t/module.modulemap
8// RUN: echo 'module C { header "C.h" }' >> %t/module.modulemap
9
10// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s -verify \
11// RUN:            -I %t -Rmodule-build
12
13@import A; // expected-remark{{building module 'A' as}} expected-remark {{finished building module 'A'}}
14@import B; // expected-remark{{building module 'B' as}} expected-remark {{finished building module 'B'}}
15@import A; // no diagnostic
16@import B; // no diagnostic
17
18// RUN: echo ' ' >> %t/C.h
19// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s -I %t \
20// RUN:            -Rmodule-build 2>&1 | FileCheck %s
21
22// RUN: echo ' ' >> %t/C.h
23// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s -I %t \
24// RUN:            -Reverything 2>&1 | FileCheck %s
25
26// RUN: echo ' ' >> %t/B.h
27// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s -I %t \
28// RUN:            2>&1 | FileCheck -allow-empty -check-prefix=NO-REMARKS %s
29
30// RUN: echo ' ' >> %t/B.h
31// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s -I %t \
32// RUN:            -Rmodule-build -Rno-everything 2>&1 | \
33// RUN:    FileCheck -allow-empty -check-prefix=NO-REMARKS %s
34
35// CHECK-NOT: building module 'A'
36// CHECK: building module 'B'
37// CHECK: building module 'C'
38// CHECK: finished building module 'C'
39// CHECK: finished building module 'B'
40// NO-REMARKS-NOT: building module 'A'
41// NO-REMARKS-NOT: building module 'B'
42