This is an archive of the discontinued LLVM Phabricator instance.

[Modules] Do not emit file modification error when -fno-validate-pch is set
Needs ReviewPublic

Authored by yamaguchi on Sep 25 2018, 11:36 AM.

Details

Summary

This is a follow-up patch of
rL338503: [Modules] Do not emit relocation error when -fno-validate-pch is set

File modification with modules is also fine for our usecase as we
want to reuse pcms. This enables us to use the same build directory
again without deleting pcm directory.

Event Timeline

yamaguchi created this revision.Sep 25 2018, 11:36 AM
rsmith added a comment.Oct 3 2018, 5:49 PM

The consequence of this will be that we use a stale PCH / PCM file if files have changed, rather than emitting an "out of date" error if / when we decide we need to reference a modified file that was used to build the AST file. That can lead to bad things happening: any time we decide to re-lex or otherwise go back to the original source file, we'll be "surprised" that it's not the same as we remember it being. -fno-validate-pch isn't supposed to allow the files on disk to have changed, it's a promise that they haven't.