summaryrefslogtreecommitdiffstats
path: root/lldb/source/DataFormatters/ValueObjectPrinter.cpp
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2015-07-28 01:52:08 +0000
committerEric Fiselier <eric@efcs.ca>2015-07-28 01:52:08 +0000
commitfda20d94e7f84537d5c71a3e14ee851f8a022268 (patch)
treee3919324686d0480dcd3fcc975bf5fd5b665855d /lldb/source/DataFormatters/ValueObjectPrinter.cpp
parent2e9f29932d8eba649f21a56c2e15f4c0c19ffd21 (diff)
downloadbcm5719-llvm-fda20d94e7f84537d5c71a3e14ee851f8a022268.tar.gz
bcm5719-llvm-fda20d94e7f84537d5c71a3e14ee851f8a022268.zip
Get C++03 __invoke working for bullet 5 of INVOKE.
This patch does a couple of things to get __invoke working for free-functions and call objects. 1. Turn all uses of declval<Tp>() into declval<Tp&>(). The C++03 __invoke only supports lvalues but it will be used when the compiler supports rvalue references but not variadic templates. This change makes sure we don't generate an rvalue. 2. Call objects for bullet 5 are now passed by reference and not value. Copying the functor is incorrect. It will fail to compile for non-copyable functors and it will discard cv-qualifiers on the call object, possibly leading to the wrong function being called. I suspect that the reason the call object was originally taken by value was to support temporary call objects. However __invoke is only used internally and it is never given a temporary. llvm-svn: 243368
Diffstat (limited to 'lldb/source/DataFormatters/ValueObjectPrinter.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud