[PATCH] D135658: demangle OptFunction trace names

Trass3r via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 11 08:26:22 PDT 2022


Trass3r added a comment.

I don't know, are there any tests for all the other scopes?
There is a generic test for the functionality.



================
Comment at: llvm/lib/IR/LegacyPassManager.cpp:1412
 
-  llvm::TimeTraceScope FunctionScope("OptFunction", F.getName());
+  llvm::TimeTraceScope FunctionScope("OptFunction", [&]() {
+    return demangle(F.getName().str());
----------------
thakis wrote:
> Please use a named capture list instead of `[&}`.
Ok. Just followed the pattern used by other call sites like https://github.com/llvm/llvm-project/blob/781b491bba9d798e53f7784dced3c2be77c81dd4/clang/lib/CodeGen/CodeGenModule.cpp#L3570


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135658/new/

https://reviews.llvm.org/D135658



More information about the llvm-commits mailing list