]> granicus.if.org Git - clang/commit
[modules] Further delay calling DeclMustBeEmitted until it's safe.
authorVassil Vassilev <v.g.vassilev@gmail.com>
Fri, 19 May 2017 16:46:06 +0000 (16:46 +0000)
committerVassil Vassilev <v.g.vassilev@gmail.com>
Fri, 19 May 2017 16:46:06 +0000 (16:46 +0000)
commit03e56f3de71918828f20e09dc0c8fe541e9045f4
tree385a4e09b29433e82d07baaf37ebd37f53703cef
parent4ee33b072b6b54d95cd982aec4946ff886038a6f
[modules] Further delay calling DeclMustBeEmitted until it's safe.

As discussed in D30793, we have some unsafe calls to isConsumerInterestedIn().
This patch implements Richard's suggestion (from the inline comment) that we
should track if we just deserialized an declaration. If we just deserialized,
we can skip the unsafe call because we know it's interesting. If we didn't just
deserialize the declaration, calling isConsumerInterestedIn() should be safe.

We tried to create a test case for this but we were not successful.

Patch by Raphael Isemann (D32499)!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303432 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Serialization/ASTReader.h
lib/Serialization/ASTReader.cpp
lib/Serialization/ASTReaderDecl.cpp