summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/rebuild.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Modules/rebuild.m')
-rw-r--r--clang/test/Modules/rebuild.m17
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/Modules/rebuild.m b/clang/test/Modules/rebuild.m
index 53a1fff90bb..4d4d05529e7 100644
--- a/clang/test/Modules/rebuild.m
+++ b/clang/test/Modules/rebuild.m
@@ -25,4 +25,21 @@
// RUN: diff %t/Module.pcm %t/Module.pcm.saved.2
// RUN: not diff %t/DependsOnModule.pcm %t/DependsOnModule.pcm.saved
+// Rebuild Module, reset its timestamp, and verify its size hasn't changed
+// RUN: rm %t/Module.pcm
+// RUN: echo '@import Module;' | %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash -fsyntax-only -F %S/Inputs -x objective-c -
+// 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.
+// NOTE: if we change how the signature is created, this test may need updating.
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash -fsyntax-only -F %S/Inputs %s
+// RUN: diff %t/Module.pcm %t/Module.pcm.saved.2
+// RUN: not diff %t/DependsOnModule.pcm %t/DependsOnModule.pcm.saved
+
+#ifdef PREIMPORT
+@import Module;
+#endif
@import DependsOnModule;
OpenPOWER on IntegriCloud