]> granicus.if.org Git - clang/commit
[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)
commitbce52aed345c52715744ec7aef4942b3a66bfc04
tree297cccb210754839a293218d24d61a7598fafba9
parent6f236a83f127aca0ba536a7345fe2f619e1e9723
[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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276473 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Serialization/ASTReader.h
lib/Serialization/ASTReader.cpp
lib/Serialization/ASTReaderDecl.cpp
lib/Serialization/ASTWriter.cpp
test/Modules/Inputs/PR28332/TextualInclude.h [new file with mode: 0644]
test/Modules/Inputs/PR28332/a.h [new file with mode: 0644]
test/Modules/Inputs/PR28332/b.h [new file with mode: 0644]
test/Modules/Inputs/PR28332/c.h [new file with mode: 0644]
test/Modules/Inputs/PR28332/module.modulemap [new file with mode: 0644]
test/Modules/pr28332.cpp [new file with mode: 0644]