Commit 4406d9d
committed
[clang][Dependency Scanning] Move Module Timestamp Update After Compilation Finishes (llvm#151774)
When two threads are accessing the same `pcm`, it is possible that the
reading thread sees the timestamp update, while the file on disk is not
updated.
This PR moves timestamp update from `writeAST` to
`compileModuleAndReadASTImpl`, so we only update the timestamp after the
file has been committed to disk.
rdar://152097193
(cherry picked from commit 09dbdf6)1 parent 8b9897e commit 4406d9d
File tree
2 files changed
+8
-5
lines changed- clang/lib
- Frontend
- Serialization
2 files changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1669 | 1669 | | |
1670 | 1670 | | |
1671 | 1671 | | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
1672 | 1680 | | |
1673 | 1681 | | |
1674 | 1682 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5547 | 5547 | | |
5548 | 5548 | | |
5549 | 5549 | | |
5550 | | - | |
5551 | | - | |
5552 | | - | |
5553 | | - | |
5554 | | - | |
5555 | 5550 | | |
5556 | 5551 | | |
5557 | 5552 | | |
| |||
0 commit comments