[clang] [clang] Optimize castToDeclContext for 2% improvement in build times (PR #76825)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 4 02:04:46 PST 2024


Pol Marcet =?utf-8?q?Sard=C3=A0?= <polmarcetsarda at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/76825 at github.com>


================
@@ -70,8 +71,15 @@ class ClangASTNodesEmitter {
   std::pair<ASTNode, ASTNode> EmitNode(raw_ostream& OS, ASTNode Base);
 public:
   explicit ClangASTNodesEmitter(RecordKeeper &R, const std::string &N,
-                                const std::string &S)
-    : Records(R), NodeClassName(N), BaseSuffix(S) {}
+                                const std::string &S,
+                                std::string_view PriorizeIfSubclassOf)
+      : Records(R), NodeClassName(N), BaseSuffix(S) {
+    auto vecPriorized = PriorizeIfSubclassOf.empty()
----------------
Endilll wrote:

```suggestion
    auto vecPrioritized = PriorizeIfSubclassOf.empty()
```

https://github.com/llvm/llvm-project/pull/76825


More information about the cfe-commits mailing list