[clang] [llvm] [modules] Accept equivalent module caches from different symlink (PR #90925)
Ellis Hoag via cfe-commits
cfe-commits at lists.llvm.org
Fri May 3 10:37:44 PDT 2024
================
@@ -839,17 +839,15 @@ static bool checkHeaderSearchOptions(const HeaderSearchOptions &HSOpts,
DiagnosticsEngine *Diags,
const LangOptions &LangOpts,
const PreprocessorOptions &PPOpts) {
- if (LangOpts.Modules) {
- if (SpecificModuleCachePath != ExistingModuleCachePath &&
- !PPOpts.AllowPCHWithDifferentModulesCachePath) {
- if (Diags)
- Diags->Report(diag::err_pch_modulecache_mismatch)
- << SpecificModuleCachePath << ExistingModuleCachePath;
- return true;
- }
- }
-
- return false;
+ if (!LangOpts.Modules || PPOpts.AllowPCHWithDifferentModulesCachePath ||
+ SpecificModuleCachePath == ExistingModuleCachePath ||
+ llvm::sys::fs::equivalent(SpecificModuleCachePath,
----------------
ellishg wrote:
Thanks for the advice. I realized that this does not handle the case where both paths are equal, but do not exist. In that case, no error will be thrown. Is that acceptable? I guess this was the case before this pr.
https://github.com/llvm/llvm-project/pull/90925
More information about the cfe-commits
mailing list