================
@@ -1488,6 +1484,18 @@ DeclContext *DeclContext::getNonTransparentContext() {
   return DC;
 }
 
+ASTContext &DeclContext::getParentASTContextSlow() const {
+  const DeclContext *DC = this;
+  while (!DC->isTranslationUnit()) {
----------------
joker-eph wrote:

Implemented this by storing the owning ASTContext directly in DeclContext at 
construction, getParentASTContext() is now a direct return, removing both the 
null check and translation-unit walk. 

https://github.com/llvm/llvm-project/compare/99a9b8e86fdf154cee802677541c5a562cc3b36f..0edeaebf6ac4e095599c6e10adacdc933b4de068


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

Reply via email to