labath added a comment.
I agree that these functions should be recorded. I think the reason that the
infrastructure already mostly supports that is that we were modelling
constructors as functions that return pointers (and you definitely need to
record constructors).
================
Comment at: lldb/include/lldb/Utility/ReproducerInstrumentation.h:678-716
+ template <typename Result> const Result &RecordResult(const Result &r) {
+ UpdateBoundary();
+ if (ShouldCapture()) {
+ assert(!m_result_recorded);
+ m_serializer.SerializeAll(r);
+ m_result_recorded = true;
+ }
----------------
I would expect that all of these could be replaced with one function using
universal references. I.e., something like:
```
template<typename Result> Result &&RecordResult(Result &&r) {
...
m_serializer.SerializeAll(r); // No std::forward, as you don't want to move r
into this function
...
return std::forward<Result>(r);
}
```
Can you try that out?
Repository:
rLLDB LLDB
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60178/new/
https://reviews.llvm.org/D60178
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits