[clang] Use timeTraceAsyncProfilerBegin for Source span (PR #83961)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 25 17:55:51 PDT 2024


================
@@ -166,8 +167,9 @@ class SemaPPCallbacks : public PPCallbacks {
     }
     case ExitFile:
       if (!IncludeStack.empty()) {
-        if (llvm::timeTraceProfilerEnabled())
-          llvm::timeTraceProfilerEnd();
+        if (llvm::timeTraceProfilerEnabled()) {
+          llvm::timeTraceProfilerEnd(ProfilerStack.pop_back_val());
----------------
MaskRay wrote:

https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements

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


More information about the cfe-commits mailing list