2019-03-06 10:50:46 +08:00
|
|
|
// RUN: rm -rf %t1 %t2
|
|
|
|
|
|
|
|
// Run with -verify, which onliy gets remarks from the main TU.
|
|
|
|
//
|
|
|
|
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t1 \
|
|
|
|
// RUN: -fdisable-module-hash -fsyntax-only -I%S/Inputs/Rmodule-import \
|
|
|
|
// RUN: -Rmodule-build -Rmodule-import -verify %s
|
|
|
|
|
|
|
|
// Run again, using FileCheck to check remarks from the module builds.
|
|
|
|
//
|
|
|
|
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t2 \
|
|
|
|
// RUN: -fdisable-module-hash -fsyntax-only -I%S/Inputs/Rmodule-import \
|
|
|
|
// RUN: -Rmodule-build -Rmodule-import %s 2>&1 |\
|
|
|
|
// RUN: FileCheck %s -implicit-check-not "remark:"
|
|
|
|
|
|
|
|
#include "A.h" // \
|
2019-03-06 13:42:56 +08:00
|
|
|
expected-remark-re{{building module 'A' as '{{.*[/\\]}}A.pcm'}} \
|
2019-03-06 10:50:46 +08:00
|
|
|
expected-remark{{finished building module 'A'}} \
|
2019-03-06 13:42:56 +08:00
|
|
|
expected-remark-re{{importing module 'A' from '{{.*[/\\]}}A.pcm'}} \
|
|
|
|
expected-remark-re{{importing module 'B' into 'A' from '{{.*[/\\]}}B.pcm'}} \
|
|
|
|
expected-remark-re{{importing module 'C' into 'B' from '{{.*[/\\]}}C.pcm'}}
|
2019-03-06 10:50:46 +08:00
|
|
|
// CHECK: remark: building module 'A'
|
|
|
|
// CHECK: remark: building module 'B'
|
|
|
|
// CHECK: remark: building module 'C'
|
|
|
|
// CHECK: remark: finished building module 'C'
|
2019-03-06 13:42:56 +08:00
|
|
|
// CHECK: remark: importing module 'C' from '{{.*[/\\]}}C.pcm'
|
2019-03-06 10:50:46 +08:00
|
|
|
// CHECK: remark: finished building module 'B'
|
2019-03-06 13:42:56 +08:00
|
|
|
// CHECK: remark: importing module 'B' from '{{.*[/\\]}}B.pcm'
|
|
|
|
// CHECK: remark: importing module 'C' into 'B' from '{{.*[/\\]}}C.pcm'
|
2019-03-06 10:50:46 +08:00
|
|
|
// CHECK: remark: finished building module 'A'
|
2019-03-06 13:42:56 +08:00
|
|
|
// CHECK: remark: importing module 'A' from '{{.*[/\\]}}A.pcm'
|
|
|
|
// CHECK: remark: importing module 'B' into 'A' from '{{.*[/\\]}}B.pcm'
|
|
|
|
// CHECK: remark: importing module 'C' into 'B' from '{{.*[/\\]}}C.pcm'
|
2019-03-06 10:50:46 +08:00
|
|
|
#include "B.h" // \
|
2019-03-06 13:42:56 +08:00
|
|
|
expected-remark-re{{importing module 'B' from '{{.*[/\\]}}B.pcm'}}
|
|
|
|
// CHECK: remark: importing module 'B' from '{{.*[/\\]}}B.pcm'
|
2019-03-06 10:50:46 +08:00
|
|
|
#include "C.h" // \
|
2019-03-06 13:42:56 +08:00
|
|
|
expected-remark-re{{importing module 'C' from '{{.*[/\\]}}C.pcm'}}
|
|
|
|
// CHECK: remark: importing module 'C' from '{{.*[/\\]}}C.pcm'
|
2019-03-06 10:50:46 +08:00
|
|
|
@import D; // \
|
2019-03-06 13:42:56 +08:00
|
|
|
expected-remark-re{{building module 'D' as '{{.*[/\\]}}D.pcm'}} \
|
2019-03-06 10:50:46 +08:00
|
|
|
expected-remark{{finished building module 'D'}} \
|
2019-03-06 13:42:56 +08:00
|
|
|
expected-remark-re{{importing module 'D' from '{{.*[/\\]}}D.pcm'}}
|
2019-03-06 10:50:46 +08:00
|
|
|
// CHECK: remark: building module 'D'
|
|
|
|
// CHECK: remark: finished building module 'D'
|
2019-03-06 13:42:56 +08:00
|
|
|
// CHECK: remark: importing module 'D' from '{{.*[/\\]}}D.pcm'
|