[clang] [llvm] [clang][Modules][serialization] Deduplicate source location entries across loaded modules (PR #209795)

Ayokunle Amodu via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 1 03:47:16 PDT 2026


ayokunle321 wrote:

> Yes, I locally always build with all assertions enabled and we also have CI builds that run for every PR and every merged commit. I'm very certain that the failure wasn't there before.

Hi @hahnjo, you were right, I was building it wrong. Apologies!

Did some debugging and found the cause of the crash. The patch makes the local→global source-location map piecewise, but the inverse map used when re-serializing a loaded location was still a flat subtraction. This caused locations to do a a read-write-read round trip with an incorrect offset and eventually resolve into the wrong file.

The fix records the exact per-file amount added on the way in so the inverse subtracts the same thing.

It's now on the branch. Could you please try building again?

https://github.com/llvm/llvm-project/pull/209795


More information about the cfe-commits mailing list