================
@@ -0,0 +1,21 @@
+// RUN: rm -rf %t
+// RUN: split-file %s %t
+
+// Verify a module that is built in the same session was looked up during a 
relocation 
+// check when forced. 
+
+// RUN: touch %t/session.timestamp
+// RUN: %clang -fmodules -fimplicit-module-maps -fsyntax-only %t/tu1.c \
+// RUN:   -fmodules-cache-path=%t/cache -I%t/include \
+// RUN:   -fbuild-session-file=%t/session.timestamp 
-fmodules-validate-once-per-build-session \
+// RUN:   -Xclang -fmodules-force-redundant-lookup -Rmodule-validation 2>&1 | 
FileCheck %s
+
+// CHECK: checking if module 'Dep' from '{{.*}}Dep-{{.*}}.pcm' has relocated
----------------
cyndyishida wrote:

Just acceptable because it's preexisting. In a well-behaved compilation, there 
should be no reason to validate a just-built module, so the default is not to. 
This is what I changed as part of supporting relocation checks. But a project 
not using explicit modules depends on this behavior.


So basically, before 
https://github.com/llvm/llvm-project/commit/cf8597bd3b87aeed6696454f22311e86ed70138f,
 relocation checks only happened on implicit modules and were not gated on 
build session flags. 

To be able to do this for dependency scans with reasonable perf traits, I added 
the build session gate generally, and that's what made a project break. 



https://github.com/llvm/llvm-project/pull/219107
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to