================
@@ -873,7 +874,11 @@ class ASTContext : public RefCountedBase<ASTContext> {
   };
 
   /// Returns the dynamic AST node parent map context.
-  ParentMapContext &getParentMapContext();
+  ParentMapContext &getParentMapContext() {
+    if (LLVM_LIKELY(ParentMapCtx))
+      return *ParentMapCtx;
+    return createParentMapContext();
----------------
nico wrote:

Inlining the creation doesn't work since ParentMapContext is incomplete in 
ASTContext.h. But constructing it eagerly seems fine, so switched to that.

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

Reply via email to