Unverified Commit 67963d38 authored by Haojian Wu's avatar Haojian Wu Committed by GitHub
Browse files

[include-cleaner] Fix a race issue when editing multiple files. (#76960)

We have a previous fix
https://github.com/llvm/llvm-project/commit/be861b64d94198230d8f9889b17280e3cd215a0a,
which snapshots all processing files.

It works most of times, the snapshot (InMemoryFileSystem) is based on
the file path. The file-path-based lookup can fail in a subtle way for
some tricky cases (we encounter it internally), which will result in
reading a corrupted file.

This is a different fix, we don't modify files on the fly, instead, we
write files when the tool finishes for all files.
parent 86ef0392
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment