diff options
author | Fangrui Song <maskray@google.com> | 2018-11-27 00:26:50 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2018-11-27 00:26:50 +0000 |
commit | 41828e7e5290fd36b2e33b488b059ac7d865f9e1 (patch) | |
tree | 03e7050d219def96375a837d8ff1489adf247925 /lldb/packages/Python/lldbsuite/test/python_api | |
parent | 3bd249018c13f320bcb8be6ff247c6ceafe4db30 (diff) | |
download | bcm5719-llvm-41828e7e5290fd36b2e33b488b059ac7d865f9e1.tar.gz bcm5719-llvm-41828e7e5290fd36b2e33b488b059ac7d865f9e1.zip |
[Common] Threads: use function_ref instead of std::function
The benefits are:
a) Performance (very minor): it removes a heap allocation of the std::function constructor (template<class F> function(F f))
b) Clarity: it suggests that the callable's lifetime should end after the callee returns. Such callback is widely used in llvm. lld also uses it a lot.
Reviewers: ruiu, rnk, pcc
Reviewed By: ruiu
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D54813
llvm-svn: 347620
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api')
0 files changed, 0 insertions, 0 deletions