[llvm-branch-commits] [clang] [Serialization] Code cleanups and polish 83233 (PR #83237)

Richard Smith via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Sep 6 11:28:13 PDT 2024


zygoloid wrote:

> what the code does is: when we write a on-disk hash table, try to write the imported merged hash table in the same process so that we don't need to read these tables again. However, in line 329 the function will try to omit the data from imported table with the same key which already emitted by the current module file. This is the root cause of the problem.

It's been a while since I looked at this, but as I recall, a fundamental assumption of MultiObDiskHashTable is that if we have a lookup result for a key K in the current file, that result supersedes any results from dependency files. So lookup won't look in those files if we have a local result (they are overridden) and merging doesn't take results from those files either.

So I think the problem probably is that when we form a local result, we need to (but presumably don't) add all the imported results with the same key to the local result.

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


More information about the llvm-branch-commits mailing list