================
@@ -157,10 +157,18 @@ class Environment {
   };
 
   /// Creates an environment that uses `DACtx` to store objects that encompass
-  /// the state of a program.
+  /// the state of a program. `FlowConditionToken` sets the flow condition
+  /// associated with the environment. Generally, new environments should be
+  /// initialized with a fresh token, by using one of the other
+  /// constructors. This constructor is for specialized use, including
+  /// deserialization and delegation from other constructors.
+  Environment(DataflowAnalysisContext &DACtx, Atom FlowConditionToken)
----------------
ymand wrote:

The problem is that the exact serialization choice is up to clients -- there 
isn't one facility, like there is for Formula. The motivating example is 
Nullability inference, where we'll be serializing to custom protobufs. So, I 
don't think that C++'s encapsulation mechanism is a good fit here.

I'm open to alternative designs -- e.g. should we consider defining a protobuf 
message here, etc.

https://github.com/llvm/llvm-project/pull/152487
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to