Skip to content

Commit 8b6f77b

Browse files
16bit-ykikoclaude
andcommitted
chore: upgrade PCH hash comment from TODO to FIXME
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 67bccc3 commit 8b6f77b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/server/compiler.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)