[PATCH] D20124: [PCH] Serialize skipped preprocessor ranges

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 17 07:11:07 PST 2017


ilya-biryukov added a comment.

In https://reviews.llvm.org/D20124#927967, @cameron314 wrote:

> Well, it seems like preamble PCH source location translation is fundamentally broken. The entry file has a single, positive file ID. The preamble PCH is treated as an imported module, so it has a negative file ID for the part that overlaps the preamble of the entry file. That means locations in the preamble part of the entry file can have two different file IDs depending on how they are arrived at.
>
> I really don't know how to fix this. Any ideas?


Why do we store raw source locations in `PPSkippedRange`? Would storing `SourceLocation` and using  `ASTWriter::AddSourceLocation` and `ASTReader:: ReadSourceLocation` do the trick?


https://reviews.llvm.org/D20124





More information about the cfe-commits mailing list