brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.6 KiB · f7727a6 Raw
68 lines · c
1// RUN: rm -rf %t1 %t2 %t-include2// RUN: mkdir %t-include3// RUN: echo 'module D { header "D.h" }' >> %t-include/module.modulemap4 5// Run with -verify, which onliy gets remarks from the main TU.6//7// RUN: echo '#define D 0' > %t-include/D.h8// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t1 \9// RUN:     -fdisable-module-hash -fsyntax-only \10// RUN:     -I%S/Inputs/implicit-invalidate-chain -I%t-include \11// RUN:     -Rmodule-build -Rmodule-import %s12// RUN: echo '#define D 11' > %t-include/D.h13// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t1 \14// RUN:     -fdisable-module-hash -fsyntax-only \15// RUN:     -I%S/Inputs/implicit-invalidate-chain -I%t-include \16// RUN:     -Rmodule-build -Rmodule-import -verify %s17 18// Run again, using FileCheck to check remarks from the module builds.  This is19// the key test: after the first attempt to import an out-of-date 'D', all the20// modules have been invalidated and are not imported again until they are21// rebuilt.22//23// RUN: echo '#define D 0' > %t-include/D.h24// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t2 \25// RUN:     -fdisable-module-hash -fsyntax-only \26// RUN:     -I%S/Inputs/implicit-invalidate-chain -I%t-include \27// RUN:     -Rmodule-build -Rmodule-import %s28// RUN: echo '#define D 11' > %t-include/D.h29// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t2 \30// RUN:     -fdisable-module-hash -fsyntax-only \31// RUN:     -I%S/Inputs/implicit-invalidate-chain -I%t-include \32// RUN:     -Rmodule-build -Rmodule-import %s 2>&1 |\33// RUN: FileCheck %s -implicit-check-not "remark:"34 35#include "A.h" // \36   expected-remark-re{{importing module 'A' from '{{.*[/\\]}}A.pcm'}} \37   expected-remark-re{{importing module 'B' into 'A' from '{{.*[/\\]}}B.pcm'}} \38   expected-remark-re{{importing module 'C' into 'B' from '{{.*[/\\]}}C.pcm'}} \39   expected-remark-re{{importing module 'D' into 'C' from '{{.*[/\\]}}D.pcm'}} \40   expected-remark-re{{building module 'A' as '{{.*[/\\]}}A.pcm'}} \41   expected-remark{{finished building module 'A'}} \42   expected-remark-re{{importing module 'A' from '{{.*[/\\]}}A.pcm'}} \43   expected-remark-re{{importing module 'B' into 'A' from '{{.*[/\\]}}B.pcm'}} \44   expected-remark-re{{importing module 'C' into 'B' from '{{.*[/\\]}}C.pcm'}} \45   expected-remark-re{{importing module 'D' into 'C' from '{{.*[/\\]}}D.pcm'}}46// CHECK: remark: importing module 'A' from '{{.*[/\\]}}A.pcm'47// CHECK: remark: importing module 'B' into 'A' from '{{.*[/\\]}}B.pcm'48// CHECK: remark: importing module 'C' into 'B' from '{{.*[/\\]}}C.pcm'49// CHECK: remark: importing module 'D' into 'C' from '{{.*[/\\]}}D.pcm'50// CHECK: remark: building module 'A'51// CHECK: remark: building module 'B'52// CHECK: remark: building module 'C'53// CHECK: remark: building module 'D'54// CHECK: remark: finished building module 'D'55// CHECK: remark: importing module 'D' from '{{.*[/\\]}}D.pcm'56// CHECK: remark: finished building module 'C'57// CHECK: remark: importing module 'C' from '{{.*[/\\]}}C.pcm'58// CHECK: remark: importing module 'D' into 'C' from '{{.*[/\\]}}D.pcm'59// CHECK: remark: finished building module 'B'60// CHECK: remark: importing module 'B' from '{{.*[/\\]}}B.pcm'61// CHECK: remark: importing module 'C' into 'B' from '{{.*[/\\]}}C.pcm'62// CHECK: remark: importing module 'D' into 'C' from '{{.*[/\\]}}D.pcm'63// CHECK: remark: finished building module 'A'64// CHECK: remark: importing module 'A' from '{{.*[/\\]}}A.pcm'65// CHECK: remark: importing module 'B' into 'A' from '{{.*[/\\]}}B.pcm'66// CHECK: remark: importing module 'C' into 'B' from '{{.*[/\\]}}C.pcm'67// CHECK: remark: importing module 'D' into 'C' from '{{.*[/\\]}}D.pcm'68