[clang] [Frontend] Consolidate frontend timer setup in CompilerInstance::ExecuteAction. NFC (PR #192266)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 16 06:06:27 PDT 2026


================
@@ -155,10 +155,10 @@ std::string buildTraceGraph(StringRef Json) {
 
       // Presumably due to timer rounding, PerformPendingInstantiations often
       // appear to be within the timer interval of the immediately previous
-      // event group. We always know these events occur at level 1, not level 2,
-      // in our tests, so pop an event in that case.
+      // event group. We always know these events occur at the top level
+      // (under ExecuteCompiler), so force-pop until we get there.
       if (InsideCurrentEvent && Event.Name == "PerformPendingInstantiations" &&
-          EventStack.size() == 2) {
+          EventStack.size() >= 2) {
----------------
AaronBallman wrote:

Can you explain why this change was needed? (It doesn't seem problematic, but I don't see why it's needed either.)

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


More information about the cfe-commits mailing list