diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-04-03 21:31:22 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-04-03 21:31:22 +0000 |
commit | 306809f292c9dd26e1a901b139f65976cdd5a4b2 (patch) | |
tree | b22cc9af74e85c1ab680b7ad5a8ac035fda72f5e /lldb/source/Utility/ReproducerInstrumentation.cpp | |
parent | 7c711ccf36e0a818f76d711715956ffe831f53b6 (diff) | |
download | llvm-306809f292c9dd26e1a901b139f65976cdd5a4b2.zip llvm-306809f292c9dd26e1a901b139f65976cdd5a4b2.tar.gz llvm-306809f292c9dd26e1a901b139f65976cdd5a4b2.tar.bz2 |
[Reproducers] Capture return values of functions returning by ptr/ref
For some reason I had convinced myself that functions returning by
pointer or reference do not require recording their result. However,
after further considering I don't see how that could work, at least not
with the current implementation. Interestingly enough, the reproducer
instrumentation already (mostly) accounts for this, though the
lldb-instr tool did not.
This patch adds the missing macros and updates the lldb-instr tool.
Differential revision: https://reviews.llvm.org/D60178
llvm-svn: 357639
Diffstat (limited to 'lldb/source/Utility/ReproducerInstrumentation.cpp')
-rw-r--r-- | lldb/source/Utility/ReproducerInstrumentation.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/source/Utility/ReproducerInstrumentation.cpp b/lldb/source/Utility/ReproducerInstrumentation.cpp index dc42f6f..6702752 100644 --- a/lldb/source/Utility/ReproducerInstrumentation.cpp +++ b/lldb/source/Utility/ReproducerInstrumentation.cpp @@ -117,4 +117,13 @@ Recorder::~Recorder() { UpdateBoundary(); } +void Recorder::Log(unsigned id) { +#ifndef LLDB_REPRO_INSTR_TRACE + LLDB_LOG(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API), "Recording {0}: {1}", id, + m_pretty_func); +#else + llvm::errs() << "Recording " << id << ": " << m_pretty_func << "\n"; +#endif +} + bool lldb_private::repro::Recorder::g_global_boundary; |