brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · 150c2ce Raw
44 lines · plain
1// RUN: rm -rf %t2 3// Build Module and set its timestamp4// RUN: echo '@import Module;' | %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash -fsyntax-only -F %S/Inputs -x objective-c -5// RUN: touch -m -a -t 201101010000 %t/Module.pcm6// RUN: cp %t/Module.pcm %t/Module.pcm.saved7// RUN: wc -c %t/Module.pcm > %t/Module.size.saved8 9// Build DependsOnModule10// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash -fsyntax-only -F %S/Inputs %s11// RUN: diff %t/Module.pcm %t/Module.pcm.saved12// RUN: cp %t/DependsOnModule.pcm %t/DependsOnModule.pcm.saved13 14// Rebuild Module, reset its timestamp, and verify its size hasn't changed15// RUN: rm %t/Module.pcm16// RUN: echo '@import Module;' | %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash -fsyntax-only -F %S/Inputs -x objective-c -17// RUN: touch -m -a -t 201101010000 %t/Module.pcm18// RUN: wc -c %t/Module.pcm > %t/Module.size19// RUN: diff %t/Module.size %t/Module.size.saved20// RUN: cp %t/Module.pcm %t/Module.pcm.saved.221 22// The signature is the hash of the PCM content, we will not rebuild rebuild DependsOnModule.23// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash -fsyntax-only -F %S/Inputs %s24// RUN: diff %t/Module.pcm %t/Module.pcm.saved.225// RUN: diff %t/DependsOnModule.pcm %t/DependsOnModule.pcm.saved26 27// Rebuild Module, reset its timestamp, and verify its size hasn't changed28// RUN: rm %t/Module.pcm29// RUN: echo '@import Module;' | %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash -fsyntax-only -F %S/Inputs -x objective-c -30// RUN: touch -m -a -t 201101010000 %t/Module.pcm31// RUN: wc -c %t/Module.pcm > %t/Module.size32// RUN: diff %t/Module.size %t/Module.size.saved33// RUN: cp %t/Module.pcm %t/Module.pcm.saved.234 35// Verify again with Module pre-imported.36// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash -fsyntax-only -F %S/Inputs %s37// RUN: diff %t/Module.pcm %t/Module.pcm.saved.238// RUN: diff %t/DependsOnModule.pcm %t/DependsOnModule.pcm.saved39 40#ifdef PREIMPORT41@import Module;42#endif43@import DependsOnModule;44