================
@@ -222,6 +230,41 @@ struct ModuleAttributes {
         NoUndeclaredIncludes(false) {}
 };
 
+/// A reference to either a fully materialized Module object, or
+/// a yet-to-be-deserialized submodule in an AST file.
+class ModuleRef {
+  mutable Module *Existing = nullptr;
+  mutable ExternalSubmoduleSource *ExternalSource = nullptr;
----------------
jansvoboda11 wrote:

You're right, I think the follow-up commit changes `operator*` to not clear 
these, but that would increase traffic through the virtual function for later 
calls to `operator*`. I pushed a change that uses one bit in `ExternalSource` 
to signify whether it's been used to deserialize yet. This prevents calling the 
virtual function repeatedly, but also keeps `ExternalSource` around for use in 
the follow-up commit.

https://github.com/llvm/llvm-project/pull/194968
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to