================
@@ -611,6 +623,29 @@ class CompilerInstance : public ModuleLoader {
   /// the compiler instance takes ownership of \p Value.
   void setCodeCompletionConsumer(CodeCompleteConsumer *Value);
 
+  /// @}
+  /// @name Summary
+  /// @{
+
+  bool hasSummaryContext() { return (bool)SummaryCtx; }
+
+  SummaryContext &getSummaryContext() {
+    assert(SummaryCtx && "Compiler instance has no summary context!");
+    return *SummaryCtx;
+  }
+
+  void createSummaryContext() { SummaryCtx.reset(new SummaryContext()); }
----------------
isuckatcs wrote:

I'm not sure tbh. I just mirrored what other create functions such as 
`CompilerInstance::createSema()` do. Those don't assert the existence, so maybe 
the consumers of the class expect this kind of behaviour.

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

Reply via email to