summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Demangle/ItaniumDemangle.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2018-07-02 23:57:29 +0000
committerChandler Carruth <chandlerc@gmail.com>2018-07-02 23:57:29 +0000
commitaa60b3fd875c3df1f23b9d4f491c08888e48d823 (patch)
tree1b4d88ff47016cb177a449f242a52a3b436c747d /llvm/lib/Demangle/ItaniumDemangle.cpp
parentfc018b071b9ef9810089fc3ca27a4a61c9300d38 (diff)
downloadbcm5719-llvm-aa60b3fd875c3df1f23b9d4f491c08888e48d823.tar.gz
bcm5719-llvm-aa60b3fd875c3df1f23b9d4f491c08888e48d823.zip
[ADT] Add llvm::unique_function which is like std::function but
supporting move-only closures. Most of the core optimizations for std::function are here plus a potentially novel one that detects trivially movable and destroyable functors and implements those with fewer indirections. This is especially useful as we start trying to add concurrency primitives as those often end up with move-only types (futures, promises, etc) and wanting them to work through lambdas. As further work, we could add better support for things like const-qualified operator()s to support more algorithms, and r-value ref qualified operator()s to model call-once. None of that is here though. We can also provide our own llvm::function that has some of the optimizations used in this class, but with copy semantics instead of move semantics. This is motivated by increasing usage of things like executors and the task queue where it is useful to embed move-only types like a std::promise within a type erased function. That isn't possible without this version of a type erased function. Differential Revision: https://reviews.llvm.org/D48349 llvm-svn: 336156
Diffstat (limited to 'llvm/lib/Demangle/ItaniumDemangle.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud