[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:56 PDT 2026
================
@@ -9133,6 +9133,11 @@ def fno_modules_check_relocated
Group<f_Group>,
HelpText<"Skip checks for relocated modules when loading PCM files">,
MarshallingInfoNegativeFlag<PreprocessorOpts<"ModulesCheckRelocated">>;
+def fmodules_force_redundant_lookup
+ : Flag<["-"], "fmodules-force-redundant-lookup">,
+ Group<f_Group>,
+ HelpText<"Force redundant module lookup when loading PCM files">,
----------------
cyndyishida wrote:
I used the same language as `fno_modules_check_relocated` for the help text. The high-level point is that when the compiler needs to load a PCM because it's used in a TU compilation, it also looks for that module via header search. The side effect (optimization?) part is on the search for that module, it can discover the presence of other modules.
I used this flag name to discourage its use, so I don't particularly mind that it raises these kinds of questions.
https://github.com/llvm/llvm-project/pull/219107
More information about the cfe-commits
mailing list