[modules] Teach the ASTWriter to ignore mutations coming from the ASTReader.
authorVassil Vassilev <v.g.vassilev@gmail.com>
Fri, 22 Jul 2016 21:08:24 +0000 (21:08 +0000)
committerVassil Vassilev <v.g.vassilev@gmail.com>
Fri, 22 Jul 2016 21:08:24 +0000 (21:08 +0000)
commit19765fb68c67df88ad03bfa6e56b1f1f39ee6ffc
tree573203ffb0e3ba2d332498ef3ad6791b14138de3
parentb73d7aed71c3f750f2ca64b93eed83eac10e1458
[modules] Teach the ASTWriter to ignore mutations coming from the ASTReader.

Processing update records (and loading a module, in general) might trigger
unexpected calls to the ASTWriter (being a mutation listener). Now we have a
mechanism to suppress those calls to the ASTWriter but notify other possible
mutation listeners.

Fixes https://llvm.org/bugs/show_bug.cgi?id=28332

Patch by Cristina Cristescu and me.

Reviewed by Richard Smith (D21800).

llvm-svn: 276473
clang/include/clang/Serialization/ASTReader.h
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTReaderDecl.cpp
clang/lib/Serialization/ASTWriter.cpp
clang/test/Modules/Inputs/PR28332/TextualInclude.h [new file with mode: 0644]
clang/test/Modules/Inputs/PR28332/a.h [new file with mode: 0644]
clang/test/Modules/Inputs/PR28332/b.h [new file with mode: 0644]
clang/test/Modules/Inputs/PR28332/c.h [new file with mode: 0644]
clang/test/Modules/Inputs/PR28332/module.modulemap [new file with mode: 0644]
clang/test/Modules/pr28332.cpp [new file with mode: 0644]