[clang] [clang][modules] Introduce a flag to keep redundant module lookups on relocation checks (PR #219107)

Cyndy Ishida via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 27 12:02:55 PDT 2026


================
@@ -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
+
+//--- include/module.modulemap
+module Dep { header "Dep.h" }
+//--- include/Dep.h
+int foo(void);
+
+//--- tu1.c
----------------
cyndyishida wrote:

no plans.

https://github.com/llvm/llvm-project/pull/219107


More information about the cfe-commits mailing list