2014-10-24 02:05:36 +08:00
|
|
|
// RUN: rm -rf %t
|
|
|
|
|
|
|
|
// Build Module and set its timestamp
|
2015-06-16 08:08:24 +08:00
|
|
|
// 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 -
|
2014-10-24 02:05:36 +08:00
|
|
|
// RUN: touch -m -a -t 201101010000 %t/Module.pcm
|
|
|
|
// RUN: cp %t/Module.pcm %t/Module.pcm.saved
|
|
|
|
// RUN: wc -c %t/Module.pcm > %t/Module.size.saved
|
|
|
|
|
|
|
|
// Build DependsOnModule
|
2015-06-16 08:08:24 +08:00
|
|
|
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash -fsyntax-only -F %S/Inputs %s
|
2014-10-24 02:05:36 +08:00
|
|
|
// RUN: diff %t/Module.pcm %t/Module.pcm.saved
|
|
|
|
// RUN: cp %t/DependsOnModule.pcm %t/DependsOnModule.pcm.saved
|
|
|
|
|
|
|
|
// Rebuild Module, reset its timestamp, and verify its size hasn't changed
|
|
|
|
// RUN: rm %t/Module.pcm
|
2015-06-16 08:08:24 +08:00
|
|
|
// 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 -
|
2014-10-24 02:05:36 +08:00
|
|
|
// RUN: touch -m -a -t 201101010000 %t/Module.pcm
|
|
|
|
// RUN: wc -c %t/Module.pcm > %t/Module.size
|
|
|
|
// RUN: diff %t/Module.size %t/Module.size.saved
|
|
|
|
// RUN: cp %t/Module.pcm %t/Module.pcm.saved.2
|
|
|
|
|
2017-03-14 02:45:08 +08:00
|
|
|
// The signature is the hash of the PCM content, we will not rebuild rebuild DependsOnModule.
|
2015-06-16 08:08:24 +08:00
|
|
|
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash -fsyntax-only -F %S/Inputs %s
|
2014-10-24 02:05:36 +08:00
|
|
|
// RUN: diff %t/Module.pcm %t/Module.pcm.saved.2
|
2017-03-14 02:45:08 +08:00
|
|
|
// RUN: diff %t/DependsOnModule.pcm %t/DependsOnModule.pcm.saved
|
2014-10-24 02:05:36 +08:00
|
|
|
|
2014-11-08 08:34:30 +08:00
|
|
|
// Rebuild Module, reset its timestamp, and verify its size hasn't changed
|
|
|
|
// RUN: rm %t/Module.pcm
|
2015-06-16 08:08:24 +08:00
|
|
|
// 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 -
|
2014-11-08 08:34:30 +08:00
|
|
|
// RUN: touch -m -a -t 201101010000 %t/Module.pcm
|
|
|
|
// RUN: wc -c %t/Module.pcm > %t/Module.size
|
|
|
|
// RUN: diff %t/Module.size %t/Module.size.saved
|
|
|
|
// RUN: cp %t/Module.pcm %t/Module.pcm.saved.2
|
|
|
|
|
|
|
|
// Verify again with Module pre-imported.
|
2015-06-16 08:08:24 +08:00
|
|
|
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash -fsyntax-only -F %S/Inputs %s
|
2014-11-08 08:34:30 +08:00
|
|
|
// RUN: diff %t/Module.pcm %t/Module.pcm.saved.2
|
2017-03-14 02:45:08 +08:00
|
|
|
// RUN: diff %t/DependsOnModule.pcm %t/DependsOnModule.pcm.saved
|
2014-11-08 08:34:30 +08:00
|
|
|
|
|
|
|
#ifdef PREIMPORT
|
|
|
|
@import Module;
|
|
|
|
#endif
|
2014-10-24 02:05:36 +08:00
|
|
|
@import DependsOnModule;
|