File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -445,11 +445,11 @@ et::task<bool> Compiler::ensure_pch(Session& session,
445445 co_return true ;
446446 }
447447
448- // Hash only the preamble text. This allows files with identical preambles
449- // to share the same PCH file (content-addressed). Compile flags are NOT
450- // included because preamble content is what determines the PCH output.
451- // TODO: consider hashing flags that affect preprocessing (e.g. -D, -I)
452- // for correctness when files have same preamble text but different flags .
448+ // FIXME: hash should also include compile flags that affect preprocessing
449+ // (e.g. -D, -I, -isystem, -std) so that files with the same preamble text
450+ // but different flags produce separate PCHs. Currently only the preamble
451+ // text is hashed — the source file path must be excluded from the hash
452+ // to allow sharing across files with identical preambles .
453453 auto preamble_text = llvm::StringRef (text).substr (0 , bound);
454454 auto preamble_hash = llvm::xxh3_64bits (preamble_text);
455455
You can’t perform that action at this time.
0 commit comments