================
@@ -61,6 +62,7 @@ class CallGraph : public DynamicRecursiveASTVisitor {
///
/// Recursively walks the declaration to find all the dependent Decls as
well.
void addToCallGraph(Decl *D) {
+ llvm::TimeTraceScope TimeProfile("AddToCallGraph");
----------------
usx95 wrote:
I agree that there could be better API to add multiple decl but I feel that is
separate from what this change proposes to do and does not make this wrong.
The caller will have multiple "AddToCallGraph" children in the time profile and
the profiles would still be correct (if that is your concern).
This seems to be a common pattern for `-ftime-trace` in which callers can add
more scopes on need basis for improved aggregation.
https://github.com/llvm/llvm-project/pull/174717
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits