diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-08-22 15:29:10 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-08-22 15:29:10 +0200 |
commit | 4c96761c2bb51cb1635b7bbe56784daeeeee1561 (patch) | |
tree | 5713add9413b3499cc7f587f93c16029ffb87fed /src/libexpr/eval.cc | |
parent | 7ed91d6c6ab86199e7c9703f2852f47d36976d6b (diff) | |
parent | 7c3ab5751568a0bc63430b33a5169c5e4784a0ff (diff) |
Merge remote-tracking branch 'origin/master' into parallel-nix-copy
Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r-- | src/libexpr/eval.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index f485e2fed..e3716f217 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -2501,18 +2501,18 @@ void EvalState::printStats() } { auto list = topObj.list("functions"); - for (auto & i : functionCalls) { + for (auto & [fun, count] : functionCalls) { auto obj = list.object(); - if (i.first->name) - obj.attr("name", (const std::string &) i.first->name); + if (fun->name) + obj.attr("name", (std::string_view) symbols[fun->name]); else obj.attr("name", nullptr); - if (auto pos = positions[i.first->pos]) { - obj.attr("file", (const std::string &) pos.file); + if (auto pos = positions[fun->pos]) { + obj.attr("file", (std::string_view) pos.file); obj.attr("line", pos.line); obj.attr("column", pos.column); } - obj.attr("count", i.second); + obj.attr("count", count); } } { |