mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 12:26:52 +08:00
[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
This commit is contained in:
@@ -182,7 +182,7 @@ SBDebugger &SBDebugger::operator=(const SBDebugger &rhs) {
|
||||
if (this != &rhs) {
|
||||
m_opaque_sp = rhs.m_opaque_sp;
|
||||
}
|
||||
return *this;
|
||||
return LLDB_RECORD_RESULT(*this);
|
||||
}
|
||||
|
||||
void SBDebugger::Initialize() {
|
||||
@@ -373,7 +373,7 @@ FILE *SBDebugger::GetInputFileHandle() {
|
||||
if (m_opaque_sp) {
|
||||
StreamFileSP stream_file_sp(m_opaque_sp->GetInputFile());
|
||||
if (stream_file_sp)
|
||||
return stream_file_sp->GetFile().GetStream();
|
||||
return LLDB_RECORD_RESULT(stream_file_sp->GetFile().GetStream());
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
@@ -384,7 +384,7 @@ FILE *SBDebugger::GetOutputFileHandle() {
|
||||
if (m_opaque_sp) {
|
||||
StreamFileSP stream_file_sp(m_opaque_sp->GetOutputFile());
|
||||
if (stream_file_sp)
|
||||
return stream_file_sp->GetFile().GetStream();
|
||||
return LLDB_RECORD_RESULT(stream_file_sp->GetFile().GetStream());
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
@@ -395,7 +395,7 @@ FILE *SBDebugger::GetErrorFileHandle() {
|
||||
if (m_opaque_sp) {
|
||||
StreamFileSP stream_file_sp(m_opaque_sp->GetErrorFile());
|
||||
if (stream_file_sp)
|
||||
return stream_file_sp->GetFile().GetStream();
|
||||
return LLDB_RECORD_RESULT(stream_file_sp->GetFile().GetStream());
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user