summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2022-01-09 22:54:08 -0800
committerJonas Devlieghere <jonas@devlieghere.com>2022-01-09 22:54:17 -0800
commitd232abc33b707d2da8ca4e4c84d8287ce0e1a47a (patch)
treeca130d9be74c7380624add1c5b06acaa8243e983
parentc4cdf865698eae06affbf762baf38e6ca95b4785 (diff)
downloadllvm-d232abc33b707d2da8ca4e4c84d8287ce0e1a47a.tar.gz
[lldb] Remove LLDB_RECORD_RESULT macro
-rw-r--r--lldb/include/lldb/Utility/ReproducerInstrumentation.h2
-rw-r--r--lldb/source/API/SBAddress.cpp18
-rw-r--r--lldb/source/API/SBAttachInfo.cpp4
-rw-r--r--lldb/source/API/SBBlock.cpp20
-rw-r--r--lldb/source/API/SBBreakpoint.cpp49
-rw-r--r--lldb/source/API/SBBreakpointLocation.cpp12
-rw-r--r--lldb/source/API/SBBreakpointName.cpp12
-rw-r--r--lldb/source/API/SBBroadcaster.cpp2
-rw-r--r--lldb/source/API/SBCommandInterpreter.cpp47
-rw-r--r--lldb/source/API/SBCommandInterpreterRunOptions.cpp8
-rw-r--r--lldb/source/API/SBCommandReturnObject.cpp2
-rw-r--r--lldb/source/API/SBCommunication.cpp2
-rw-r--r--lldb/source/API/SBCompileUnit.cpp17
-rw-r--r--lldb/source/API/SBData.cpp26
-rw-r--r--lldb/source/API/SBDebugger.cpp161
-rw-r--r--lldb/source/API/SBDeclaration.cpp5
-rw-r--r--lldb/source/API/SBEnvironment.cpp4
-rw-r--r--lldb/source/API/SBError.cpp2
-rw-r--r--lldb/source/API/SBEvent.cpp4
-rw-r--r--lldb/source/API/SBExecutionContext.cpp10
-rw-r--r--lldb/source/API/SBExpressionOptions.cpp2
-rw-r--r--lldb/source/API/SBFile.cpp12
-rw-r--r--lldb/source/API/SBFileSpec.cpp2
-rw-r--r--lldb/source/API/SBFileSpecList.cpp4
-rw-r--r--lldb/source/API/SBFrame.cpp62
-rw-r--r--lldb/source/API/SBFunction.cpp14
-rw-r--r--lldb/source/API/SBHostOS.cpp8
-rw-r--r--lldb/source/API/SBInstruction.cpp6
-rw-r--r--lldb/source/API/SBInstructionList.cpp4
-rw-r--r--lldb/source/API/SBLaunchInfo.cpp11
-rw-r--r--lldb/source/API/SBLineEntry.cpp8
-rw-r--r--lldb/source/API/SBListener.cpp2
-rw-r--r--lldb/source/API/SBMemoryRegionInfo.cpp2
-rw-r--r--lldb/source/API/SBMemoryRegionInfoList.cpp2
-rw-r--r--lldb/source/API/SBModule.cpp61
-rw-r--r--lldb/source/API/SBModuleSpec.cpp18
-rw-r--r--lldb/source/API/SBPlatform.cpp103
-rw-r--r--lldb/source/API/SBProcess.cpp69
-rw-r--r--lldb/source/API/SBProcessInfo.cpp4
-rw-r--r--lldb/source/API/SBQueue.cpp8
-rw-r--r--lldb/source/API/SBQueueItem.cpp4
-rw-r--r--lldb/source/API/SBSection.cpp12
-rw-r--r--lldb/source/API/SBSourceManager.cpp2
-rw-r--r--lldb/source/API/SBStringList.cpp2
-rw-r--r--lldb/source/API/SBStructuredData.cpp14
-rw-r--r--lldb/source/API/SBSymbol.cpp10
-rw-r--r--lldb/source/API/SBSymbolContext.cpp20
-rw-r--r--lldb/source/API/SBSymbolContextList.cpp4
-rw-r--r--lldb/source/API/SBTarget.cpp274
-rw-r--r--lldb/source/API/SBThread.cpp70
-rw-r--r--lldb/source/API/SBThreadCollection.cpp4
-rw-r--r--lldb/source/API/SBThreadPlan.cpp51
-rw-r--r--lldb/source/API/SBTrace.cpp11
-rw-r--r--lldb/source/API/SBType.cpp107
-rw-r--r--lldb/source/API/SBTypeCategory.cpp80
-rw-r--r--lldb/source/API/SBTypeEnumMember.cpp11
-rw-r--r--lldb/source/API/SBTypeFilter.cpp2
-rw-r--r--lldb/source/API/SBTypeFormat.cpp2
-rw-r--r--lldb/source/API/SBTypeNameSpecifier.cpp8
-rw-r--r--lldb/source/API/SBTypeSummary.cpp20
-rw-r--r--lldb/source/API/SBTypeSynthetic.cpp14
-rw-r--r--lldb/source/API/SBUnixSignals.cpp2
-rw-r--r--lldb/source/API/SBValue.cpp100
-rw-r--r--lldb/source/API/SBValueList.cpp8
-rw-r--r--lldb/source/API/SBVariablesOptions.cpp2
-rw-r--r--lldb/source/API/SBWatchpoint.cpp8
66 files changed, 801 insertions, 850 deletions
diff --git a/lldb/include/lldb/Utility/ReproducerInstrumentation.h b/lldb/include/lldb/Utility/ReproducerInstrumentation.h
index e6046bc688fb..ddeacb1b7228 100644
--- a/lldb/include/lldb/Utility/ReproducerInstrumentation.h
+++ b/lldb/include/lldb/Utility/ReproducerInstrumentation.h
@@ -125,8 +125,6 @@ template <typename... Ts> inline std::string stringify_args(const Ts &... ts) {
LLDB_RECORD_CHAR_PTR_(Result(*) Signature, (&Class::Method), StrOut, \
__VA_ARGS__)
-#define LLDB_RECORD_RESULT(Result) Result;
-
/// The LLDB_RECORD_DUMMY macro is special because it doesn't actually record
/// anything. It's used to track API boundaries when we cannot record for
/// technical reasons.
diff --git a/lldb/source/API/SBAddress.cpp b/lldb/source/API/SBAddress.cpp
index 910e000d2ddd..af1b876d803d 100644
--- a/lldb/source/API/SBAddress.cpp
+++ b/lldb/source/API/SBAddress.cpp
@@ -57,7 +57,7 @@ const SBAddress &SBAddress::operator=(const SBAddress &rhs) {
if (this != &rhs)
m_opaque_up = clone(rhs.m_opaque_up);
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
bool lldb::operator==(const SBAddress &lhs, const SBAddress &rhs) {
@@ -162,7 +162,7 @@ lldb::SBSection SBAddress::GetSection() {
lldb::SBSection sb_section;
if (m_opaque_up->IsValid())
sb_section.SetSP(m_opaque_up->GetSection());
- return LLDB_RECORD_RESULT(sb_section);
+ return sb_section;
}
lldb::addr_t SBAddress::GetOffset() {
@@ -214,7 +214,7 @@ SBModule SBAddress::GetModule() {
SBModule sb_module;
if (m_opaque_up->IsValid())
sb_module.SetSP(m_opaque_up->GetModule());
- return LLDB_RECORD_RESULT(sb_module);
+ return sb_module;
}
SBSymbolContext SBAddress::GetSymbolContext(uint32_t resolve_scope) {
@@ -225,7 +225,7 @@ SBSymbolContext SBAddress::GetSymbolContext(uint32_t resolve_scope) {
SymbolContextItem scope = static_cast<SymbolContextItem>(resolve_scope);
if (m_opaque_up->IsValid())
m_opaque_up->CalculateSymbolContext(&sb_sc.ref(), scope);
- return LLDB_RECORD_RESULT(sb_sc);
+ return sb_sc;
}
SBCompileUnit SBAddress::GetCompileUnit() {
@@ -234,7 +234,7 @@ SBCompileUnit SBAddress::GetCompileUnit() {
SBCompileUnit sb_comp_unit;
if (m_opaque_up->IsValid())
sb_comp_unit.reset(m_opaque_up->CalculateSymbolContextCompileUnit());
- return LLDB_RECORD_RESULT(sb_comp_unit);
+ return sb_comp_unit;
}
SBFunction SBAddress::GetFunction() {
@@ -243,7 +243,7 @@ SBFunction SBAddress::GetFunction() {
SBFunction sb_function;
if (m_opaque_up->IsValid())
sb_function.reset(m_opaque_up->CalculateSymbolContextFunction());
- return LLDB_RECORD_RESULT(sb_function);
+ return sb_function;
}
SBBlock SBAddress::GetBlock() {
@@ -252,7 +252,7 @@ SBBlock SBAddress::GetBlock() {
SBBlock sb_block;
if (m_opaque_up->IsValid())
sb_block.SetPtr(m_opaque_up->CalculateSymbolContextBlock());
- return LLDB_RECORD_RESULT(sb_block);
+ return sb_block;
}
SBSymbol SBAddress::GetSymbol() {
@@ -261,7 +261,7 @@ SBSymbol SBAddress::GetSymbol() {
SBSymbol sb_symbol;
if (m_opaque_up->IsValid())
sb_symbol.reset(m_opaque_up->CalculateSymbolContextSymbol());
- return LLDB_RECORD_RESULT(sb_symbol);
+ return sb_symbol;
}
SBLineEntry SBAddress::GetLineEntry() {
@@ -273,5 +273,5 @@ SBLineEntry SBAddress::GetLineEntry() {
if (m_opaque_up->CalculateSymbolContextLineEntry(line_entry))
sb_line_entry.SetLineEntry(line_entry);
}
- return LLDB_RECORD_RESULT(sb_line_entry);
+ return sb_line_entry;
}
diff --git a/lldb/source/API/SBAttachInfo.cpp b/lldb/source/API/SBAttachInfo.cpp
index 820f9918a994..8118088a38ec 100644
--- a/lldb/source/API/SBAttachInfo.cpp
+++ b/lldb/source/API/SBAttachInfo.cpp
@@ -64,7 +64,7 @@ SBAttachInfo &SBAttachInfo::operator=(const SBAttachInfo &rhs) {
if (this != &rhs)
m_opaque_sp = clone(rhs.m_opaque_sp);
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
lldb::pid_t SBAttachInfo::GetProcessID() {
@@ -249,7 +249,7 @@ bool SBAttachInfo::ParentProcessIDIsValid() {
SBListener SBAttachInfo::GetListener() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBListener, SBAttachInfo, GetListener);
- return LLDB_RECORD_RESULT(SBListener(m_opaque_sp->GetListener()));
+ return SBListener(m_opaque_sp->GetListener());
}
void SBAttachInfo::SetListener(SBListener &listener) {
diff --git a/lldb/source/API/SBBlock.cpp b/lldb/source/API/SBBlock.cpp
index b0865207d766..720d630491f8 100644
--- a/lldb/source/API/SBBlock.cpp
+++ b/lldb/source/API/SBBlock.cpp
@@ -39,7 +39,7 @@ const SBBlock &SBBlock::operator=(const SBBlock &rhs) {
SBBlock, operator=,(const lldb::SBBlock &), rhs);
m_opaque_ptr = rhs.m_opaque_ptr;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBBlock::~SBBlock() { m_opaque_ptr = nullptr; }
@@ -86,7 +86,7 @@ SBFileSpec SBBlock::GetInlinedCallSiteFile() const {
if (inlined_info)
sb_file.SetFileSpec(inlined_info->GetCallSite().GetFile());
}
- return LLDB_RECORD_RESULT(sb_file);
+ return sb_file;
}
uint32_t SBBlock::GetInlinedCallSiteLine() const {
@@ -128,7 +128,7 @@ SBBlock SBBlock::GetParent() {
SBBlock sb_block;
if (m_opaque_ptr)
sb_block.m_opaque_ptr = m_opaque_ptr->GetParent();
- return LLDB_RECORD_RESULT(sb_block);
+ return sb_block;
}
lldb::SBBlock SBBlock::GetContainingInlinedBlock() {
@@ -137,7 +137,7 @@ lldb::SBBlock SBBlock::GetContainingInlinedBlock() {
SBBlock sb_block;
if (m_opaque_ptr)
sb_block.m_opaque_ptr = m_opaque_ptr->GetContainingInlinedBlock();
- return LLDB_RECORD_RESULT(sb_block);
+ return sb_block;
}
SBBlock SBBlock::GetSibling() {
@@ -146,7 +146,7 @@ SBBlock SBBlock::GetSibling() {
SBBlock sb_block;
if (m_opaque_ptr)
sb_block.m_opaque_ptr = m_opaque_ptr->GetSibling();
- return LLDB_RECORD_RESULT(sb_block);
+ return sb_block;
}
SBBlock SBBlock::GetFirstChild() {
@@ -155,7 +155,7 @@ SBBlock SBBlock::GetFirstChild() {
SBBlock sb_block;
if (m_opaque_ptr)
sb_block.m_opaque_ptr = m_opaque_ptr->GetFirstChild();
- return LLDB_RECORD_RESULT(sb_block);
+ return sb_block;
}
lldb_private::Block *SBBlock::GetPtr() { return m_opaque_ptr; }
@@ -206,7 +206,7 @@ lldb::SBAddress SBBlock::GetRangeStartAddress(uint32_t idx) {
sb_addr.ref() = range.GetBaseAddress();
}
}
- return LLDB_RECORD_RESULT(sb_addr);
+ return sb_addr;
}
lldb::SBAddress SBBlock::GetRangeEndAddress(uint32_t idx) {
@@ -221,7 +221,7 @@ lldb::SBAddress SBBlock::GetRangeEndAddress(uint32_t idx) {
sb_addr.ref().Slide(range.GetByteSize());
}
}
- return LLDB_RECORD_RESULT(sb_addr);
+ return sb_addr;
}
uint32_t SBBlock::GetRangeIndexForBlockAddress(lldb::SBAddress block_addr) {
@@ -289,7 +289,7 @@ lldb::SBValueList SBBlock::GetVariables(lldb::SBFrame &frame, bool arguments,
}
}
}
- return LLDB_RECORD_RESULT(value_list);
+ return value_list;
}
lldb::SBValueList SBBlock::GetVariables(lldb::SBTarget &target, bool arguments,
@@ -341,5 +341,5 @@ lldb::SBValueList SBBlock::GetVariables(lldb::SBTarget &target, bool arguments,
}
}
}
- return LLDB_RECORD_RESULT(value_list);
+ return value_list;
}
diff --git a/lldb/source/API/SBBreakpoint.cpp b/lldb/source/API/SBBreakpoint.cpp
index 4fc88e13ed68..fc0c61c17a6a 100644
--- a/lldb/source/API/SBBreakpoint.cpp
+++ b/lldb/source/API/SBBreakpoint.cpp
@@ -64,7 +64,7 @@ const SBBreakpoint &SBBreakpoint::operator=(const SBBreakpoint &rhs) {
SBBreakpoint, operator=,(const lldb::SBBreakpoint &), rhs);
m_opaque_wp = rhs.m_opaque_wp;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
bool SBBreakpoint::operator==(const lldb::SBBreakpoint &rhs) {
@@ -86,9 +86,9 @@ SBTarget SBBreakpoint::GetTarget() const {
BreakpointSP bkpt_sp = GetSP();
if (bkpt_sp)
- return LLDB_RECORD_RESULT(SBTarget(bkpt_sp->GetTargetSP()));
+ return SBTarget(bkpt_sp->GetTargetSP());
- return LLDB_RECORD_RESULT(SBTarget());
+ return SBTarget();
}
break_id_t SBBreakpoint::GetID() const {
@@ -148,7 +148,7 @@ SBBreakpointLocation SBBreakpoint::FindLocationByAddress(addr_t vm_addr) {
sb_bp_location.SetLocation(bkpt_sp->FindLocationByAddress(address));
}
}
- return LLDB_RECORD_RESULT(sb_bp_location);
+ return sb_bp_location;
}
break_id_t SBBreakpoint::FindLocationIDByAddress(addr_t vm_addr) {
@@ -185,7 +185,7 @@ SBBreakpointLocation SBBreakpoint::FindLocationByID(break_id_t bp_loc_id) {
sb_bp_location.SetLocation(bkpt_sp->FindLocationByID(bp_loc_id));
}
- return LLDB_RECORD_RESULT(sb_bp_location);
+ return sb_bp_location;
}
SBBreakpointLocation SBBreakpoint::GetLocationAtIndex(uint32_t index) {
@@ -201,7 +201,7 @@ SBBreakpointLocation SBBreakpoint::GetLocationAtIndex(uint32_t index) {
sb_bp_location.SetLocation(bkpt_sp->GetLocationAtIndex(index));
}
- return LLDB_RECORD_RESULT(sb_bp_location);
+ return sb_bp_location;
}
void SBBreakpoint::SetEnabled(bool enable) {
@@ -560,17 +560,17 @@ SBError SBBreakpoint::AddLocation(SBAddress &address) {
if (!address.IsValid()) {
error.SetErrorString("Can't add an invalid address.");
- return LLDB_RECORD_RESULT(error);
+ return error;
}
if (!bkpt_sp) {
error.SetErrorString("No breakpoint to add a location to.");
- return LLDB_RECORD_RESULT(error);
+ return error;
}
if (!llvm::isa<BreakpointResolverScripted>(bkpt_sp->GetResolver().get())) {
error.SetErrorString("Only a scripted resolver can add locations.");
- return LLDB_RECORD_RESULT(error);
+ return error;
}
if (bkpt_sp->GetSearchFilter()->AddressPasses(address.ref()))
@@ -582,7 +582,7 @@ SBError SBBreakpoint::AddLocation(SBAddress &address) {
error.SetErrorStringWithFormat("Address: %s didn't pass the filter.",
s.GetData());
}
- return LLDB_RECORD_RESULT(error);
+ return error;
}
SBStructuredData SBBreakpoint::SerializeToStructuredData() {
@@ -593,11 +593,11 @@ SBStructuredData SBBreakpoint::SerializeToStructuredData() {
BreakpointSP bkpt_sp = GetSP();
if (!bkpt_sp)
- return LLDB_RECORD_RESULT(data);
+ return data;
StructuredData::ObjectSP bkpt_dict = bkpt_sp->SerializeToStructuredData();
data.m_impl_up->SetObjectSP(bkpt_dict);
- return LLDB_RECORD_RESULT(data);
+ return data;
}
void SBBreakpoint::SetCallback(SBBreakpointHitCallback callback, void *baton) {
@@ -647,8 +647,8 @@ SBError SBBreakpoint::SetScriptCallbackFunction(
sb_error.SetError(error);
} else
sb_error.SetErrorString("invalid breakpoint");
-
- return LLDB_RECORD_RESULT(sb_error);
+
+ return sb_error;
}
SBError SBBreakpoint::SetScriptCallbackBody(const char *callback_body_text) {
@@ -671,7 +671,7 @@ SBError SBBreakpoint::SetScriptCallbackBody(const char *callback_body_text) {
} else
sb_error.SetErrorString("invalid breakpoint");
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
bool SBBreakpoint::AddName(const char *new_name) {
@@ -698,7 +698,7 @@ SBError SBBreakpoint::AddNameWithErrorHandling(const char *new_name) {
status.SetErrorString("invalid breakpoint");
}
- return LLDB_RECORD_RESULT(status);
+ return status;
}
void SBBreakpoint::RemoveName(const char *name_to_remove) {
@@ -772,10 +772,9 @@ SBBreakpoint SBBreakpoint::GetBreakpointFromEvent(const lldb::SBEvent &event) {
event);
if (event.IsValid())
- return LLDB_RECORD_RESULT(
- SBBreakpoint(Breakpoint::BreakpointEventData::GetBreakpointFromEvent(
- event.GetSP())));
- return LLDB_RECORD_RESULT(SBBreakpoint());
+ return SBBreakpoint(
+ Breakpoint::BreakpointEventData::GetBreakpointFromEvent(event.GetSP()));
+ return SBBreakpoint();
}
SBBreakpointLocation
@@ -790,7 +789,7 @@ SBBreakpoint::GetBreakpointLocationAtIndexFromEvent(const lldb::SBEvent &event,
sb_breakpoint_loc.SetLocation(
Breakpoint::BreakpointEventData::GetBreakpointLocationAtIndexFromEvent(
event.GetSP(), loc_idx));
- return LLDB_RECORD_RESULT(sb_breakpoint_loc);
+ return sb_breakpoint_loc;
}
uint32_t
@@ -923,10 +922,10 @@ SBBreakpoint SBBreakpointList::GetBreakpointAtIndex(size_t idx) {
(size_t), idx);
if (!m_opaque_sp)
- return LLDB_RECORD_RESULT(SBBreakpoint());
+ return SBBreakpoint();
BreakpointSP bkpt_sp = m_opaque_sp->GetBreakpointAtIndex(idx);
- return LLDB_RECORD_RESULT(SBBreakpoint(bkpt_sp));
+ return SBBreakpoint(bkpt_sp);
}
SBBreakpoint SBBreakpointList::FindBreakpointByID(lldb::break_id_t id) {
@@ -934,9 +933,9 @@ SBBreakpoint SBBreakpointList::FindBreakpointByID(lldb::break_id_t id) {
(lldb::break_id_t), id);
if (!m_opaque_sp)
- return LLDB_RECORD_RESULT(SBBreakpoint());
+ return SBBreakpoint();
BreakpointSP bkpt_sp = m_opaque_sp->FindBreakpointByID(id);
- return LLDB_RECORD_RESULT(SBBreakpoint(bkpt_sp));
+ return SBBreakpoint(bkpt_sp);
}
void SBBreakpointList::Append(const SBBreakpoint &sb_bkpt) {
diff --git a/lldb/source/API/SBBreakpointLocation.cpp b/lldb/source/API/SBBreakpointLocation.cpp
index ec7a6ac86eeb..c2e0001bd6c5 100644
--- a/lldb/source/API/SBBreakpointLocation.cpp
+++ b/lldb/source/API/SBBreakpointLocation.cpp
@@ -56,7 +56,7 @@ operator=(const SBBreakpointLocation &rhs) {
rhs);
m_opaque_wp = rhs.m_opaque_wp;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBBreakpointLocation::~SBBreakpointLocation() = default;
@@ -80,10 +80,10 @@ SBAddress SBBreakpointLocation::GetAddress() {
BreakpointLocationSP loc_sp = GetSP();
if (loc_sp) {
- return LLDB_RECORD_RESULT(SBAddress(loc_sp->GetAddress()));
+ return SBAddress(loc_sp->GetAddress());
}
- return LLDB_RECORD_RESULT(SBAddress());
+ return SBAddress();
}
addr_t SBBreakpointLocation::GetLoadAddress() {
@@ -240,7 +240,7 @@ SBError SBBreakpointLocation::SetScriptCallbackFunction(
} else
sb_error.SetErrorString("invalid breakpoint");
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
SBError
@@ -265,7 +265,7 @@ SBBreakpointLocation::SetScriptCallbackBody(const char *callback_body_text) {
} else
sb_error.SetErrorString("invalid breakpoint");
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
void SBBreakpointLocation::SetCommandLineCommands(SBStringList &commands) {
@@ -465,5 +465,5 @@ SBBreakpoint SBBreakpointLocation::GetBreakpoint() {
sb_bp = loc_sp->GetBreakpoint().shared_from_this();
}
- return LLDB_RECORD_RESULT(sb_bp);
+ return sb_bp;
}
diff --git a/lldb/source/API/SBBreakpointName.cpp b/lldb/source/API/SBBreakpointName.cpp
index 599be0785375..a8b6f33ce997 100644
--- a/lldb/source/API/SBBreakpointName.cpp
+++ b/lldb/source/API/SBBreakpointName.cpp
@@ -169,12 +169,12 @@ operator=(const SBBreakpointName &rhs) {
if (!rhs.m_impl_up) {
m_impl_up.reset();
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
m_impl_up = std::make_unique<SBBreakpointNameImpl>(rhs.m_impl_up->GetTarget(),
rhs.m_impl_up->GetName());
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
bool SBBreakpointName::operator==(const lldb::SBBreakpointName &rhs) {
@@ -585,7 +585,7 @@ SBError SBBreakpointName::SetScriptCallbackFunction(
BreakpointName *bp_name = GetBreakpointName();
if (!bp_name) {
sb_error.SetErrorString("unrecognized breakpoint name");
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
std::lock_guard<std::recursive_mutex> guard(
@@ -601,7 +601,7 @@ SBError SBBreakpointName::SetScriptCallbackFunction(
extra_args.m_impl_up->GetObjectSP());
sb_error.SetError(error);
UpdateName(*bp_name);
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
SBError
@@ -612,7 +612,7 @@ SBBreakpointName::SetScriptCallbackBody(const char *callback_body_text) {
SBError sb_error;
BreakpointName *bp_name = GetBreakpointName();
if (!bp_name)
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
std::lock_guard<std::recursive_mutex> guard(
m_impl_up->GetTarget()->GetAPIMutex());
@@ -627,7 +627,7 @@ SBBreakpointName::SetScriptCallbackBody(const char *callback_body_text) {
if (!sb_error.Fail())
UpdateName(*bp_name);
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
bool SBBreakpointName::GetAllowList() const {
diff --git a/lldb/source/API/SBBroadcaster.cpp b/lldb/source/API/SBBroadcaster.cpp
index daf42f986079..4fa11cab5d9f 100644
--- a/lldb/source/API/SBBroadcaster.cpp
+++ b/lldb/source/API/SBBroadcaster.cpp
@@ -44,7 +44,7 @@ const SBBroadcaster &SBBroadcaster::operator=(const SBBroadcaster &rhs) {
m_opaque_sp = rhs.m_opaque_sp;
m_opaque_ptr = rhs.m_opaque_ptr;
}
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBBroadcaster::~SBBroadcaster() { reset(nullptr, false); }
diff --git a/lldb/source/API/SBCommandInterpreter.cpp b/lldb/source/API/SBCommandInterpreter.cpp
index ee7ad61da7d2..02370607daad 100644
--- a/lldb/source/API/SBCommandInterpreter.cpp
+++ b/lldb/source/API/SBCommandInterpreter.cpp
@@ -99,7 +99,7 @@ operator=(const SBCommandInterpreter &rhs) {
rhs);
m_opaque_ptr = rhs.m_opaque_ptr;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
bool SBCommandInterpreter::IsValid() const {
@@ -373,7 +373,7 @@ SBProcess SBCommandInterpreter::GetProcess() {
}
}
- return LLDB_RECORD_RESULT(sb_process);
+ return sb_process;
}
SBDebugger SBCommandInterpreter::GetDebugger() {
@@ -384,7 +384,7 @@ SBDebugger SBCommandInterpreter::GetDebugger() {
if (IsValid())
sb_debugger.reset(m_opaque_ptr->GetDebugger().shared_from_this());
- return LLDB_RECORD_RESULT(sb_debugger);
+ return sb_debugger;
}
bool SBCommandInterpreter::GetPromptOnQuit() {
@@ -510,8 +510,7 @@ SBBroadcaster SBCommandInterpreter::GetBroadcaster() {
SBBroadcaster broadcaster(m_opaque_ptr, false);
-
- return LLDB_RECORD_RESULT(broadcaster);
+ return broadcaster;
}
const char *SBCommandInterpreter::GetBroadcasterClass() {
@@ -579,8 +578,8 @@ lldb::SBCommand SBCommandInterpreter::AddMultiwordCommand(const char *name,
new_command_sp->GetAsMultiwordCommand()->SetRemovable(true);
Status add_error = m_opaque_ptr->AddUserCommand(name, new_command_sp, true);
if (add_error.Success())
- return LLDB_RECORD_RESULT(lldb::SBCommand(new_command_sp));
- return LLDB_RECORD_RESULT(lldb::SBCommand());
+ return lldb::SBCommand(new_command_sp);
+ return lldb::SBCommand();
}
lldb::SBCommand SBCommandInterpreter::AddCommand(
@@ -590,8 +589,8 @@ lldb::SBCommand SBCommandInterpreter::AddCommand(
(const char *, lldb::SBCommandPluginInterface *, const char *), name,
impl, help);
- return LLDB_RECORD_RESULT(AddCommand(name, impl, help, /*syntax=*/nullptr,
- /*auto_repeat_command=*/""))
+ return AddCommand(name, impl, help, /*syntax=*/nullptr,
+ /*auto_repeat_command=*/"");
}
lldb::SBCommand
@@ -602,8 +601,7 @@ SBCommandInterpreter::AddCommand(const char *name,
(const char *, lldb::SBCommandPluginInterface *,
const char *, const char *),
name, impl, help, syntax);
- return LLDB_RECORD_RESULT(
- AddCommand(name, impl, help, syntax, /*auto_repeat_command=*/""))
+ return AddCommand(name, impl, help, syntax, /*auto_repeat_command=*/"");
}
lldb::SBCommand SBCommandInterpreter::AddCommand(
@@ -621,8 +619,8 @@ lldb::SBCommand SBCommandInterpreter::AddCommand(
Status add_error = m_opaque_ptr->AddUserCommand(name, new_command_sp, true);
if (add_error.Success())
- return LLDB_RECORD_RESULT(lldb::SBCommand(new_command_sp));
- return LLDB_RECORD_RESULT(lldb::SBCommand());
+ return lldb::SBCommand(new_command_sp);
+ return lldb::SBCommand();
}
SBCommand::SBCommand() { LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBCommand); }
@@ -679,16 +677,16 @@ lldb::SBCommand SBCommand::AddMultiwordCommand(const char *name,
(const char *, const char *), name, help);
if (!IsValid())
- return LLDB_RECORD_RESULT(lldb::SBCommand());
+ return lldb::SBCommand();
if (!m_opaque_sp->IsMultiwordObject())
- return LLDB_RECORD_RESULT(lldb::SBCommand());
+ return lldb::SBCommand();
CommandObjectMultiword *new_command = new CommandObjectMultiword(
m_opaque_sp->GetCommandInterpreter(), name, help);
new_command->SetRemovable(true);
lldb::CommandObjectSP new_command_sp(new_command);
if (new_command_sp && m_opaque_sp->LoadSubCommand(name, new_command_sp))
- return LLDB_RECORD_RESULT(lldb::SBCommand(new_command_sp));
- return LLDB_RECORD_RESULT(lldb::SBCommand());
+ return lldb::SBCommand(new_command_sp);
+ return lldb::SBCommand();
}
lldb::SBCommand SBCommand::AddCommand(const char *name,
@@ -698,8 +696,8 @@ lldb::SBCommand SBCommand::AddCommand(const char *name,
lldb::SBCommand, SBCommand, AddCommand,
(const char *, lldb::SBCommandPluginInterface *, const char *), name,
impl, help);
- return LLDB_RECORD_RESULT(AddCommand(name, impl, help, /*syntax=*/nullptr,
- /*auto_repeat_command=*/""))
+ return AddCommand(name, impl, help, /*syntax=*/nullptr,
+ /*auto_repeat_command=*/"");
}
lldb::SBCommand SBCommand::AddCommand(const char *name,
@@ -709,8 +707,7 @@ lldb::SBCommand SBCommand::AddCommand(const char *name,
(const char *, lldb::SBCommandPluginInterface *,
const char *, const char *),
name, impl, help, syntax);
- return LLDB_RECORD_RESULT(
- AddCommand(name, impl, help, syntax, /*auto_repeat_command=*/""))
+ return AddCommand(name, impl, help, syntax, /*auto_repeat_command=*/"");
}
lldb::SBCommand SBCommand::AddCommand(const char *name,
@@ -723,16 +720,16 @@ lldb::SBCommand SBCommand::AddCommand(const char *name,
name, impl, help, syntax, auto_repeat_command);
if (!IsValid())
- return LLDB_RECORD_RESULT(lldb::SBCommand());
+ return lldb::SBCommand();
if (!m_opaque_sp->IsMultiwordObject())
- return LLDB_RECORD_RESULT(lldb::SBCommand());
+ return lldb::SBCommand();
lldb::CommandObjectSP new_command_sp;
new_command_sp = std::make_shared<CommandPluginInterfaceImplementation>(
m_opaque_sp->GetCommandInterpreter(), name, impl, help, syntax,
/*flags=*/0, auto_repeat_command);
if (new_command_sp && m_opaque_sp->LoadSubCommand(name, new_command_sp))
- return LLDB_RECORD_RESULT(lldb::SBCommand(new_command_sp));
- return LLDB_RECORD_RESULT(lldb::SBCommand());
+ return lldb::SBCommand(new_command_sp);
+ return lldb::SBCommand();
}
uint32_t SBCommand::GetFlags() {
diff --git a/lldb/source/API/SBCommandInterpreterRunOptions.cpp b/lldb/source/API/SBCommandInterpreterRunOptions.cpp
index d70091b3573a..eb1a4885f207 100644
--- a/lldb/source/API/SBCommandInterpreterRunOptions.cpp
+++ b/lldb/source/API/SBCommandInterpreterRunOptions.cpp
@@ -41,9 +41,9 @@ SBCommandInterpreterRunOptions &SBCommandInterpreterRunOptions::operator=(
(const lldb::SBCommandInterpreterRunOptions &), rhs);
if (this == &rhs)
- return LLDB_RECORD_RESULT(*this);
+ return *this;
*m_opaque_up = *rhs.m_opaque_up;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
bool SBCommandInterpreterRunOptions::GetStopOnContinue() const {
@@ -227,9 +227,9 @@ SBCommandInterpreterRunResult &SBCommandInterpreterRunResult::operator=(
(const lldb::SBCommandInterpreterRunResult &), rhs);
if (this == &rhs)
- return LLDB_RECORD_RESULT(*this);
+ return *this;
*m_opaque_up = *rhs.m_opaque_up;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
int SBCommandInterpreterRunResult::GetNumberOfErrors() const {
diff --git a/lldb/source/API/SBCommandReturnObject.cpp b/lldb/source/API/SBCommandReturnObject.cpp
index 687a50f0db63..f88f0007a143 100644
--- a/lldb/source/API/SBCommandReturnObject.cpp
+++ b/lldb/source/API/SBCommandReturnObject.cpp
@@ -71,7 +71,7 @@ operator=(const SBCommandReturnObject &rhs) {
if (this != &rhs)
m_opaque_up = clone(rhs.m_opaque_up);
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBCommandReturnObject::~SBCommandReturnObject() = default;
diff --git a/lldb/source/API/SBCommunication.cpp b/lldb/source/API/SBCommunication.cpp
index 843db695a8f5..e451e74675db 100644
--- a/lldb/source/API/SBCommunication.cpp
+++ b/lldb/source/API/SBCommunication.cpp
@@ -175,7 +175,7 @@ SBBroadcaster SBCommunication::GetBroadcaster() {
GetBroadcaster);
SBBroadcaster broadcaster(m_opaque, false);
- return LLDB_RECORD_RESULT(broadcaster);
+ return broadcaster;
}
const char *SBCommunication::GetBroadcasterClass() {
diff --git a/lldb/source/API/SBCompileUnit.cpp b/lldb/source/API/SBCompileUnit.cpp
index 87bbbbed1bdc..f3f3246ef2b5 100644
--- a/lldb/source/API/SBCompileUnit.cpp
+++ b/lldb/source/API/SBCompileUnit.cpp
@@ -39,7 +39,7 @@ const SBCompileUnit &SBCompileUnit::operator=(const SBCompileUnit &rhs) {
rhs);
m_opaque_ptr = rhs.m_opaque_ptr;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBCompileUnit::~SBCompileUnit() { m_opaque_ptr = nullptr; }
@@ -51,7 +51,7 @@ SBFileSpec SBCompileUnit::GetFileSpec() const {
SBFileSpec file_spec;
if (m_opaque_ptr)
file_spec.SetFileSpec(m_opaque_ptr->GetPrimaryFile());
- return LLDB_RECORD_RESULT(file_spec);
+ return file_spec;
}
uint32_t SBCompileUnit::GetNumLineEntries() const {
@@ -80,7 +80,7 @@ SBLineEntry SBCompileUnit::GetLineEntryAtIndex(uint32_t idx) const {
}
}
- return LLDB_RECORD_RESULT(sb_line_entry);
+ return sb_line_entry;
}
uint32_t SBCompileUnit::FindLineEntryIndex(uint32_t start_idx, uint32_t line,
@@ -133,21 +133,21 @@ lldb::SBTypeList SBCompileUnit::GetTypes(uint32_t type_mask) {
SBTypeList sb_type_list;
if (!m_opaque_ptr)
- return LLDB_RECORD_RESULT(sb_type_list);
+ return sb_type_list;
ModuleSP module_sp(m_opaque_ptr->GetModule());
if (!module_sp)
- return LLDB_RECORD_RESULT(sb_type_list);
+ return sb_type_list;
SymbolFile *symfile = module_sp->GetSymbolFile();
if (!symfile)
- return LLDB_RECORD_RESULT(sb_type_list);
+ return sb_type_list;
TypeClass type_class = static_cast<TypeClass>(type_mask);
TypeList type_list;
symfile->GetTypes(m_opaque_ptr, type_class, type_list);
sb_type_list.m_opaque_up->Append(type_list);
- return LLDB_RECORD_RESULT(sb_type_list);
+ return sb_type_list;
}
SBFileSpec SBCompileUnit::GetSupportFileAtIndex(uint32_t idx) const {
@@ -160,8 +160,7 @@ SBFileSpec SBCompileUnit::GetSupportFileAtIndex(uint32_t idx) const {
sb_file_spec.SetFileSpec(spec);
}
-
- return LLDB_RECORD_RESULT(sb_file_spec);
+ return sb_file_spec;
}
uint32_t SBCompileUnit::FindSupportFileIndex(uint32_t start_idx,
diff --git a/lldb/source/API/SBData.cpp b/lldb/source/API/SBData.cpp
index 5022724f303a..ba33995d7acd 100644
--- a/lldb/source/API/SBData.cpp
+++ b/lldb/source/API/SBData.cpp
@@ -38,7 +38,7 @@ const SBData &SBData::operator=(const SBData &rhs) {
if (this != &rhs)
m_opaque_sp = rhs.m_opaque_sp;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBData::~SBData() = default;
@@ -410,7 +410,7 @@ lldb::SBData SBData::CreateDataFromCString(lldb::ByteOrder endian,
addr_byte_size, data);
if (!data || !data[0])
- return LLDB_RECORD_RESULT(SBData());
+ return SBData();
uint32_t data_len = strlen(data);
@@ -420,7 +420,7 @@ lldb::SBData SBData::CreateDataFromCString(lldb::ByteOrder endian,
SBData ret(data_sp);
- return LLDB_RECORD_RESULT(ret);
+ return ret;
}
lldb::SBData SBData::CreateDataFromUInt64Array(lldb::ByteOrder endian,
@@ -432,7 +432,7 @@ lldb::SBData SBData::CreateDataFromUInt64Array(lldb::ByteOrder endian,
endian, addr_byte_size, array, array_len);
if (!array || array_len == 0)
- return LLDB_RECORD_RESULT(SBData());
+ return SBData();
size_t data_len = array_len * sizeof(uint64_t);
@@ -442,7 +442,7 @@ lldb::SBData SBData::CreateDataFromUInt64Array(lldb::ByteOrder endian,
SBData ret(data_sp);
- return LLDB_RECORD_RESULT(ret);
+ return ret;
}
lldb::SBData SBData::CreateDataFromUInt32Array(lldb::ByteOrder endian,
@@ -454,7 +454,7 @@ lldb::SBData SBData::CreateDataFromUInt32Array(lldb::ByteOrder endian,
endian, addr_byte_size, array, array_len);
if (!array || array_len == 0)
- return LLDB_RECORD_RESULT(SBData());
+ return SBData();
size_t data_len = array_len * sizeof(uint32_t);
@@ -464,7 +464,7 @@ lldb::SBData SBData::CreateDataFromUInt32Array(lldb::ByteOrder endian,
SBData ret(data_sp);
- return LLDB_RECORD_RESULT(ret);
+ return ret;
}
lldb::SBData SBData::CreateDataFromSInt64Array(lldb::ByteOrder endian,
@@ -476,7 +476,7 @@ lldb::SBData SBData::CreateDataFromSInt64Array(lldb::ByteOrder endian,
endian, addr_byte_size, array, array_len);
if (!array || array_len == 0)
- return LLDB_RECORD_RESULT(SBData());
+ return SBData();
size_t data_len = array_len * sizeof(int64_t);
@@ -486,7 +486,7 @@ lldb::SBData SBData::CreateDataFromSInt64Array(lldb::ByteOrder endian,
SBData ret(data_sp);
- return LLDB_RECORD_RESULT(ret);
+ return ret;
}
lldb::SBData SBData::CreateDataFromSInt32Array(lldb::ByteOrder endian,
@@ -498,7 +498,7 @@ lldb::SBData SBData::CreateDataFromSInt32Array(lldb::ByteOrder endian,
endian, addr_byte_size, array, array_len);
if (!array || array_len == 0)
- return LLDB_RECORD_RESULT(SBData());
+ return SBData();
size_t data_len = array_len * sizeof(int32_t);
@@ -508,7 +508,7 @@ lldb::SBData SBData::CreateDataFromSInt32Array(lldb::ByteOrder endian,
SBData ret(data_sp);
- return LLDB_RECORD_RESULT(ret);
+ return ret;
}
lldb::SBData SBData::CreateDataFromDoubleArray(lldb::ByteOrder endian,
@@ -520,7 +520,7 @@ lldb::SBData SBData::CreateDataFromDoubleArray(lldb::ByteOrder endian,
endian, addr_byte_size, array, array_len);
if (!array || array_len == 0)
- return LLDB_RECORD_RESULT(SBData());
+ return SBData();
size_t data_len = array_len * sizeof(double);
@@ -530,7 +530,7 @@ lldb::SBData SBData::CreateDataFromDoubleArray(lldb::ByteOrder endian,
SBData ret(data_sp);
- return LLDB_RECORD_RESULT(ret);
+ return ret;
}
bool SBData::SetDataFromCString(const char *data) {
diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp
index 6c9b647023af..16614556d4b5 100644
--- a/lldb/source/API/SBDebugger.cpp
+++ b/lldb/source/API/SBDebugger.cpp
@@ -146,7 +146,7 @@ SBDebugger &SBDebugger::operator=(const SBDebugger &rhs) {
if (this != &rhs) {
m_opaque_sp = rhs.m_opaque_sp;
}
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
const char *SBDebugger::GetBroadcasterClass() {
@@ -175,13 +175,13 @@ const char *SBDebugger::GetProgressFromEvent(const lldb::SBEvent &event,
const char *, SBDebugger, GetProgressFromEvent,
(const lldb::SBEvent &, uint64_t &, uint64_t &, uint64_t &, bool &),
event, progress_id, completed, total, is_debugger_specific);
- return LLDB_RECORD_RESULT(progress_data->GetMessage().c_str())
+ return progress_data->GetMessage().c_str();
}
SBBroadcaster SBDebugger::GetBroadcaster() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBBroadcaster, SBDebugger, GetBroadcaster);
SBBroadcaster broadcaster(&m_opaque_sp->GetBroadcaster(), false);
- return LLDB_RECORD_RESULT(broadcaster);
+ return broadcaster;
}
void SBDebugger::Initialize() {
@@ -198,7 +198,7 @@ lldb::SBError SBDebugger::InitializeWithErrorHandling() {
std::make_unique<SystemInitializerFull>(), LoadPlugin)) {
error.SetError(Status(std::move(e)));
}
- return LLDB_RECORD_RESULT(error);
+ return error;
}
void SBDebugger::Terminate() {
@@ -219,15 +219,14 @@ void SBDebugger::Clear() {
SBDebugger SBDebugger::Create() {
LLDB_RECORD_STATIC_METHOD_NO_ARGS(lldb::SBDebugger, SBDebugger, Create);
- return LLDB_RECORD_RESULT(SBDebugger::Create(false, nullptr, nullptr));
+ return SBDebugger::Create(false, nullptr, nullptr);
}
SBDebugger SBDebugger::Create(bool source_init_files) {
LLDB_RECORD_STATIC_METHOD(lldb::SBDebugger, SBDebugger, Create, (bool),
source_init_files);
- return LLDB_RECORD_RESULT(
- SBDebugger::Create(source_init_files, nullptr, nullptr));
+ return SBDebugger::Create(source_init_files, nullptr, nullptr);
}
SBDebugger SBDebugger::Create(bool source_init_files,
@@ -336,22 +335,22 @@ SBError SBDebugger::SetInputString(const char *data) {
SBError sb_error;
if (data == nullptr) {
sb_error.SetErrorString("String data is null");
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
size_t size = strlen(data);
if (size == 0) {
sb_error.SetErrorString("String data is empty");
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
if (!m_opaque_sp) {
sb_error.SetErrorString("invalid debugger");
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
sb_error.SetError(m_opaque_sp->SetInputString(data));
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
// Shouldn't really be settable after initialization as this could cause lots
@@ -363,20 +362,20 @@ SBError SBDebugger::SetInputFile(SBFile file) {
SBError error;
if (!m_opaque_sp) {
error.ref().SetErrorString("invalid debugger");
- return LLDB_RECORD_RESULT(error);
+ return error;
}
error.SetError(m_opaque_sp->SetInputFile(file.m_opaque_sp));
- return LLDB_RECORD_RESULT(error);
+ return error;
}
SBError SBDebugger::SetInputFile(FileSP file_sp) {
LLDB_RECORD_METHOD(SBError, SBDebugger, SetInputFile, (FileSP), file_sp);
- return LLDB_RECORD_RESULT(SetInputFile(SBFile(file_sp)));
+ return SetInputFile(SBFile(file_sp));
}
SBError SBDebugger::SetOutputFile(FileSP file_sp) {
LLDB_RECORD_METHOD(SBError, SBDebugger, SetOutputFile, (FileSP), file_sp);
- return LLDB_RECORD_RESULT(SetOutputFile(SBFile(file_sp)));
+ return SetOutputFile(SBFile(file_sp));
}
void SBDebugger::SetOutputFileHandle(FILE *fh, bool transfer_ownership) {
@@ -390,14 +389,14 @@ SBError SBDebugger::SetOutputFile(SBFile file) {
SBError error;
if (!m_opaque_sp) {
error.ref().SetErrorString("invalid debugger");
- return LLDB_RECORD_RESULT(error);
+ return error;
}
if (!file) {
error.ref().SetErrorString("invalid file");
- return LLDB_RECORD_RESULT(error);
+ return error;
}
m_opaque_sp->SetOutputFile(file.m_opaque_sp);
- return LLDB_RECORD_RESULT(error);
+ return error;
}
void SBDebugger::SetErrorFileHandle(FILE *fh, bool transfer_ownership) {
@@ -408,7 +407,7 @@ void SBDebugger::SetErrorFileHandle(FILE *fh, bool transfer_ownership) {
SBError SBDebugger::SetErrorFile(FileSP file_sp) {
LLDB_RECORD_METHOD(SBError, SBDebugger, SetErrorFile, (FileSP), file_sp);
- return LLDB_RECORD_RESULT(SetErrorFile(SBFile(file_sp)));
+ return SetErrorFile(SBFile(file_sp));
}
SBError SBDebugger::SetErrorFile(SBFile file) {
@@ -416,49 +415,49 @@ SBError SBDebugger::SetErrorFile(SBFile file) {
SBError error;
if (!m_opaque_sp) {
error.ref().SetErrorString("invalid debugger");
- return LLDB_RECORD_RESULT(error);
+ return error;
}
if (!file) {
error.ref().SetErrorString("invalid file");
- return LLDB_RECORD_RESULT(error);
+ return error;
}
m_opaque_sp->SetErrorFile(file.m_opaque_sp);
- return LLDB_RECORD_RESULT(error);
+ return error;
}
FILE *SBDebugger::GetInputFileHandle() {
LLDB_RECORD_METHOD_NO_ARGS(FILE *, SBDebugger, GetInputFileHandle);
if (m_opaque_sp) {
File &file_sp = m_opaque_sp->GetInputFile();
- return LLDB_RECORD_RESULT(file_sp.GetStream());
+ return file_sp.GetStream();
}
- return LLDB_RECORD_RESULT(nullptr);
+ return nullptr;
}
SBFile SBDebugger::GetInputFile() {
LLDB_RECORD_METHOD_NO_ARGS(SBFile, SBDebugger, GetInputFile);
if (m_opaque_sp) {
- return LLDB_RECORD_RESULT(SBFile(m_opaque_sp->GetInputFileSP()));
+ return SBFile(m_opaque_sp->GetInputFileSP());
}
- return LLDB_RECORD_RESULT(SBFile());
+ return SBFile();
}
FILE *SBDebugger::GetOutputFileHandle() {
LLDB_RECORD_METHOD_NO_ARGS(FILE *, SBDebugger, GetOutputFileHandle);
if (m_opaque_sp) {
StreamFile &stream_file = m_opaque_sp->GetOutputStream();
- return LLDB_RECORD_RESULT(stream_file.GetFile().GetStream());
+ return stream_file.GetFile().GetStream();
}
- return LLDB_RECORD_RESULT(nullptr);
+ return nullptr;
}
SBFile SBDebugger::GetOutputFile() {
LLDB_RECORD_METHOD_NO_ARGS(SBFile, SBDebugger, GetOutputFile);
if (m_opaque_sp) {
SBFile file(m_opaque_sp->GetOutputStream().GetFileSP());
- return LLDB_RECORD_RESULT(file);
+ return file;
}
- return LLDB_RECORD_RESULT(SBFile());
+ return SBFile();
}
FILE *SBDebugger::GetErrorFileHandle() {
@@ -466,9 +465,9 @@ FILE *SBDebugger::GetErrorFileHandle() {
if (m_opaque_sp) {
StreamFile &stream_file = m_opaque_sp->GetErrorStream();
- return LLDB_RECORD_RESULT(stream_file.GetFile().GetStream());
+ return stream_file.GetFile().GetStream();
}
- return LLDB_RECORD_RESULT(nullptr);
+ return nullptr;
}
SBFile SBDebugger::GetErrorFile() {
@@ -476,9 +475,9 @@ SBFile SBDebugger::GetErrorFile() {
SBFile file;
if (m_opaque_sp) {
SBFile file(m_opaque_sp->GetErrorStream().GetFileSP());
- return LLDB_RECORD_RESULT(file);
+ return file;
}
- return LLDB_RECORD_RESULT(SBFile());
+ return SBFile();
}
void SBDebugger::SaveInputTerminalState() {
@@ -502,7 +501,7 @@ SBCommandInterpreter SBDebugger::GetCommandInterpreter() {
if (m_opaque_sp)
sb_interpreter.reset(&m_opaque_sp->GetCommandInterpreter());
- return LLDB_RECORD_RESULT(sb_interpreter);
+ return sb_interpreter;
}
void SBDebugger::HandleCommand(const char *command) {
@@ -545,7 +544,7 @@ SBListener SBDebugger::GetListener() {
if (m_opaque_sp)
sb_listener.reset(m_opaque_sp->GetListener());
- return LLDB_RECORD_RESULT(sb_listener);
+ return sb_listener;
}
void SBDebugger::HandleProcessEvent(const SBProcess &process,
@@ -627,7 +626,7 @@ SBSourceManager SBDebugger::GetSourceManager() {
GetSourceManager);
SBSourceManager sb_source_manager(*this);
- return LLDB_RECORD_RESULT(sb_source_manager);
+ return sb_source_manager;
}
bool SBDebugger::GetDefaultArchitecture(char *arch_name, size_t arch_name_len) {
@@ -690,7 +689,7 @@ SBDebugger::GetScriptInterpreterInfo(lldb::ScriptLanguage language) {
data.m_impl_up->SetObjectSP(interp->GetInterpreterInfo());
}
}
- return LLDB_RECORD_RESULT(data);
+ return data;
}
const char *SBDebugger::GetVersionString() {
@@ -756,7 +755,7 @@ SBStructuredData SBDebugger::GetBuildConfiguration() {
SBStructuredData data;
data.m_impl_up->SetObjectSP(std::move(config_up));
- return LLDB_RECORD_RESULT(data);
+ return data;
}
bool SBDebugger::StateIsRunningState(StateType state) {
@@ -814,7 +813,7 @@ lldb::SBTarget SBDebugger::CreateTarget(const char *filename,
platform_name, add_dependent_modules, sb_error.GetCString(),
static_cast<void *>(target_sp.get()));
- return LLDB_RECORD_RESULT(sb_target);
+ return sb_target;
}
SBTarget
@@ -842,7 +841,7 @@ SBDebugger::CreateTargetWithFileAndTargetTriple(const char *filename,
static_cast<void *>(m_opaque_sp.get()), filename, target_triple,
static_cast<void *>(target_sp.get()));
- return LLDB_RECORD_RESULT(sb_target);
+ return sb_target;
}
SBTarget SBDebugger::CreateTargetWithFileAndArch(const char *filename,
@@ -885,7 +884,7 @@ SBTarget SBDebugger::CreateTargetWithFileAndArch(const char *filename,
arch_cstr ? arch_cstr : "<unspecified>",
static_cast<void *>(target_sp.get()));
- return LLDB_RECORD_RESULT(sb_target);
+ return sb_target;
}
SBTarget SBDebugger::CreateTarget(const char *filename) {
@@ -910,7 +909,7 @@ SBTarget SBDebugger::CreateTarget(const char *filename) {
"SBDebugger(%p)::CreateTarget (filename=\"%s\") => SBTarget(%p)",
static_cast<void *>(m_opaque_sp.get()), filename,
static_cast<void *>(target_sp.get()));
- return LLDB_RECORD_RESULT(sb_target);
+ return sb_target;
}
SBTarget SBDebugger::GetDummyTarget() {
@@ -924,7 +923,7 @@ SBTarget SBDebugger::GetDummyTarget() {
LLDB_LOGF(log, "SBDebugger(%p)::GetDummyTarget() => SBTarget(%p)",
static_cast<void *>(m_opaque_sp.get()),
static_cast<void *>(sb_target.GetSP().get()));
- return LLDB_RECORD_RESULT(sb_target);
+ return sb_target;
}
bool SBDebugger::DeleteTarget(lldb::SBTarget &target) {
@@ -959,7 +958,7 @@ SBTarget SBDebugger::GetTargetAtIndex(uint32_t idx) {
// No need to lock, the target list is thread safe
sb_target.SetSP(m_opaque_sp->GetTargetList().GetTargetAtIndex(idx));
}
- return LLDB_RECORD_RESULT(sb_target);
+ return sb_target;
}
uint32_t SBDebugger::GetIndexOfTarget(lldb::SBTarget target) {
@@ -985,7 +984,7 @@ SBTarget SBDebugger::FindTargetWithProcessID(lldb::pid_t pid) {
// No need to lock, the target list is thread safe
sb_target.SetSP(m_opaque_sp->GetTargetList().FindTargetWithProcessID(pid));
}
- return LLDB_RECORD_RESULT(sb_target);
+ return sb_target;
}
SBTarget SBDebugger::FindTargetWithFileAndArch(const char *filename,
@@ -1003,7 +1002,7 @@ SBTarget SBDebugger::FindTargetWithFileAndArch(const char *filename,
FileSpec(filename), arch_name ? &arch : nullptr));
sb_target.SetSP(target_sp);
}
- return LLDB_RECORD_RESULT(sb_target);
+ return sb_target;
}
SBTarget SBDebugger::FindTargetWithLLDBProcess(const ProcessSP &process_sp) {
@@ -1047,7 +1046,7 @@ SBTarget SBDebugger::GetSelectedTarget() {
static_cast<void *>(target_sp.get()), sstr.GetData());
}
- return LLDB_RECORD_RESULT(sb_target);
+ return sb_target;
}
void SBDebugger::SetSelectedTarget(SBTarget &sb_target) {
@@ -1083,7 +1082,7 @@ SBPlatform SBDebugger::GetSelectedPlatform() {
static_cast<void *>(m_opaque_sp.get()),
static_cast<void *>(sb_platform.GetSP().get()),
sb_platform.GetName());
- return LLDB_RECORD_RESULT(sb_platform);
+ return sb_platform;
}
void SBDebugger::SetSelectedPlatform(SBPlatform &sb_platform) {
@@ -1122,7 +1121,7 @@ SBPlatform SBDebugger::GetPlatformAtIndex(uint32_t idx) {
// No need to lock, the platform list is thread safe
sb_platform.SetSP(m_opaque_sp->GetPlatformList().GetAtIndex(idx));
}
- return LLDB_RECORD_RESULT(sb_platform);
+ return sb_platform;
}
uint32_t SBDebugger::GetNumAvailablePlatforms() {
@@ -1156,7 +1155,7 @@ SBStructuredData SBDebugger::GetAvailablePlatformInfoAtIndex(uint32_t idx) {
llvm::StringRef plugin_name =
PluginManager::GetPlatformPluginNameAtIndex(idx - 1);
if (plugin_name.empty()) {
- return LLDB_RECORD_RESULT(data);
+ return data;
}
platform_dict->AddStringItem(name_str, llvm::StringRef(plugin_name));
@@ -1167,7 +1166,7 @@ SBStructuredData SBDebugger::GetAvailablePlatformInfoAtIndex(uint32_t idx) {
data.m_impl_up->SetObjectSP(
StructuredData::ObjectSP(platform_dict.release()));
- return LLDB_RECORD_RESULT(data);
+ return data;
}
void SBDebugger::DispatchInput(void *baton, const void *data, size_t data_len) {
@@ -1261,13 +1260,13 @@ SBCommandInterpreterRunResult SBDebugger::RunCommandInterpreter(
(const lldb::SBCommandInterpreterRunOptions &), options);
if (!m_opaque_sp)
- return LLDB_RECORD_RESULT(SBCommandInterpreterRunResult());
+ return SBCommandInterpreterRunResult();
CommandInterpreter &interp = m_opaque_sp->GetCommandInterpreter();
CommandInterpreterRunResult result =
interp.RunCommandInterpreter(options.ref());
- return LLDB_RECORD_RESULT(SBCommandInterpreterRunResult(result));
+ return SBCommandInterpreterRunResult(result);
}
SBError SBDebugger::RunREPL(lldb::LanguageType language,
@@ -1281,7 +1280,7 @@ SBError SBDebugger::RunREPL(lldb::LanguageType language,
error.ref() = m_opaque_sp->RunREPL(language, repl_options);
else
error.SetErrorString("invalid debugger");
- return LLDB_RECORD_RESULT(error);
+ return error;
}
void SBDebugger::reset(const DebuggerSP &debugger_sp) {
@@ -1306,7 +1305,7 @@ SBDebugger SBDebugger::FindDebuggerWithID(int id) {
DebuggerSP debugger_sp = Debugger::FindDebuggerWithID(id);
if (debugger_sp)
sb_debugger.reset(debugger_sp);
- return LLDB_RECORD_RESULT(sb_debugger);
+ return sb_debugger;
}
const char *SBDebugger::GetInstanceName() {
@@ -1336,7 +1335,7 @@ SBError SBDebugger::SetInternalVariable(const char *var_name, const char *value,
}
if (error.Fail())
sb_error.SetError(error);
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
SBStringList
@@ -1361,11 +1360,11 @@ SBDebugger::GetInternalVariableValue(const char *var_name,
if (!value_str.empty()) {
StringList string_list;
string_list.SplitIntoLines(value_str);
- return LLDB_RECORD_RESULT(SBStringList(&string_list));
+ return SBStringList(&string_list);
}
}
}
- return LLDB_RECORD_RESULT(SBStringList());
+ return SBStringList();
}
uint32_t SBDebugger::GetTerminalWidth() const {
@@ -1527,7 +1526,7 @@ SBError SBDebugger::SetCurrentPlatform(const char *platform_name_cstr) {
} else {
sb_error.ref().SetErrorString("invalid debugger");
}
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
bool SBDebugger::SetCurrentPlatformSDKRoot(const char *sysroot) {
@@ -1568,15 +1567,15 @@ SBTypeCategory SBDebugger::GetCategory(const char *category_name) {
(const char *), category_name);
if (!category_name || *category_name == 0)
- return LLDB_RECORD_RESULT(SBTypeCategory());
+ return SBTypeCategory();
TypeCategoryImplSP category_sp;
if (DataVisualization::Categories::GetCategory(ConstString(category_name),
category_sp, false)) {
- return LLDB_RECORD_RESULT(SBTypeCategory(category_sp));
+ return SBTypeCategory(category_sp);
} else {
- return LLDB_RECORD_RESULT(SBTypeCategory());
+ return SBTypeCategory();
}
}
@@ -1586,9 +1585,9 @@ SBTypeCategory SBDebugger::GetCategory(lldb::LanguageType lang_type) {
TypeCategoryImplSP category_sp;
if (DataVisualization::Categories::GetCategory(lang_type, category_sp)) {
- return LLDB_RECORD_RESULT(SBTypeCategory(category_sp));
+ return SBTypeCategory(category_sp);
} else {
- return LLDB_RECORD_RESULT(SBTypeCategory());
+ return SBTypeCategory();
}
}
@@ -1597,15 +1596,15 @@ SBTypeCategory SBDebugger::CreateCategory(const char *category_name) {
(const char *), category_name);
if (!category_name || *category_name == 0)
- return LLDB_RECORD_RESULT(SBTypeCategory());
+ return SBTypeCategory();
TypeCategoryImplSP category_sp;
if (DataVisualization::Categories::GetCategory(ConstString(category_name),
category_sp, true)) {
- return LLDB_RECORD_RESULT(SBTypeCategory(category_sp));
+ return SBTypeCategory(category_sp);
} else {
- return LLDB_RECORD_RESULT(SBTypeCategory());
+ return SBTypeCategory();
}
}
@@ -1629,15 +1628,15 @@ SBTypeCategory SBDebugger::GetCategoryAtIndex(uint32_t index) {
LLDB_RECORD_METHOD(lldb::SBTypeCategory, SBDebugger, GetCategoryAtIndex,
(uint32_t), index);
- return LLDB_RECORD_RESULT(
- SBTypeCategory(DataVisualization::Categories::GetCategoryAtIndex(index)));
+ return SBTypeCategory(
+ DataVisualization::Categories::GetCategoryAtIndex(index));
}
SBTypeCategory SBDebugger::GetDefaultCategory() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBTypeCategory, SBDebugger,
GetDefaultCategory);
- return LLDB_RECORD_RESULT(GetCategory("default"));
+ return GetCategory("default");
}
SBTypeFormat SBDebugger::GetFormatForType(SBTypeNameSpecifier type_name) {
@@ -1646,8 +1645,8 @@ SBTypeFormat SBDebugger::GetFormatForType(SBTypeNameSpecifier type_name) {
SBTypeCategory default_category_sb = GetDefaultCategory();
if (default_category_sb.GetEnabled())
- return LLDB_RECORD_RESULT(default_category_sb.GetFormatForType(type_name));
- return LLDB_RECORD_RESULT(SBTypeFormat());
+ return default_category_sb.GetFormatForType(type_name);
+ return SBTypeFormat();
}
SBTypeSummary SBDebugger::GetSummaryForType(SBTypeNameSpecifier type_name) {
@@ -1655,9 +1654,8 @@ SBTypeSummary SBDebugger::GetSummaryForType(SBTypeNameSpecifier type_name) {
(lldb::SBTypeNameSpecifier), type_name);
if (!type_name.IsValid())
- return LLDB_RECORD_RESULT(SBTypeSummary());
- return LLDB_RECORD_RESULT(
- SBTypeSummary(DataVisualization::GetSummaryForType(type_name.GetSP())));
+ return SBTypeSummary();
+ return SBTypeSummary(DataVisualization::GetSummaryForType(type_name.GetSP()));
}
SBTypeFilter SBDebugger::GetFilterForType(SBTypeNameSpecifier type_name) {
@@ -1665,9 +1663,8 @@ SBTypeFilter SBDebugger::GetFilterForType(SBTypeNameSpecifier type_name) {
(lldb::SBTypeNameSpecifier), type_name);
if (!type_name.IsValid())
- return LLDB_RECORD_RESULT(SBTypeFilter());
- return LLDB_RECORD_RESULT(
- SBTypeFilter(DataVisualization::GetFilterForType(type_name.GetSP())));
+ return SBTypeFilter();
+ return SBTypeFilter(DataVisualization::GetFilterForType(type_name.GetSP()));
}
SBTypeSynthetic SBDebugger::GetSyntheticForType(SBTypeNameSpecifier type_name) {
@@ -1675,9 +1672,9 @@ SBTypeSynthetic SBDebugger::GetSyntheticForType(SBTypeNameSpecifier type_name) {
(lldb::SBTypeNameSpecifier), type_name);
if (!type_name.IsValid())
- return LLDB_RECORD_RESULT(SBTypeSynthetic());
- return LLDB_RECORD_RESULT(SBTypeSynthetic(
- DataVisualization::GetSyntheticForType(type_name.GetSP())));
+ return SBTypeSynthetic();
+ return SBTypeSynthetic(
+ DataVisualization::GetSyntheticForType(type_name.GetSP()));
}
static llvm::ArrayRef<const char *> GetCategoryArray(const char **categories) {
diff --git a/lldb/source/API/SBDeclaration.cpp b/lldb/source/API/SBDeclaration.cpp
index de9daa0baca9..f0273b081bb8 100644
--- a/lldb/source/API/SBDeclaration.cpp
+++ b/lldb/source/API/SBDeclaration.cpp
@@ -41,7 +41,7 @@ const SBDeclaration &SBDeclaration::operator=(const SBDeclaration &rhs) {
if (this != &rhs)
m_opaque_up = clone(rhs.m_opaque_up);
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
void SBDeclaration::SetDeclaration(
@@ -70,8 +70,7 @@ SBFileSpec SBDeclaration::GetFileSpec() const {
if (m_opaque_up.get() && m_opaque_up->GetFile())
sb_file_spec.SetFileSpec(m_opaque_up->GetFile());
-
- return LLDB_RECORD_RESULT(sb_file_spec);
+ return sb_file_spec;
}
uint32_t SBDeclaration::GetLine() const {
diff --git a/lldb/source/API/SBEnvironment.cpp b/lldb/source/API/SBEnvironment.cpp
index 88bb04ae4a05..d1df3ad12345 100644
--- a/lldb/source/API/SBEnvironment.cpp
+++ b/lldb/source/API/SBEnvironment.cpp
@@ -37,7 +37,7 @@ const SBEnvironment &SBEnvironment::operator=(const SBEnvironment &rhs) {
if (this != &rhs)
m_opaque_up = clone(rhs.m_opaque_up);
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
size_t SBEnvironment::GetNumValues() {
@@ -101,7 +101,7 @@ SBStringList SBEnvironment::GetEntries() {
for (const auto &KV : *m_opaque_up) {
entries.AppendString(Environment::compose(KV).c_str());
}
- return LLDB_RECORD_RESULT(entries);
+ return entries;
}
void SBEnvironment::PutEntry(const char *name_and_value) {
diff --git a/lldb/source/API/SBError.cpp b/lldb/source/API/SBError.cpp
index a65a2b626c4d..793ebb7df5eb 100644
--- a/lldb/source/API/SBError.cpp
+++ b/lldb/source/API/SBError.cpp
@@ -33,7 +33,7 @@ const SBError &SBError::operator=(const SBError &rhs) {
if (this != &rhs)
m_opaque_up = clone(rhs.m_opaque_up);
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
const char *SBError::GetCString() const {
diff --git a/lldb/source/API/SBEvent.cpp b/lldb/source/API/SBEvent.cpp
index c541176f937a..710ef2cf8118 100644
--- a/lldb/source/API/SBEvent.cpp
+++ b/lldb/source/API/SBEvent.cpp
@@ -53,7 +53,7 @@ const SBEvent &SBEvent::operator=(const SBEvent &rhs) {
m_event_sp = rhs.m_event_sp;
m_opaque_ptr = rhs.m_opaque_ptr;
}
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBEvent::~SBEvent() = default;
@@ -91,7 +91,7 @@ SBBroadcaster SBEvent::GetBroadcaster() const {
const Event *lldb_event = get();
if (lldb_event)
broadcaster.reset(lldb_event->GetBroadcaster(), false);
- return LLDB_RECORD_RESULT(broadcaster);
+ return broadcaster;
}
const char *SBEvent::GetBroadcasterClass() const {
diff --git a/lldb/source/API/SBExecutionContext.cpp b/lldb/source/API/SBExecutionContext.cpp
index 2869bef729e8..1f53e84ac6e6 100644
--- a/lldb/source/API/SBExecutionContext.cpp
+++ b/lldb/source/API/SBExecutionContext.cpp
@@ -74,7 +74,7 @@ operator=(const lldb::SBExecutionContext &rhs) {
SBExecutionContext, operator=,(const lldb::SBExecutionContext &), rhs);
m_exe_ctx_sp = rhs.m_exe_ctx_sp;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
ExecutionContextRef *SBExecutionContext::get() const {
@@ -91,7 +91,7 @@ SBTarget SBExecutionContext::GetTarget() const {
if (target_sp)
sb_target.SetSP(target_sp);
}
- return LLDB_RECORD_RESULT(sb_target);
+ return sb_target;
}
SBProcess SBExecutionContext::GetProcess() const {
@@ -104,7 +104,7 @@ SBProcess SBExecutionContext::GetProcess() const {
if (process_sp)
sb_process.SetSP(process_sp);
}
- return LLDB_RECORD_RESULT(sb_process);
+ return sb_process;
}
SBThread SBExecutionContext::GetThread() const {
@@ -117,7 +117,7 @@ SBThread SBExecutionContext::GetThread() const {
if (thread_sp)
sb_thread.SetThread(thread_sp);
}
- return LLDB_RECORD_RESULT(sb_thread);
+ return sb_thread;
}
SBFrame SBExecutionContext::GetFrame() const {
@@ -129,5 +129,5 @@ SBFrame SBExecutionContext::GetFrame() const {
if (frame_sp)
sb_frame.SetFrameSP(frame_sp);
}
- return LLDB_RECORD_RESULT(sb_frame);
+ return sb_frame;
}
diff --git a/lldb/source/API/SBExpressionOptions.cpp b/lldb/source/API/SBExpressionOptions.cpp
index 8bcc9cec258f..3fe861a6124b 100644
--- a/lldb/source/API/SBExpressionOptions.cpp
+++ b/lldb/source/API/SBExpressionOptions.cpp
@@ -35,7 +35,7 @@ operator=(const SBExpressionOptions &rhs) {
if (this != &rhs)
m_opaque_up = clone(rhs.m_opaque_up);
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBExpressionOptions::~SBExpressionOptions() = default;
diff --git a/lldb/source/API/SBFile.cpp b/lldb/source/API/SBFile.cpp
index a6249dddd9a6..4fae46ea10cb 100644
--- a/lldb/source/API/SBFile.cpp
+++ b/lldb/source/API/SBFile.cpp
@@ -32,7 +32,7 @@ SBFile &SBFile ::operator=(const SBFile &rhs) {
if (this != &rhs)
m_opaque_sp = rhs.m_opaque_sp;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBFile::SBFile() { LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBFile); }
@@ -69,7 +69,7 @@ SBError SBFile::Read(uint8_t *buf, size_t num_bytes, size_t *bytes_read) {
error.SetError(status);
*bytes_read = num_bytes;
}
- return LLDB_RECORD_RESULT(error);
+ return error;
}
SBError SBFile::Write(const uint8_t *buf, size_t num_bytes,
@@ -87,7 +87,7 @@ SBError SBFile::Write(const uint8_t *buf, size_t num_bytes,
error.SetError(status);
*bytes_written = num_bytes;
}
- return LLDB_RECORD_RESULT(error);
+ return error;
}
SBError SBFile::Flush() {
@@ -100,7 +100,7 @@ SBError SBFile::Flush() {
Status status = m_opaque_sp->Flush();
error.SetError(status);
}
- return LLDB_RECORD_RESULT(error);
+ return error;
}
bool SBFile::IsValid() const {
@@ -115,7 +115,7 @@ SBError SBFile::Close() {
Status status = m_opaque_sp->Close();
error.SetError(status);
}
- return LLDB_RECORD_RESULT(error);
+ return error;
}
SBFile::operator bool() const {
@@ -130,5 +130,5 @@ bool SBFile::operator!() const {
FileSP SBFile::GetFile() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(FileSP, SBFile, GetFile);
- return LLDB_RECORD_RESULT(m_opaque_sp);
+ return m_opaque_sp;
}
diff --git a/lldb/source/API/SBFileSpec.cpp b/lldb/source/API/SBFileSpec.cpp
index b435db0cd363..4274542d31fe 100644
--- a/lldb/source/API/SBFileSpec.cpp
+++ b/lldb/source/API/SBFileSpec.cpp
@@ -59,7 +59,7 @@ const SBFileSpec &SBFileSpec::operator=(const SBFileSpec &rhs) {
if (this != &rhs)
m_opaque_up = clone(rhs.m_opaque_up);
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
bool SBFileSpec::operator==(const SBFileSpec &rhs) const {
diff --git a/lldb/source/API/SBFileSpecList.cpp b/lldb/source/API/SBFileSpecList.cpp
index 44c0dcace91d..6e85957cb088 100644
--- a/lldb/source/API/SBFileSpecList.cpp
+++ b/lldb/source/API/SBFileSpecList.cpp
@@ -40,7 +40,7 @@ const SBFileSpecList &SBFileSpecList::operator=(const SBFileSpecList &rhs) {
if (this != &rhs)
m_opaque_up = clone(rhs.m_opaque_up);
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
uint32_t SBFileSpecList::GetSize() const {
@@ -84,7 +84,7 @@ const SBFileSpec SBFileSpecList::GetFileSpecAtIndex(uint32_t idx) const {
SBFileSpec new_spec;
new_spec.SetFileSpec(m_opaque_up->GetFileSpecAtIndex(idx));
- return LLDB_RECORD_RESULT(new_spec);
+ return new_spec;
}
const lldb_private::FileSpecList *SBFileSpecList::operator->() const {
diff --git a/lldb/source/API/SBFrame.cpp b/lldb/source/API/SBFrame.cpp
index 32a563e3ae86..ab3886e24d6f 100644
--- a/lldb/source/API/SBFrame.cpp
+++ b/lldb/source/API/SBFrame.cpp
@@ -78,7 +78,7 @@ const SBFrame &SBFrame::operator=(const SBFrame &rhs) {
if (this != &rhs)
m_opaque_sp = clone(rhs.m_opaque_sp);
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
StackFrameSP SBFrame::GetFrameSP() const {
@@ -129,7 +129,7 @@ SBSymbolContext SBFrame::GetSymbolContext(uint32_t resolve_scope) const {
}
}
- return LLDB_RECORD_RESULT(sb_sym_ctx);
+ return sb_sym_ctx;
}
SBModule SBFrame::GetModule() const {
@@ -154,7 +154,7 @@ SBModule SBFrame::GetModule() const {
}
}
- return LLDB_RECORD_RESULT(sb_module);
+ return sb_module;
}
SBCompileUnit SBFrame::GetCompileUnit() const {
@@ -179,7 +179,7 @@ SBCompileUnit SBFrame::GetCompileUnit() const {
}
}
- return LLDB_RECORD_RESULT(sb_comp_unit);
+ return sb_comp_unit;
}
SBFunction SBFrame::GetFunction() const {
@@ -203,7 +203,7 @@ SBFunction SBFrame::GetFunction() const {
}
}
- return LLDB_RECORD_RESULT(sb_function);
+ return sb_function;
}
SBSymbol SBFrame::GetSymbol() const {
@@ -226,7 +226,7 @@ SBSymbol SBFrame::GetSymbol() const {
}
}
- return LLDB_RECORD_RESULT(sb_symbol);
+ return sb_symbol;
}
SBBlock SBFrame::GetBlock() const {
@@ -247,7 +247,7 @@ SBBlock SBFrame::GetBlock() const {
sb_block.SetPtr(frame->GetSymbolContext(eSymbolContextBlock).block);
}
}
- return LLDB_RECORD_RESULT(sb_block);
+ return sb_block;
}
SBBlock SBFrame::GetFrameBlock() const {
@@ -268,7 +268,7 @@ SBBlock SBFrame::GetFrameBlock() const {
sb_block.SetPtr(frame->GetFrameBlock());
}
}
- return LLDB_RECORD_RESULT(sb_block);
+ return sb_block;
}
SBLineEntry SBFrame::GetLineEntry() const {
@@ -291,7 +291,7 @@ SBLineEntry SBFrame::GetLineEntry() const {
}
}
}
- return LLDB_RECORD_RESULT(sb_line_entry);
+ return sb_line_entry;
}
uint32_t SBFrame::GetFrameID() const {
@@ -432,7 +432,7 @@ SBAddress SBFrame::GetPCAddress() const {
sb_addr.SetAddress(frame->GetFrameCodeAddress());
}
}
- return LLDB_RECORD_RESULT(sb_addr);
+ return sb_addr;
}
void SBFrame::Clear() {
@@ -456,7 +456,7 @@ lldb::SBValue SBFrame::GetValueForVariablePath(const char *var_path) {
frame->CalculateTarget()->GetPreferDynamicValue();
sb_value = GetValueForVariablePath(var_path, use_dynamic);
}
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
lldb::SBValue SBFrame::GetValueForVariablePath(const char *var_path,
@@ -467,7 +467,7 @@ lldb::SBValue SBFrame::GetValueForVariablePath(const char *var_path,
SBValue sb_value;
if (var_path == nullptr || var_path[0] == '\0') {
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
std::unique_lock<std::recursive_mutex> lock;
@@ -492,7 +492,7 @@ lldb::SBValue SBFrame::GetValueForVariablePath(const char *var_path,
}
}
}
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
SBValue SBFrame::FindVariable(const char *name) {
@@ -510,7 +510,7 @@ SBValue SBFrame::FindVariable(const char *name) {
frame->CalculateTarget()->GetPreferDynamicValue();
value = FindVariable(name, use_dynamic);
}
- return LLDB_RECORD_RESULT(value);
+ return value;
}
SBValue SBFrame::FindVariable(const char *name,
@@ -522,7 +522,7 @@ SBValue SBFrame::FindVariable(const char *name,
SBValue sb_value;
if (name == nullptr || name[0] == '\0') {
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
ValueObjectSP value_sp;
@@ -545,7 +545,7 @@ SBValue SBFrame::FindVariable(const char *name,
}
}
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
SBValue SBFrame::FindValue(const char *name, ValueType value_type) {
@@ -563,7 +563,7 @@ SBValue SBFrame::FindValue(const char *name, ValueType value_type) {
frame->CalculateTarget()->GetPreferDynamicValue();
value = FindValue(name, value_type, use_dynamic);
}
- return LLDB_RECORD_RESULT(value);
+ return value;
}
SBValue SBFrame::FindValue(const char *name, ValueType value_type,
@@ -575,7 +575,7 @@ SBValue SBFrame::FindValue(const char *name, ValueType value_type,
SBValue sb_value;
if (name == nullptr || name[0] == '\0') {
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
ValueObjectSP value_sp;
@@ -678,7 +678,7 @@ SBValue SBFrame::FindValue(const char *name, ValueType value_type,
}
}
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
bool SBFrame::IsEqual(const SBFrame &that) const {
@@ -713,7 +713,7 @@ SBThread SBFrame::GetThread() const {
ThreadSP thread_sp(exe_ctx.GetThreadSP());
SBThread sb_thread(thread_sp);
- return LLDB_RECORD_RESULT(sb_thread);
+ return sb_thread;
}
const char *SBFrame::Disassemble() const {
@@ -767,7 +767,7 @@ SBValueList SBFrame::GetVariables(bool arguments, bool locals, bool statics,
value_list = GetVariables(options);
}
- return LLDB_RECORD_RESULT(value_list);
+ return value_list;
}
lldb::SBValueList SBFrame::GetVariables(bool arguments, bool locals,
@@ -790,7 +790,7 @@ lldb::SBValueList SBFrame::GetVariables(bool arguments, bool locals,
options.SetInScopeOnly(in_scope_only);
options.SetIncludeRuntimeSupportValues(include_runtime_support_values);
options.SetUseDynamic(use_dynamic);
- return LLDB_RECORD_RESULT(GetVariables(options));
+ return GetVariables(options);
}
SBValueList SBFrame::GetVariables(const lldb::SBVariablesOptions &options) {
@@ -891,7 +891,7 @@ SBValueList SBFrame::GetVariables(const lldb::SBVariablesOptions &options) {
}
}
- return LLDB_RECORD_RESULT(value_list);
+ return value_list;
}
SBValueList SBFrame::GetRegisters() {
@@ -921,7 +921,7 @@ SBValueList SBFrame::GetRegisters() {
}
}
- return LLDB_RECORD_RESULT(value_list);
+ return value_list;
}
SBValue SBFrame::FindRegister(const char *name) {
@@ -953,7 +953,7 @@ SBValue SBFrame::FindRegister(const char *name) {
}
}
- return LLDB_RECORD_RESULT(result);
+ return result;
}
bool SBFrame::GetDescription(SBStream &description) {
@@ -1004,9 +1004,9 @@ SBValue SBFrame::EvaluateExpression(const char *expr) {
options.SetLanguage(target->GetLanguage());
else
options.SetLanguage(frame->GetLanguage());
- return LLDB_RECORD_RESULT(EvaluateExpression(expr, options));
+ return EvaluateExpression(expr, options);
}
- return LLDB_RECORD_RESULT(result);
+ return result;
}
SBValue
@@ -1029,7 +1029,7 @@ SBFrame::EvaluateExpression(const char *expr,
options.SetLanguage(target->GetLanguage());
else if (frame)
options.SetLanguage(frame->GetLanguage());
- return LLDB_RECORD_RESULT(EvaluateExpression(expr, options));
+ return EvaluateExpression(expr, options);
}
SBValue SBFrame::EvaluateExpression(const char *expr,
@@ -1052,7 +1052,7 @@ SBValue SBFrame::EvaluateExpression(const char *expr,
options.SetLanguage(target->GetLanguage());
else if (frame)
options.SetLanguage(frame->GetLanguage());
- return LLDB_RECORD_RESULT(EvaluateExpression(expr, options));
+ return EvaluateExpression(expr, options);
}
lldb::SBValue SBFrame::EvaluateExpression(const char *expr,
@@ -1066,7 +1066,7 @@ lldb::SBValue SBFrame::EvaluateExpression(const char *expr,
SBValue expr_result;
if (expr == nullptr || expr[0] == '\0') {
- return LLDB_RECORD_RESULT(expr_result);
+ return expr_result;
}
ValueObjectSP expr_value_sp;
@@ -1106,7 +1106,7 @@ lldb::SBValue SBFrame::EvaluateExpression(const char *expr,
"%s, summary %s **",
expr_result.GetValue(), expr_result.GetSummary());
- return LLDB_RECORD_RESULT(expr_result);
+ return expr_result;
}
bool SBFrame::IsInlined() {
diff --git a/lldb/source/API/SBFunction.cpp b/lldb/source/API/SBFunction.cpp
index a682cdce491a..2b1bc05e3356 100644
--- a/lldb/source/API/SBFunction.cpp
+++ b/lldb/source/API/SBFunction.cpp
@@ -37,7 +37,7 @@ const SBFunction &SBFunction::operator=(const SBFunction &rhs) {
SBFunction, operator=,(const lldb::SBFunction &), rhs);
m_opaque_ptr = rhs.m_opaque_ptr;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBFunction::~SBFunction() { m_opaque_ptr = nullptr; }
@@ -114,7 +114,7 @@ SBInstructionList SBFunction::GetInstructions(SBTarget target) {
LLDB_RECORD_METHOD(lldb::SBInstructionList, SBFunction, GetInstructions,
(lldb::SBTarget), target);
- return LLDB_RECORD_RESULT(GetInstructions(target, nullptr));
+ return GetInstructions(target, nullptr);
}
SBInstructionList SBFunction::GetInstructions(SBTarget target,
@@ -136,7 +136,7 @@ SBInstructionList SBFunction::GetInstructions(SBTarget target,
m_opaque_ptr->GetAddressRange(), force_live_memory));
}
}
- return LLDB_RECORD_RESULT(sb_instructions);
+ return sb_instructions;
}
lldb_private::Function *SBFunction::get() { return m_opaque_ptr; }
@@ -151,7 +151,7 @@ SBAddress SBFunction::GetStartAddress() {
SBAddress addr;
if (m_opaque_ptr)
addr.SetAddress(m_opaque_ptr->GetAddressRange().GetBaseAddress());
- return LLDB_RECORD_RESULT(addr);
+ return addr;
}
SBAddress SBFunction::GetEndAddress() {
@@ -165,7 +165,7 @@ SBAddress SBFunction::GetEndAddress() {
addr->Slide(byte_size);
}
}
- return LLDB_RECORD_RESULT(addr);
+ return addr;
}
const char *SBFunction::GetArgumentName(uint32_t arg_idx) {
@@ -204,7 +204,7 @@ SBType SBFunction::GetType() {
if (function_type)
sb_type.ref().SetType(function_type->shared_from_this());
}
- return LLDB_RECORD_RESULT(sb_type);
+ return sb_type;
}
SBBlock SBFunction::GetBlock() {
@@ -213,7 +213,7 @@ SBBlock SBFunction::GetBlock() {
SBBlock sb_block;
if (m_opaque_ptr)
sb_block.SetPtr(&m_opaque_ptr->GetBlock(true));
- return LLDB_RECORD_RESULT(sb_block);
+ return sb_block;
}
lldb::LanguageType SBFunction::GetLanguage() {
diff --git a/lldb/source/API/SBHostOS.cpp b/lldb/source/API/SBHostOS.cpp
index d77b50f19236..c8703c1aa3ea 100644
--- a/lldb/source/API/SBHostOS.cpp
+++ b/lldb/source/API/SBHostOS.cpp
@@ -35,14 +35,14 @@ SBFileSpec SBHostOS::GetProgramFileSpec() {
SBFileSpec sb_filespec;
sb_filespec.SetFileSpec(HostInfo::GetProgramFileSpec());
- return LLDB_RECORD_RESULT(sb_filespec);
+ return sb_filespec;
}
SBFileSpec SBHostOS::GetLLDBPythonPath() {
LLDB_RECORD_STATIC_METHOD_NO_ARGS(lldb::SBFileSpec, SBHostOS,
GetLLDBPythonPath);
- return LLDB_RECORD_RESULT(GetLLDBPath(ePathTypePythonDir));
+ return GetLLDBPath(ePathTypePythonDir);
}
SBFileSpec SBHostOS::GetLLDBPath(lldb::PathType path_type) {
@@ -84,7 +84,7 @@ SBFileSpec SBHostOS::GetLLDBPath(lldb::PathType path_type) {
SBFileSpec sb_fspec;
sb_fspec.SetFileSpec(fspec);
- return LLDB_RECORD_RESULT(sb_fspec);
+ return sb_fspec;
}
SBFileSpec SBHostOS::GetUserHomeDirectory() {
@@ -98,7 +98,7 @@ SBFileSpec SBHostOS::GetUserHomeDirectory() {
SBFileSpec sb_fspec;
sb_fspec.SetFileSpec(homedir);
- return LLDB_RECORD_RESULT(sb_fspec);
+ return sb_fspec;
}
lldb::thread_t SBHostOS::ThreadCreate(const char *name,
diff --git a/lldb/source/API/SBInstruction.cpp b/lldb/source/API/SBInstruction.cpp
index 789780643cd0..f9a75686d906 100644
--- a/lldb/source/API/SBInstruction.cpp
+++ b/lldb/source/API/SBInstruction.cpp
@@ -86,7 +86,7 @@ const SBInstruction &SBInstruction::operator=(const SBInstruction &rhs) {
if (this != &rhs)
m_opaque_sp = rhs.m_opaque_sp;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBInstruction::~SBInstruction() = default;
@@ -108,7 +108,7 @@ SBAddress SBInstruction::GetAddress() {
lldb::InstructionSP inst_sp(GetOpaque());
if (inst_sp && inst_sp->GetAddress().IsValid())
sb_addr.SetAddress(inst_sp->GetAddress());
- return LLDB_RECORD_RESULT(sb_addr);
+ return sb_addr;
}
const char *SBInstruction::GetMnemonic(SBTarget target) {
@@ -192,7 +192,7 @@ SBData SBInstruction::GetData(SBTarget target) {
sb_data.SetOpaque(data_extractor_sp);
}
}
- return LLDB_RECORD_RESULT(sb_data);
+ return sb_data;
}
bool SBInstruction::DoesBranch() {
diff --git a/lldb/source/API/SBInstructionList.cpp b/lldb/source/API/SBInstructionList.cpp
index 6138f0cf69d0..241c497b7fc3 100644
--- a/lldb/source/API/SBInstructionList.cpp
+++ b/lldb/source/API/SBInstructionList.cpp
@@ -39,7 +39,7 @@ operator=(const SBInstructionList &rhs) {
if (this != &rhs)
m_opaque_sp = rhs.m_opaque_sp;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBInstructionList::~SBInstructionList() = default;
@@ -71,7 +71,7 @@ SBInstruction SBInstructionList::GetInstructionAtIndex(uint32_t idx) {
inst.SetOpaque(
m_opaque_sp,
m_opaque_sp->GetInstructionList().GetInstructionAtIndex(idx));
- return LLDB_RECORD_RESULT(inst);
+ return inst;
}
size_t SBInstructionList::GetInstructionsCount(const SBAddress &start,
diff --git a/lldb/source/API/SBLaunchInfo.cpp b/lldb/source/API/SBLaunchInfo.cpp
index a44e9bbdbb5d..f47fa5a4ba20 100644
--- a/lldb/source/API/SBLaunchInfo.cpp
+++ b/lldb/source/API/SBLaunchInfo.cpp
@@ -58,7 +58,7 @@ SBLaunchInfo &SBLaunchInfo::operator=(const SBLaunchInfo &rhs) {
SBLaunchInfo, operator=,(const lldb::SBLaunchInfo &), rhs);
m_opaque_sp = rhs.m_opaque_sp;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBLaunchInfo::~SBLaunchInfo() = default;
@@ -116,7 +116,7 @@ void SBLaunchInfo::SetGroupID(uint32_t gid) {
SBFileSpec SBLaunchInfo::GetExecutableFile() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBFileSpec, SBLaunchInfo, GetExecutableFile);
- return LLDB_RECORD_RESULT(SBFileSpec(m_opaque_sp->GetExecutableFile()));
+ return SBFileSpec(m_opaque_sp->GetExecutableFile());
}
void SBLaunchInfo::SetExecutableFile(SBFileSpec exe_file,
@@ -130,7 +130,7 @@ void SBLaunchInfo::SetExecutableFile(SBFileSpec exe_file,
SBListener SBLaunchInfo::GetListener() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBListener, SBLaunchInfo, GetListener);
- return LLDB_RECORD_RESULT(SBListener(m_opaque_sp->GetListener()));
+ return SBListener(m_opaque_sp->GetListener());
}
void SBLaunchInfo::SetListener(SBListener &listener) {
@@ -203,8 +203,7 @@ void SBLaunchInfo::SetEnvironment(const SBEnvironment &env, bool append) {
SBEnvironment SBLaunchInfo::GetEnvironment() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBEnvironment, SBLaunchInfo, GetEnvironment);
- return LLDB_RECORD_RESULT(
- SBEnvironment(Environment(m_opaque_sp->GetEnvironment())));
+ return SBEnvironment(Environment(m_opaque_sp->GetEnvironment()));
}
void SBLaunchInfo::Clear() {
@@ -373,7 +372,7 @@ lldb::SBStructuredData SBLaunchInfo::GetScriptedProcessDictionary() const {
SBStructuredData data;
data.m_impl_up->SetObjectSP(dict_sp);
- return LLDB_RECORD_RESULT(data);
+ return data;
}
void SBLaunchInfo::SetScriptedProcessDictionary(lldb::SBStructuredData dict) {
diff --git a/lldb/source/API/SBLineEntry.cpp b/lldb/source/API/SBLineEntry.cpp
index 0776d74bc532..52623b624534 100644
--- a/lldb/source/API/SBLineEntry.cpp
+++ b/lldb/source/API/SBLineEntry.cpp
@@ -38,7 +38,7 @@ const SBLineEntry &SBLineEntry::operator=(const SBLineEntry &rhs) {
if (this != &rhs)
m_opaque_up = clone(rhs.m_opaque_up);
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
void SBLineEntry::SetLineEntry(const lldb_private::LineEntry &lldb_object_ref) {
@@ -55,7 +55,7 @@ SBAddress SBLineEntry::GetStartAddress() const {
if (m_opaque_up)
sb_address.SetAddress(m_opaque_up->range.GetBaseAddress());
- return LLDB_RECORD_RESULT(sb_address);
+ return sb_address;
}
SBAddress SBLineEntry::GetEndAddress() const {
@@ -66,7 +66,7 @@ SBAddress SBLineEntry::GetEndAddress() const {
sb_address.SetAddress(m_opaque_up->range.GetBaseAddress());
sb_address.OffsetAddress(m_opaque_up->range.GetByteSize());
}
- return LLDB_RECORD_RESULT(sb_address);
+ return sb_address;
}
bool SBLineEntry::IsValid() const {
@@ -86,7 +86,7 @@ SBFileSpec SBLineEntry::GetFileSpec() const {
if (m_opaque_up.get() && m_opaque_up->file)
sb_file_spec.SetFileSpec(m_opaque_up->file);
- return LLDB_RECORD_RESULT(sb_file_spec);
+ return sb_file_spec;
}
uint32_t SBLineEntry::GetLine() const {
diff --git a/lldb/source/API/SBListener.cpp b/lldb/source/API/SBListener.cpp
index 34f9ae6a0231..50e7abd951d0 100644
--- a/lldb/source/API/SBListener.cpp
+++ b/lldb/source/API/SBListener.cpp
@@ -40,7 +40,7 @@ const lldb::SBListener &SBListener::operator=(const lldb::SBListener &rhs) {
m_opaque_sp = rhs.m_opaque_sp;
m_unused_ptr = nullptr;
}
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBListener::SBListener(const lldb::ListenerSP &listener_sp)
diff --git a/lldb/source/API/SBMemoryRegionInfo.cpp b/lldb/source/API/SBMemoryRegionInfo.cpp
index 9dd1da72c801..1a0fb7c74230 100644
--- a/lldb/source/API/SBMemoryRegionInfo.cpp
+++ b/lldb/source/API/SBMemoryRegionInfo.cpp
@@ -60,7 +60,7 @@ operator=(const SBMemoryRegionInfo &rhs) {
if (this != &rhs)
m_opaque_up = clone(rhs.m_opaque_up);
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBMemoryRegionInfo::~SBMemoryRegionInfo() = default;
diff --git a/lldb/source/API/SBMemoryRegionInfoList.cpp b/lldb/source/API/SBMemoryRegionInfoList.cpp
index 241b40aefb69..2de0f0700666 100644
--- a/lldb/source/API/SBMemoryRegionInfoList.cpp
+++ b/lldb/source/API/SBMemoryRegionInfoList.cpp
@@ -105,7 +105,7 @@ operator=(const SBMemoryRegionInfoList &rhs) {
if (this != &rhs) {
*m_opaque_up = *rhs.m_opaque_up;
}
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
uint32_t SBMemoryRegionInfoList::GetSize() const {
diff --git a/lldb/source/API/SBModule.cpp b/lldb/source/API/SBModule.cpp
index defb08f42250..366c920f5756 100644
--- a/lldb/source/API/SBModule.cpp
+++ b/lldb/source/API/SBModule.cpp
@@ -69,7 +69,7 @@ const SBModule &SBModule::operator=(const SBModule &rhs) {
if (this != &rhs)
m_opaque_sp = rhs.m_opaque_sp;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBModule::~SBModule() = default;
@@ -98,7 +98,7 @@ SBFileSpec SBModule::GetFileSpec() const {
if (module_sp)
file_spec.SetFileSpec(module_sp->GetFileSpec());
- return LLDB_RECORD_RESULT(file_spec);
+ return file_spec;
}
lldb::SBFileSpec SBModule::GetPlatformFileSpec() const {
@@ -110,7 +110,7 @@ lldb::SBFileSpec SBModule::GetPlatformFileSpec() const {
if (module_sp)
file_spec.SetFileSpec(module_sp->GetPlatformFileSpec());
- return LLDB_RECORD_RESULT(file_spec);
+ return file_spec;
}
bool SBModule::SetPlatformFileSpec(const lldb::SBFileSpec &platform_file) {
@@ -136,7 +136,7 @@ lldb::SBFileSpec SBModule::GetRemoteInstallFileSpec() {
ModuleSP module_sp(GetSP());
if (module_sp)
sb_file_spec.SetFileSpec(module_sp->GetRemoteInstallFileSpec());
- return LLDB_RECORD_RESULT(sb_file_spec);
+ return sb_file_spec;
}
bool SBModule::SetRemoteInstallFileSpec(lldb::SBFileSpec &file) {
@@ -215,7 +215,7 @@ SBAddress SBModule::ResolveFileAddress(lldb::addr_t vm_addr) {
if (module_sp->ResolveFileAddress(vm_addr, addr))
sb_addr.ref() = addr;
}
- return LLDB_RECORD_RESULT(sb_addr);
+ return sb_addr;
}
SBSymbolContext
@@ -230,7 +230,7 @@ SBModule::ResolveSymbolContextForAddress(const SBAddress &addr,
SymbolContextItem scope = static_cast<SymbolContextItem>(resolve_scope);
if (module_sp && addr.IsValid())
module_sp->ResolveSymbolContextForAddress(addr.ref(), scope, *sb_sc);
- return LLDB_RECORD_RESULT(sb_sc);
+ return sb_sc;
}
bool SBModule::GetDescription(SBStream &description) {
@@ -268,7 +268,7 @@ SBCompileUnit SBModule::GetCompileUnitAtIndex(uint32_t index) {
CompUnitSP cu_sp = module_sp->GetCompileUnitAtIndex(index);
sb_cu.reset(cu_sp.get());
}
- return LLDB_RECORD_RESULT(sb_cu);
+ return sb_cu;
}
SBSymbolContextList SBModule::FindCompileUnits(const SBFileSpec &sb_file_spec) {
@@ -280,7 +280,7 @@ SBSymbolContextList SBModule::FindCompileUnits(const SBFileSpec &sb_file_spec) {
if (sb_file_spec.IsValid() && module_sp) {
module_sp->FindCompileUnits(*sb_file_spec, *sb_sc_list);
}
- return LLDB_RECORD_RESULT(sb_sc_list);
+ return sb_sc_list;
}
static Symtab *GetUnifiedSymbolTable(const lldb::ModuleSP &module_sp) {
@@ -306,7 +306,7 @@ SBSymbol SBModule::GetSymbolAtIndex(size_t idx) {
Symtab *symtab = GetUnifiedSymbolTable(module_sp);
if (symtab)
sb_symbol.SetSymbol(symtab->SymbolAtIndex(idx));
- return LLDB_RECORD_RESULT(sb_symbol);
+ return sb_symbol;
}
lldb::SBSymbol SBModule::FindSymbol(const char *name,
@@ -323,7 +323,7 @@ lldb::SBSymbol SBModule::FindSymbol(const char *name,
ConstString(name), symbol_type, Symtab::eDebugAny,
Symtab::eVisibilityAny));
}
- return LLDB_RECORD_RESULT(sb_symbol);
+ return sb_symbol;
}
lldb::SBSymbolContextList SBModule::FindSymbols(const char *name,
@@ -352,7 +352,7 @@ lldb::SBSymbolContextList SBModule::FindSymbols(const char *name,
}
}
}
- return LLDB_RECORD_RESULT(sb_sc_list);
+ return sb_sc_list;
}
size_t SBModule::GetNumSections() {
@@ -383,7 +383,7 @@ SBSection SBModule::GetSectionAtIndex(size_t idx) {
if (section_list)
sb_section.SetSP(section_list->GetSectionAtIndex(idx));
}
- return LLDB_RECORD_RESULT(sb_section);
+ return sb_section;
}
lldb::SBSymbolContextList SBModule::FindFunctions(const char *name,
@@ -402,7 +402,7 @@ lldb::SBSymbolContextList SBModule::FindFunctions(const char *name,
module_sp->FindFunctions(ConstString(name), CompilerDeclContext(), type,
function_options, *sb_sc_list);
}
- return LLDB_RECORD_RESULT(sb_sc_list);
+ return sb_sc_list;
}
SBValueList SBModule::FindGlobalVariables(SBTarget &target, const char *name,
@@ -426,7 +426,7 @@ SBValueList SBModule::FindGlobalVariables(SBTarget &target, const char *name,
}
}
- return LLDB_RECORD_RESULT(sb_value_list);
+ return sb_value_list;
}
lldb::SBValue SBModule::FindFirstGlobalVariable(lldb::SBTarget &target,
@@ -436,8 +436,8 @@ lldb::SBValue SBModule::FindFirstGlobalVariable(lldb::SBTarget &target,
SBValueList sb_value_list(FindGlobalVariables(target, name, 1));
if (sb_value_list.IsValid() && sb_value_list.GetSize() > 0)
- return LLDB_RECORD_RESULT(sb_value_list.GetValueAtIndex(0));
- return LLDB_RECORD_RESULT(SBValue());
+ return sb_value_list.GetValueAtIndex(0);
+ return SBValue();
}
lldb::SBType SBModule::FindFirstType(const char *name_cstr) {
@@ -458,12 +458,12 @@ lldb::SBType SBModule::FindFirstType(const char *name_cstr) {
module_sp->GetTypeSystemForLanguage(eLanguageTypeC);
if (auto err = type_system_or_err.takeError()) {
llvm::consumeError(std::move(err));
- return LLDB_RECORD_RESULT(SBType());
+ return SBType();
}
sb_type = SBType(type_system_or_err->GetBuiltinTypeByName(name));
}
}
- return LLDB_RECORD_RESULT(sb_type);
+ return sb_type;
}
lldb::SBType SBModule::GetBasicType(lldb::BasicType type) {
@@ -477,11 +477,10 @@ lldb::SBType SBModule::GetBasicType(lldb::BasicType type) {
if (auto err = type_system_or_err.takeError()) {
llvm::consumeError(std::move(err));
} else {
- return LLDB_RECORD_RESULT(
- SBType(type_system_or_err->GetBasicTypeFromAST(type)));
+ return SBType(type_system_or_err->GetBasicTypeFromAST(type));
}
}
- return LLDB_RECORD_RESULT(SBType());
+ return SBType();
}
lldb::SBTypeList SBModule::FindTypes(const char *type) {
@@ -518,7 +517,7 @@ lldb::SBTypeList SBModule::FindTypes(const char *type) {
}
}
}
- return LLDB_RECORD_RESULT(retval);
+ return retval;
}
lldb::SBType SBModule::GetTypeByID(lldb::user_id_t uid) {
@@ -530,10 +529,10 @@ lldb::SBType SBModule::GetTypeByID(lldb::user_id_t uid) {
if (SymbolFile *symfile = module_sp->GetSymbolFile()) {
Type *type_ptr = symfile->ResolveTypeUID(uid);
if (type_ptr)
- return LLDB_RECORD_RESULT(SBType(type_ptr->shared_from_this()));
+ return SBType(type_ptr->shared_from_this());
}
}
- return LLDB_RECORD_RESULT(SBType());
+ return SBType();
}
lldb::SBTypeList SBModule::GetTypes(uint32_t type_mask) {
@@ -544,16 +543,16 @@ lldb::SBTypeList SBModule::GetTypes(uint32_t type_mask) {
ModuleSP module_sp(GetSP());
if (!module_sp)
- return LLDB_RECORD_RESULT(sb_type_list);
+ return sb_type_list;
SymbolFile *symfile = module_sp->GetSymbolFile();
if (!symfile)
- return LLDB_RECORD_RESULT(sb_type_list);
+ return sb_type_list;
TypeClass type_class = static_cast<TypeClass>(type_mask);
TypeList type_list;
symfile->GetTypes(nullptr, type_class, type_list);
sb_type_list.m_opaque_up->Append(type_list);
- return LLDB_RECORD_RESULT(sb_type_list);
+ return sb_type_list;
}
SBSection SBModule::FindSection(const char *sect_name) {
@@ -575,7 +574,7 @@ SBSection SBModule::FindSection(const char *sect_name) {
}
}
}
- return LLDB_RECORD_RESULT(sb_section);
+ return sb_section;
}
lldb::ByteOrder SBModule::GetByteOrder() {
@@ -650,7 +649,7 @@ lldb::SBFileSpec SBModule::GetSymbolFileSpec() const {
if (SymbolFile *symfile = module_sp->GetSymbolFile())
sb_file_spec.SetFileSpec(symfile->GetObjectFile()->GetFileSpec());
}
- return LLDB_RECORD_RESULT(sb_file_spec);
+ return sb_file_spec;
}
lldb::SBAddress SBModule::GetObjectFileHeaderAddress() const {
@@ -664,7 +663,7 @@ lldb::SBAddress SBModule::GetObjectFileHeaderAddress() const {
if (objfile_ptr)
sb_addr.ref() = objfile_ptr->GetBaseAddress();
}
- return LLDB_RECORD_RESULT(sb_addr);
+ return sb_addr;
}
lldb::SBAddress SBModule::GetObjectFileEntryPointAddress() const {
@@ -678,7 +677,7 @@ lldb::SBAddress SBModule::GetObjectFileEntryPointAddress() const {
if (objfile_ptr)
sb_addr.ref() = objfile_ptr->GetEntryPointAddress();
}
- return LLDB_RECORD_RESULT(sb_addr);
+ return sb_addr;
}
uint32_t SBModule::GetNumberAllocatedModules() {
diff --git a/lldb/source/API/SBModuleSpec.cpp b/lldb/source/API/SBModuleSpec.cpp
index 2aafc6b48fae..ce2bb3556d4d 100644
--- a/lldb/source/API/SBModuleSpec.cpp
+++ b/lldb/source/API/SBModuleSpec.cpp
@@ -35,7 +35,7 @@ const SBModuleSpec &SBModuleSpec::operator=(const SBModuleSpec &rhs) {
if (this != &rhs)
m_opaque_up = clone(rhs.m_opaque_up);
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBModuleSpec::~SBModuleSpec() = default;
@@ -60,7 +60,7 @@ SBFileSpec SBModuleSpec::GetFileSpec() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBFileSpec, SBModuleSpec, GetFileSpec);
SBFileSpec sb_spec(m_opaque_up->GetFileSpec());
- return LLDB_RECORD_RESULT(sb_spec);
+ return sb_spec;
}
void SBModuleSpec::SetFileSpec(const lldb::SBFileSpec &sb_spec) {
@@ -74,7 +74,7 @@ lldb::SBFileSpec SBModuleSpec::GetPlatformFileSpec() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBFileSpec, SBModuleSpec,
GetPlatformFileSpec);
- return LLDB_RECORD_RESULT(SBFileSpec(m_opaque_up->GetPlatformFileSpec()));
+ return SBFileSpec(m_opaque_up->GetPlatformFileSpec());
}
void SBModuleSpec::SetPlatformFileSpec(const lldb::SBFileSpec &sb_spec) {
@@ -87,7 +87,7 @@ void SBModuleSpec::SetPlatformFileSpec(const lldb::SBFileSpec &sb_spec) {
lldb::SBFileSpec SBModuleSpec::GetSymbolFileSpec() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBFileSpec, SBModuleSpec, GetSymbolFileSpec);
- return LLDB_RECORD_RESULT(SBFileSpec(m_opaque_up->GetSymbolFileSpec()));
+ return SBFileSpec(m_opaque_up->GetSymbolFileSpec());
}
void SBModuleSpec::SetSymbolFileSpec(const lldb::SBFileSpec &sb_spec) {
@@ -166,7 +166,7 @@ SBModuleSpecList &SBModuleSpecList::operator=(const SBModuleSpecList &rhs) {
if (this != &rhs)
*m_opaque_up = *rhs.m_opaque_up;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBModuleSpecList::~SBModuleSpecList() = default;
@@ -180,7 +180,7 @@ SBModuleSpecList SBModuleSpecList::GetModuleSpecifications(const char *path) {
FileSystem::Instance().Resolve(file_spec);
Host::ResolveExecutableInBundle(file_spec);
ObjectFile::GetModuleSpecifications(file_spec, 0, 0, *specs.m_opaque_up);
- return LLDB_RECORD_RESULT(specs);
+ return specs;
}
void SBModuleSpecList::Append(const SBModuleSpec &spec) {
@@ -209,7 +209,7 @@ SBModuleSpec SBModuleSpecList::GetSpecAtIndex(size_t i) {
SBModuleSpec sb_module_spec;
m_opaque_up->GetModuleSpecAtIndex(i, *sb_module_spec.m_opaque_up);
- return LLDB_RECORD_RESULT(sb_module_spec);
+ return sb_module_spec;
}
SBModuleSpec
@@ -221,7 +221,7 @@ SBModuleSpecList::FindFirstMatchingSpec(const SBModuleSpec &match_spec) {
SBModuleSpec sb_module_spec;
m_opaque_up->FindMatchingModuleSpec(*match_spec.m_opaque_up,
*sb_module_spec.m_opaque_up);
- return LLDB_RECORD_RESULT(sb_module_spec);
+ return sb_module_spec;
}
SBModuleSpecList
@@ -233,7 +233,7 @@ SBModuleSpecList::FindMatchingSpecs(const SBModuleSpec &match_spec) {
SBModuleSpecList specs;
m_opaque_up->FindMatchingModuleSpecs(*match_spec.m_opaque_up,
*specs.m_opaque_up);
- return LLDB_RECORD_RESULT(specs);
+ return specs;
}
bool SBModuleSpecList::GetDescription(lldb::SBStream &description) {
diff --git a/lldb/source/API/SBPlatform.cpp b/lldb/source/API/SBPlatform.cpp
index 12aabcae4aea..5e314ec8f59b 100644
--- a/lldb/source/API/SBPlatform.cpp
+++ b/lldb/source/API/SBPlatform.cpp
@@ -98,7 +98,7 @@ SBPlatformConnectOptions::operator=(const SBPlatformConnectOptions &rhs) {
rhs);
*m_opaque_ptr = *rhs.m_opaque_ptr;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
const char *SBPlatformConnectOptions::GetURL() {
@@ -201,7 +201,7 @@ SBPlatformShellCommand::operator=(const SBPlatformShellCommand &rhs) {
rhs);
*m_opaque_ptr = *rhs.m_opaque_ptr;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBPlatformShellCommand::~SBPlatformShellCommand() { delete m_opaque_ptr; }
@@ -330,7 +330,7 @@ SBPlatform &SBPlatform::operator=(const SBPlatform &rhs) {
SBPlatform, operator=,(const lldb::SBPlatform &), rhs);
m_opaque_sp = rhs.m_opaque_sp;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBPlatform::~SBPlatform() = default;
@@ -341,7 +341,7 @@ SBPlatform SBPlatform::GetHostPlatform() {
SBPlatform host_platform;
host_platform.m_opaque_sp = Platform::GetHostPlatform();
- return LLDB_RECORD_RESULT(host_platform);
+ return host_platform;
}
bool SBPlatform::IsValid() const {
@@ -412,7 +412,7 @@ SBError SBPlatform::ConnectRemote(SBPlatformConnectOptions &connect_options) {
} else {
sb_error.SetErrorString("invalid platform");
}
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
void SBPlatform::DisconnectRemote() {
@@ -524,54 +524,51 @@ SBError SBPlatform::Get(SBFileSpec &src, SBFileSpec &dst) {
} else {
sb_error.SetErrorString("invalid platform");
}
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
SBError SBPlatform::Put(SBFileSpec &src, SBFileSpec &dst) {
LLDB_RECORD_METHOD(lldb::SBError, SBPlatform, Put,
(lldb::SBFileSpec &, lldb::SBFileSpec &), src, dst);
- return LLDB_RECORD_RESULT(
- ExecuteConnected([&](const lldb::PlatformSP &platform_sp) {
- if (src.Exists()) {
- uint32_t permissions =
- FileSystem::Instance().GetPermissions(src.ref());
- if (permissions == 0) {
- if (FileSystem::Instance().IsDirectory(src.ref()))
- permissions = eFilePermissionsDirectoryDefault;
- else
- permissions = eFilePermissionsFileDefault;
- }
-
- return platform_sp->PutFile(src.ref(), dst.ref(), permissions);
- }
+ return ExecuteConnected([&](const lldb::PlatformSP &platform_sp) {
+ if (src.Exists()) {
+ uint32_t permissions = FileSystem::Instance().GetPermissions(src.ref());
+ if (permissions == 0) {
+ if (FileSystem::Instance().IsDirectory(src.ref()))
+ permissions = eFilePermissionsDirectoryDefault;
+ else
+ permissions = eFilePermissionsFileDefault;
+ }
+
+ return platform_sp->PutFile(src.ref(), dst.ref(), permissions);
+ }
- Status error;
- error.SetErrorStringWithFormat("'src' argument doesn't exist: '%s'",
- src.ref().GetPath().c_str());
- return error;
- }));
+ Status error;
+ error.SetErrorStringWithFormat("'src' argument doesn't exist: '%s'",
+ src.ref().GetPath().c_str());
+ return error;
+ });
}
SBError SBPlatform::Install(SBFileSpec &src, SBFileSpec &dst) {
LLDB_RECORD_METHOD(lldb::SBError, SBPlatform, Install,
(lldb::SBFileSpec &, lldb::SBFileSpec &), src, dst);
- return LLDB_RECORD_RESULT(
- ExecuteConnected([&](const lldb::PlatformSP &platform_sp) {
- if (src.Exists())
- return platform_sp->Install(src.ref(), dst.ref());
+ return ExecuteConnected([&](const lldb::PlatformSP &platform_sp) {
+ if (src.Exists())
+ return platform_sp->Install(src.ref(), dst.ref());
- Status error;
- error.SetErrorStringWithFormat("'src' argument doesn't exist: '%s'",
- src.ref().GetPath().c_str());
- return error;
- }));
+ Status error;
+ error.SetErrorStringWithFormat("'src' argument doesn't exist: '%s'",
+ src.ref().GetPath().c_str());
+ return error;
+ });
}
SBError SBPlatform::Run(SBPlatformShellCommand &shell_command) {
LLDB_RECORD_METHOD(lldb::SBError, SBPlatform, Run,
(lldb::SBPlatformShellCommand &), shell_command);
- return LLDB_RECORD_RESULT(
- ExecuteConnected([&](const lldb::PlatformSP &platform_sp) {
+ return ExecuteConnected(
+ [&](const lldb::PlatformSP &platform_sp) {
const char *command = shell_command.GetCommand();
if (!command)
return Status("invalid shell command (empty)");
@@ -588,27 +585,25 @@ SBError SBPlatform::Run(SBPlatformShellCommand &shell_command) {
&shell_command.m_opaque_ptr->m_signo,
&shell_command.m_opaque_ptr->m_output,
shell_command.m_opaque_ptr->m_timeout);
- }));
+ });
}
SBError SBPlatform::Launch(SBLaunchInfo &launch_info) {
LLDB_RECORD_METHOD(lldb::SBError, SBPlatform, Launch, (lldb::SBLaunchInfo &),
launch_info);
- return LLDB_RECORD_RESULT(
- ExecuteConnected([&](const lldb::PlatformSP &platform_sp) {
- ProcessLaunchInfo info = launch_info.ref();
- Status error = platform_sp->LaunchProcess(info);
- launch_info.set_ref(info);
- return error;
- }));
+ return ExecuteConnected([&](const lldb::PlatformSP &platform_sp) {
+ ProcessLaunchInfo info = launch_info.ref();
+ Status error = platform_sp->LaunchProcess(info);
+ launch_info.set_ref(info);
+ return error;
+ });
}
SBError SBPlatform::Kill(const lldb::pid_t pid) {
LLDB_RECORD_METHOD(lldb::SBError, SBPlatform, Kill, (const lldb::pid_t), pid);
- return LLDB_RECORD_RESULT(
- ExecuteConnected([&](const lldb::PlatformSP &platform_sp) {
- return platform_sp->KillProcess(pid);
- }));
+ return ExecuteConnected([&](const lldb::PlatformSP &platform_sp) {
+ return platform_sp->KillProcess(pid);
+ });
}
SBError SBPlatform::ExecuteConnected(
@@ -638,7 +633,7 @@ SBError SBPlatform::MakeDirectory(const char *path, uint32_t file_permissions) {
} else {
sb_error.SetErrorString("invalid platform");
}
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
uint32_t SBPlatform::GetFilePermissions(const char *path) {
@@ -667,7 +662,7 @@ SBError SBPlatform::SetFilePermissions(const char *path,
} else {
sb_error.SetErrorString("invalid platform");
}
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
SBUnixSignals SBPlatform::GetUnixSignals() const {
@@ -675,9 +670,9 @@ SBUnixSignals SBPlatform::GetUnixSignals() const {
GetUnixSignals);
if (auto platform_sp = GetSP())
- return LLDB_RECORD_RESULT(SBUnixSignals{platform_sp});
+ return SBUnixSignals{platform_sp};
- return LLDB_RECORD_RESULT(SBUnixSignals());
+ return SBUnixSignals();
}
SBEnvironment SBPlatform::GetEnvironment() {
@@ -685,8 +680,8 @@ SBEnvironment SBPlatform::GetEnvironment() {
PlatformSP platform_sp(GetSP());
if (platform_sp) {
- return LLDB_RECORD_RESULT(SBEnvironment(platform_sp->GetEnvironment()));
+ return SBEnvironment(platform_sp->GetEnvironment());
}
- return LLDB_RECORD_RESULT(SBEnvironment());
+ return SBEnvironment();
}
diff --git a/lldb/source/API/SBProcess.cpp b/lldb/source/API/SBProcess.cpp
index dc2e6d63ccd4..fcc9e66b57a8 100644
--- a/lldb/source/API/SBProcess.cpp
+++ b/lldb/source/API/SBProcess.cpp
@@ -68,7 +68,7 @@ const SBProcess &SBProcess::operator=(const SBProcess &rhs) {
if (this != &rhs)
m_opaque_wp = rhs.m_opaque_wp;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
// Destructor
@@ -218,7 +218,7 @@ SBThread SBProcess::GetSelectedThread() const {
sb_thread.SetThread(thread_sp);
}
- return LLDB_RECORD_RESULT(sb_thread);
+ return sb_thread;
}
SBThread SBProcess::CreateOSPluginThread(lldb::tid_t tid,
@@ -236,7 +236,7 @@ SBThread SBProcess::CreateOSPluginThread(lldb::tid_t tid,
sb_thread.SetThread(thread_sp);
}
- return LLDB_RECORD_RESULT(sb_thread);
+ return sb_thread;
}
SBTarget SBProcess::GetTarget() const {
@@ -250,7 +250,7 @@ SBTarget SBProcess::GetTarget() const {
sb_target.SetSP(target_sp);
}
- return LLDB_RECORD_RESULT(sb_target);
+ return sb_target;
}
size_t SBProcess::PutSTDIN(const char *src, size_t src_len) {
@@ -419,7 +419,7 @@ SBThread SBProcess::GetThreadAtIndex(size_t index) {
sb_thread.SetThread(thread_sp);
}
- return LLDB_RECORD_RESULT(sb_thread);
+ return sb_thread;
}
uint32_t SBProcess::GetNumQueues() {
@@ -456,7 +456,7 @@ SBQueue SBProcess::GetQueueAtIndex(size_t index) {
}
}
- return LLDB_RECORD_RESULT(sb_queue);
+ return sb_queue;
}
uint32_t SBProcess::GetStopID(bool include_expression_stops) {
@@ -489,7 +489,7 @@ SBEvent SBProcess::GetStopEventForStopID(uint32_t stop_id) {
sb_event.reset(event_sp);
}
- return LLDB_RECORD_RESULT(sb_event);
+ return sb_event;
}
StateType SBProcess::GetState() {
@@ -595,7 +595,7 @@ SBError SBProcess::Continue() {
} else
sb_error.SetErrorString("SBProcess is invalid");
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
SBError SBProcess::Destroy() {
@@ -610,7 +610,7 @@ SBError SBProcess::Destroy() {
} else
sb_error.SetErrorString("SBProcess is invalid");
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
SBError SBProcess::Stop() {
@@ -625,7 +625,7 @@ SBError SBProcess::Stop() {
} else
sb_error.SetErrorString("SBProcess is invalid");
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
SBError SBProcess::Kill() {
@@ -640,7 +640,7 @@ SBError SBProcess::Kill() {
} else
sb_error.SetErrorString("SBProcess is invalid");
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
SBError SBProcess::Detach() {
@@ -648,7 +648,7 @@ SBError SBProcess::Detach() {
// FIXME: This should come from a process default.
bool keep_stopped = false;
- return LLDB_RECORD_RESULT(Detach(keep_stopped));
+ return Detach(keep_stopped);
}
SBError SBProcess::Detach(bool keep_stopped) {
@@ -663,7 +663,7 @@ SBError SBProcess::Detach(bool keep_stopped) {
} else
sb_error.SetErrorString("SBProcess is invalid");
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
SBError SBProcess::Signal(int signo) {
@@ -678,16 +678,16 @@ SBError SBProcess::Signal(int signo) {
} else
sb_error.SetErrorString("SBProcess is invalid");
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
SBUnixSignals SBProcess::GetUnixSignals() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBUnixSignals, SBProcess, GetUnixSignals);
if (auto process_sp = GetSP())
- return LLDB_RECORD_RESULT(SBUnixSignals{process_sp});
+ return SBUnixSignals{process_sp};
- return LLDB_RECORD_RESULT(SBUnixSignals{});
+ return SBUnixSignals{};
}
void SBProcess::SendAsyncInterrupt() {
@@ -715,7 +715,7 @@ SBThread SBProcess::GetThreadByID(tid_t tid) {
sb_thread.SetThread(thread_sp);
}
- return LLDB_RECORD_RESULT(sb_thread);
+ return sb_thread;
}
SBThread SBProcess::GetThreadByIndexID(uint32_t index_id) {
@@ -735,7 +735,7 @@ SBThread SBProcess::GetThreadByIndexID(uint32_t index_id) {
sb_thread.SetThread(thread_sp);
}
- return LLDB_RECORD_RESULT(sb_thread);
+ return sb_thread;
}
StateType SBProcess::GetStateFromEvent(const SBEvent &event) {
@@ -784,7 +784,7 @@ SBProcess SBProcess::GetProcessFromEvent(const SBEvent &event) {
process_sp = EventDataStructuredData::GetProcessFromEvent(event.get());
}
- return LLDB_RECORD_RESULT(SBProcess(process_sp));
+ return SBProcess(process_sp);
}
bool SBProcess::GetInterruptedFromEvent(const SBEvent &event) {
@@ -800,7 +800,7 @@ SBProcess::GetStructuredDataFromEvent(const lldb::SBEvent &event) {
GetStructuredDataFromEvent, (const lldb::SBEvent &),
event);
- return LLDB_RECORD_RESULT(SBStructuredData(event.GetSP()));
+ return SBStructuredData(event.GetSP());
}
bool SBProcess::EventIsProcessEvent(const SBEvent &event) {
@@ -830,8 +830,7 @@ SBBroadcaster SBProcess::GetBroadcaster() const {
SBBroadcaster broadcaster(process_sp.get(), false);
-
- return LLDB_RECORD_RESULT(broadcaster);
+ return broadcaster;
}
const char *SBProcess::GetBroadcasterClass() {
@@ -994,22 +993,22 @@ SBStructuredData SBProcess::GetExtendedCrashInformation() {
SBStructuredData data;
ProcessSP process_sp(GetSP());
if (!process_sp)
- return LLDB_RECORD_RESULT(data);
+ return data;
PlatformSP platform_sp = process_sp->GetTarget().GetPlatform();
if (!platform_sp)
- return LLDB_RECORD_RESULT(data);
+ return data;
auto expected_data =
platform_sp->FetchExtendedCrashInformation(*process_sp.get());
if (!expected_data)
- return LLDB_RECORD_RESULT(data);
+ return data;
StructuredData::ObjectSP fetched_data = *expected_data;
data.m_impl_up->SetObjectSP(fetched_data);
- return LLDB_RECORD_RESULT(data);
+ return data;
}
uint32_t
@@ -1122,7 +1121,7 @@ lldb::SBError SBProcess::UnloadImage(uint32_t image_token) {
}
} else
sb_error.SetErrorString("invalid process");
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
lldb::SBError SBProcess::SendEventData(const char *event_data) {
@@ -1142,7 +1141,7 @@ lldb::SBError SBProcess::SendEventData(const char *event_data) {
}
} else
sb_error.SetErrorString("invalid process");
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
uint32_t SBProcess::GetNumExtendedBacktraceTypes() {
@@ -1181,7 +1180,7 @@ SBThreadCollection SBProcess::GetHistoryThreads(addr_t addr) {
if (process_sp) {
threads = SBThreadCollection(process_sp->GetHistoryThreads(addr));
}
- return LLDB_RECORD_RESULT(threads);
+ return threads;
}
bool SBProcess::IsInstrumentationRuntimePresent(
@@ -1213,7 +1212,7 @@ lldb::SBError SBProcess::SaveCore(const char *file_name) {
ProcessSP process_sp(GetSP());
if (!process_sp) {
error.SetErrorString("SBProcess is invalid");
- return LLDB_RECORD_RESULT(error);
+ return error;
}
std::lock_guard<std::recursive_mutex> guard(
@@ -1221,13 +1220,13 @@ lldb::SBError SBProcess::SaveCore(const char *file_name) {
if (process_sp->GetState() != eStateStopped) {
error.SetErrorString("the process is not stopped");
- return LLDB_RECORD_RESULT(error);
+ return error;
}
FileSpec core_file(file_name);
SaveCoreStyle core_style = SaveCoreStyle::eSaveCoreFull;
error.ref() = PluginManager::SaveCore(process_sp, core_file, core_style, "");
- return LLDB_RECORD_RESULT(error);
+ return error;
}
lldb::SBError
@@ -1253,7 +1252,7 @@ SBProcess::GetMemoryRegionInfo(lldb::addr_t load_addr,
} else {
sb_error.SetErrorString("SBProcess is invalid");
}
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
lldb::SBMemoryRegionInfoList SBProcess::GetMemoryRegions() {
@@ -1271,7 +1270,7 @@ lldb::SBMemoryRegionInfoList SBProcess::GetMemoryRegions() {
process_sp->GetMemoryRegions(sb_region_list.ref());
}
- return LLDB_RECORD_RESULT(sb_region_list);
+ return sb_region_list;
}
lldb::SBProcessInfo SBProcess::GetProcessInfo() {
@@ -1283,7 +1282,7 @@ lldb::SBProcessInfo SBProcess::GetProcessInfo() {
if (process_sp && process_sp->GetProcessInfo(proc_info)) {
sb_proc_info.SetProcessInfo(proc_info);
}
- return LLDB_RECORD_RESULT(sb_proc_info);
+ return sb_proc_info;
}
lldb::addr_t SBProcess::AllocateMemory(size_t size, uint32_t permissions,
diff --git a/lldb/source/API/SBProcessInfo.cpp b/lldb/source/API/SBProcessInfo.cpp
index 4ff82b37719d..93d84d288031 100644
--- a/lldb/source/API/SBProcessInfo.cpp
+++ b/lldb/source/API/SBProcessInfo.cpp
@@ -34,7 +34,7 @@ SBProcessInfo &SBProcessInfo::operator=(const SBProcessInfo &rhs) {
if (this != &rhs)
m_opaque_up = clone(rhs.m_opaque_up);
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
ProcessInstanceInfo &SBProcessInfo::ref() {
@@ -76,7 +76,7 @@ SBFileSpec SBProcessInfo::GetExecutableFile() {
if (m_opaque_up) {
file_spec.SetFileSpec(m_opaque_up->GetExecutableFile());
}
- return LLDB_RECORD_RESULT(file_spec);
+ return file_spec;
}
lldb::pid_t SBProcessInfo::GetProcessID() {
diff --git a/lldb/source/API/SBQueue.cpp b/lldb/source/API/SBQueue.cpp
index 71b2d32d5f27..debb82173067 100644
--- a/lldb/source/API/SBQueue.cpp
+++ b/lldb/source/API/SBQueue.cpp
@@ -238,7 +238,7 @@ const lldb::SBQueue &SBQueue::operator=(const lldb::SBQueue &rhs) {
SBQueue, operator=,(const lldb::SBQueue &), rhs);
m_opaque_sp = rhs.m_opaque_sp;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBQueue::~SBQueue() = default;
@@ -293,7 +293,7 @@ SBThread SBQueue::GetThreadAtIndex(uint32_t idx) {
idx);
SBThread th = m_opaque_sp->GetThreadAtIndex(idx);
- return LLDB_RECORD_RESULT(th);
+ return th;
}
uint32_t SBQueue::GetNumPendingItems() {
@@ -306,7 +306,7 @@ SBQueueItem SBQueue::GetPendingItemAtIndex(uint32_t idx) {
LLDB_RECORD_METHOD(lldb::SBQueueItem, SBQueue, GetPendingItemAtIndex,
(uint32_t), idx);
- return LLDB_RECORD_RESULT(m_opaque_sp->GetPendingItemAtIndex(idx));
+ return m_opaque_sp->GetPendingItemAtIndex(idx);
}
uint32_t SBQueue::GetNumRunningItems() {
@@ -318,7 +318,7 @@ uint32_t SBQueue::GetNumRunningItems() {
SBProcess SBQueue::GetProcess() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBProcess, SBQueue, GetProcess);
- return LLDB_RECORD_RESULT(m_opaque_sp->GetProcess());
+ return m_opaque_sp->GetProcess();
}
lldb::QueueKind SBQueue::GetKind() {
diff --git a/lldb/source/API/SBQueueItem.cpp b/lldb/source/API/SBQueueItem.cpp
index 2ff89c44c3d2..f28f2d69aa9e 100644
--- a/lldb/source/API/SBQueueItem.cpp
+++ b/lldb/source/API/SBQueueItem.cpp
@@ -80,7 +80,7 @@ SBAddress SBQueueItem::GetAddress() const {
if (m_queue_item_sp) {
result.SetAddress(m_queue_item_sp->GetAddress());
}
- return LLDB_RECORD_RESULT(result);
+ return result;
}
void SBQueueItem::SetAddress(SBAddress addr) {
@@ -111,5 +111,5 @@ SBThread SBQueueItem::GetExtendedBacktraceThread(const char *type) {
}
}
}
- return LLDB_RECORD_RESULT(result);
+ return result;
}
diff --git a/lldb/source/API/SBSection.cpp b/lldb/source/API/SBSection.cpp
index c2c817407fd3..aa068518f946 100644
--- a/lldb/source/API/SBSection.cpp
+++ b/lldb/source/API/SBSection.cpp
@@ -38,7 +38,7 @@ const SBSection &SBSection::operator=(const SBSection &rhs) {
SBSection, operator=,(const lldb::SBSection &), rhs);
m_opaque_wp = rhs.m_opaque_wp;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBSection::~SBSection() = default;
@@ -73,7 +73,7 @@ lldb::SBSection SBSection::GetParent() {
if (parent_section_sp)
sb_section.SetSP(parent_section_sp);
}
- return LLDB_RECORD_RESULT(sb_section);
+ return sb_section;
}
lldb::SBSection SBSection::FindSubSection(const char *sect_name) {
@@ -89,7 +89,7 @@ lldb::SBSection SBSection::FindSubSection(const char *sect_name) {
section_sp->GetChildren().FindSectionByName(const_sect_name));
}
}
- return LLDB_RECORD_RESULT(sb_section);
+ return sb_section;
}
size_t SBSection::GetNumSubSections() {
@@ -109,7 +109,7 @@ lldb::SBSection SBSection::GetSubSectionAtIndex(size_t idx) {
SectionSP section_sp(GetSP());
if (section_sp)
sb_section.SetSP(section_sp->GetChildren().GetSectionAtIndex(idx));
- return LLDB_RECORD_RESULT(sb_section);
+ return sb_section;
}
lldb::SectionSP SBSection::GetSP() const { return m_opaque_wp.lock(); }
@@ -177,7 +177,7 @@ uint64_t SBSection::GetFileByteSize() {
SBData SBSection::GetSectionData() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBData, SBSection, GetSectionData);
- return LLDB_RECORD_RESULT(GetSectionData(0, UINT64_MAX));
+ return GetSectionData(0, UINT64_MAX);
}
SBData SBSection::GetSectionData(uint64_t offset, uint64_t size) {
@@ -217,7 +217,7 @@ SBData SBSection::GetSectionData(uint64_t offset, uint64_t size) {
}
}
}
- return LLDB_RECORD_RESULT(sb_data);
+ return sb_data;
}
SectionType SBSection::GetSectionType() {
diff --git a/lldb/source/API/SBSourceManager.cpp b/lldb/source/API/SBSourceManager.cpp
index 612bb2d207e1..e1cfb4dfde15 100644
--- a/lldb/source/API/SBSourceManager.cpp
+++ b/lldb/source/API/SBSourceManager.cpp
@@ -100,7 +100,7 @@ operator=(const lldb::SBSourceManager &rhs) {
rhs);
m_opaque_up = std::make_unique<SourceManagerImpl>(*(rhs.m_opaque_up.get()));
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBSourceManager::~SBSourceManager() = default;
diff --git a/lldb/source/API/SBStringList.cpp b/lldb/source/API/SBStringList.cpp
index 16099c7ae075..afafd7429fd7 100644
--- a/lldb/source/API/SBStringList.cpp
+++ b/lldb/source/API/SBStringList.cpp
@@ -33,7 +33,7 @@ const SBStringList &SBStringList::operator=(const SBStringList &rhs) {
if (this != &rhs)
m_opaque_up = clone(rhs.m_opaque_up);
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBStringList::~SBStringList() = default;
diff --git a/lldb/source/API/SBStructuredData.cpp b/lldb/source/API/SBStructuredData.cpp
index 0ae5f2b8c52b..788471f42cec 100644
--- a/lldb/source/API/SBStructuredData.cpp
+++ b/lldb/source/API/SBStructuredData.cpp
@@ -54,7 +54,7 @@ operator=(const lldb::SBStructuredData &rhs) {
SBStructuredData, operator=,(const lldb::SBStructuredData &), rhs);
*m_impl_up = *rhs.m_impl_up;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
lldb::SBError SBStructuredData::SetFromJSON(lldb::SBStream &stream) {
@@ -69,7 +69,7 @@ lldb::SBError SBStructuredData::SetFromJSON(lldb::SBStream &stream) {
if (!json_obj || json_obj->GetType() != eStructuredDataTypeDictionary)
error.SetErrorString("Invalid Syntax");
- return LLDB_RECORD_RESULT(error);
+ return error;
}
lldb::SBError SBStructuredData::SetFromJSON(const char *json) {
@@ -77,7 +77,7 @@ lldb::SBError SBStructuredData::SetFromJSON(const char *json) {
(const char *), json);
lldb::SBStream s;
s.Print(json);
- return LLDB_RECORD_RESULT(SetFromJSON(s));
+ return SetFromJSON(s);
}
bool SBStructuredData::IsValid() const {
@@ -103,7 +103,7 @@ SBError SBStructuredData::GetAsJSON(lldb::SBStream &stream) const {
SBError error;
error.SetError(m_impl_up->GetAsJSON(stream.ref()));
- return LLDB_RECORD_RESULT(error);
+ return error;
}
lldb::SBError SBStructuredData::GetDescription(lldb::SBStream &stream) const {
@@ -113,7 +113,7 @@ lldb::SBError SBStructuredData::GetDescription(lldb::SBStream &stream) const {
Status error = m_impl_up->GetDescription(stream.ref());
SBError sb_error;
sb_error.SetError(error);
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
StructuredDataType SBStructuredData::GetType() const {
@@ -162,7 +162,7 @@ lldb::SBStructuredData SBStructuredData::GetValueForKey(const char *key) const {
SBStructuredData result;
result.m_impl_up->SetObjectSP(m_impl_up->GetValueForKey(key));
- return LLDB_RECORD_RESULT(result);
+ return result;
}
lldb::SBStructuredData SBStructuredData::GetItemAtIndex(size_t idx) const {
@@ -171,7 +171,7 @@ lldb::SBStructuredData SBStructuredData::GetItemAtIndex(size_t idx) const {
SBStructuredData result;
result.m_impl_up->SetObjectSP(m_impl_up->GetItemAtIndex(idx));
- return LLDB_RECORD_RESULT(result);
+ return result;
}
uint64_t SBStructuredData::GetIntegerValue(uint64_t fail_value) const {
diff --git a/lldb/source/API/SBSymbol.cpp b/lldb/source/API/SBSymbol.cpp
index b71918452291..96fe5708d344 100644
--- a/lldb/source/API/SBSymbol.cpp
+++ b/lldb/source/API/SBSymbol.cpp
@@ -32,7 +32,7 @@ const SBSymbol &SBSymbol::operator=(const SBSymbol &rhs) {
SBSymbol, operator=,(const lldb::SBSymbol &), rhs);
m_opaque_ptr = rhs.m_opaque_ptr;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBSymbol::~SBSymbol() { m_opaque_ptr = nullptr; }
@@ -112,7 +112,7 @@ SBInstructionList SBSymbol::GetInstructions(SBTarget target) {
LLDB_RECORD_METHOD(lldb::SBInstructionList, SBSymbol, GetInstructions,
(lldb::SBTarget), target);
- return LLDB_RECORD_RESULT(GetInstructions(target, nullptr));
+ return GetInstructions(target, nullptr);
}
SBInstructionList SBSymbol::GetInstructions(SBTarget target,
@@ -137,7 +137,7 @@ SBInstructionList SBSymbol::GetInstructions(SBTarget target,
}
}
}
- return LLDB_RECORD_RESULT(sb_instructions);
+ return sb_instructions;
}
lldb_private::Symbol *SBSymbol::get() { return m_opaque_ptr; }
@@ -151,7 +151,7 @@ SBAddress SBSymbol::GetStartAddress() {
if (m_opaque_ptr && m_opaque_ptr->ValueIsAddress()) {
addr.SetAddress(m_opaque_ptr->GetAddressRef());
}
- return LLDB_RECORD_RESULT(addr);
+ return addr;
}
SBAddress SBSymbol::GetEndAddress() {
@@ -165,7 +165,7 @@ SBAddress SBSymbol::GetEndAddress() {
addr->Slide(m_opaque_ptr->GetByteSize());
}
}
- return LLDB_RECORD_RESULT(addr);
+ return addr;
}
uint32_t SBSymbol::GetPrologueByteSize() {
diff --git a/lldb/source/API/SBSymbolContext.cpp b/lldb/source/API/SBSymbolContext.cpp
index dde7a1388aad..ebe9bcfabb9f 100644
--- a/lldb/source/API/SBSymbolContext.cpp
+++ b/lldb/source/API/SBSymbolContext.cpp
@@ -44,7 +44,7 @@ const SBSymbolContext &SBSymbolContext::operator=(const SBSymbolContext &rhs) {
if (this != &rhs)
m_opaque_up = clone(rhs.m_opaque_up);
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
bool SBSymbolContext::IsValid() const {
@@ -67,15 +67,14 @@ SBModule SBSymbolContext::GetModule() {
sb_module.SetSP(module_sp);
}
- return LLDB_RECORD_RESULT(sb_module);
+ return sb_module;
}
SBCompileUnit SBSymbolContext::GetCompileUnit() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBCompileUnit, SBSymbolContext,
GetCompileUnit);
- return LLDB_RECORD_RESULT(
- SBCompileUnit(m_opaque_up ? m_opaque_up->comp_unit : nullptr));
+ return SBCompileUnit(m_opaque_up ? m_opaque_up->comp_unit : nullptr);
}
SBFunction SBSymbolContext::GetFunction() {
@@ -88,14 +87,13 @@ SBFunction SBSymbolContext::GetFunction() {
SBFunction sb_function(function);
- return LLDB_RECORD_RESULT(sb_function);
+ return sb_function;
}
SBBlock SBSymbolContext::GetBlock() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBBlock, SBSymbolContext, GetBlock);
- return LLDB_RECORD_RESULT(
- SBBlock(m_opaque_up ? m_opaque_up->block : nullptr));
+ return SBBlock(m_opaque_up ? m_opaque_up->block : nullptr);
}
SBLineEntry SBSymbolContext::GetLineEntry() {
@@ -105,7 +103,7 @@ SBLineEntry SBSymbolContext::GetLineEntry() {
if (m_opaque_up)
sb_line_entry.SetLineEntry(m_opaque_up->line_entry);
- return LLDB_RECORD_RESULT(sb_line_entry);
+ return sb_line_entry;
}
SBSymbol SBSymbolContext::GetSymbol() {
@@ -118,7 +116,7 @@ SBSymbol SBSymbolContext::GetSymbol() {
SBSymbol sb_symbol(symbol);
- return LLDB_RECORD_RESULT(sb_symbol);
+ return sb_symbol;
}
void SBSymbolContext::SetModule(lldb::SBModule module) {
@@ -216,7 +214,7 @@ SBSymbolContext::GetParentOfInlinedScope(const SBAddress &curr_frame_pc,
if (m_opaque_up.get() && curr_frame_pc.IsValid()) {
if (m_opaque_up->GetParentOfInlinedScope(curr_frame_pc.ref(), sb_sc.ref(),
parent_frame_addr.ref()))
- return LLDB_RECORD_RESULT(sb_sc);
+ return sb_sc;
}
- return LLDB_RECORD_RESULT(SBSymbolContext());
+ return SBSymbolContext();
}
diff --git a/lldb/source/API/SBSymbolContextList.cpp b/lldb/source/API/SBSymbolContextList.cpp
index 13e039358f7c..2dddd2805cd7 100644
--- a/lldb/source/API/SBSymbolContextList.cpp
+++ b/lldb/source/API/SBSymbolContextList.cpp
@@ -37,7 +37,7 @@ operator=(const SBSymbolContextList &rhs) {
if (this != &rhs)
m_opaque_up = clone(rhs.m_opaque_up);
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
uint32_t SBSymbolContextList::GetSize() const {
@@ -58,7 +58,7 @@ SBSymbolContext SBSymbolContextList::GetContextAtIndex(uint32_t idx) {
if (m_opaque_up->GetContextAtIndex(idx, sc))
sb_sc = sc;
}
- return LLDB_RECORD_RESULT(sb_sc);
+ return sb_sc;
}
void SBSymbolContextList::Clear() {
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp
index 70f17391be07..5bec5610fcff 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -109,7 +109,7 @@ const SBTarget &SBTarget::operator=(const SBTarget &rhs) {
if (this != &rhs)
m_opaque_sp = rhs.m_opaque_sp;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
// Destructor
@@ -126,8 +126,7 @@ SBTarget SBTarget::GetTargetFromEvent(const SBEvent &event) {
LLDB_RECORD_STATIC_METHOD(lldb::SBTarget, SBTarget, GetTargetFromEvent,
(const lldb::SBEvent &), event);
- return LLDB_RECORD_RESULT(
- Target::TargetEventData::GetTargetFromEvent(event.get()));
+ return Target::TargetEventData::GetTargetFromEvent(event.get());
}
uint32_t SBTarget::GetNumModulesFromEvent(const SBEvent &event) {
@@ -147,7 +146,7 @@ SBModule SBTarget::GetModuleAtIndexFromEvent(const uint32_t idx,
const ModuleList module_list =
Target::TargetEventData::GetModuleListFromEvent(event.get());
- return LLDB_RECORD_RESULT(SBModule(module_list.GetModuleAtIndex(idx)));
+ return SBModule(module_list.GetModuleAtIndex(idx));
}
const char *SBTarget::GetBroadcasterClassName() {
@@ -178,7 +177,7 @@ SBProcess SBTarget::GetProcess() {
sb_process.SetSP(process_sp);
}
- return LLDB_RECORD_RESULT(sb_process);
+ return sb_process;
}
SBPlatform SBTarget::GetPlatform() {
@@ -186,12 +185,12 @@ SBPlatform SBTarget::GetPlatform() {
TargetSP target_sp(GetSP());
if (!target_sp)
- return LLDB_RECORD_RESULT(SBPlatform());
+ return SBPlatform();
SBPlatform platform;
platform.m_opaque_sp = target_sp->GetPlatform();
- return LLDB_RECORD_RESULT(platform);
+ return platform;
}
SBDebugger SBTarget::GetDebugger() const {
@@ -201,7 +200,7 @@ SBDebugger SBTarget::GetDebugger() const {
TargetSP target_sp(GetSP());
if (target_sp)
debugger.reset(target_sp->GetDebugger().shared_from_this());
- return LLDB_RECORD_RESULT(debugger);
+ return debugger;
}
SBStructuredData SBTarget::GetStatistics() {
@@ -210,13 +209,13 @@ SBStructuredData SBTarget::GetStatistics() {
SBStructuredData data;
TargetSP target_sp(GetSP());
if (!target_sp)
- return LLDB_RECORD_RESULT(data);
+ return data;
std::string json_str =
llvm::formatv("{0:2}",
DebuggerStats::ReportStatistics(target_sp->GetDebugger(),
target_sp.get())).str();
data.m_impl_up->SetObjectSP(StructuredData::ParseJSON(json_str));
- return LLDB_RECORD_RESULT(data);
+ return data;
}
void SBTarget::SetCollectingStats(bool v) {
@@ -242,7 +241,7 @@ SBProcess SBTarget::LoadCore(const char *core_file) {
core_file);
lldb::SBError error; // Ignored
- return LLDB_RECORD_RESULT(LoadCore(core_file, error));
+ return LoadCore(core_file, error);
}
SBProcess SBTarget::LoadCore(const char *core_file, lldb::SBError &error) {
@@ -266,7 +265,7 @@ SBProcess SBTarget::LoadCore(const char *core_file, lldb::SBError &error) {
} else {
error.SetErrorString("SBTarget is invalid");
}
- return LLDB_RECORD_RESULT(sb_process);
+ return sb_process;
}
SBProcess SBTarget::LaunchSimple(char const **argv, char const **envp,
@@ -277,7 +276,7 @@ SBProcess SBTarget::LaunchSimple(char const **argv, char const **envp,
TargetSP target_sp = GetSP();
if (!target_sp)
- return LLDB_RECORD_RESULT(SBProcess());
+ return SBProcess();
SBLaunchInfo launch_info = GetLaunchInfo();
@@ -292,7 +291,7 @@ SBProcess SBTarget::LaunchSimple(char const **argv, char const **envp,
launch_info.SetWorkingDirectory(working_directory);
SBError error;
- return LLDB_RECORD_RESULT(Launch(launch_info, error));
+ return Launch(launch_info, error);
}
SBError SBTarget::Install() {
@@ -304,7 +303,7 @@ SBError SBTarget::Install() {
std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
sb_error.ref() = target_sp->Install(nullptr);
}
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
SBProcess SBTarget::Launch(SBListener &listener, char const **argv,
@@ -343,7 +342,7 @@ SBProcess SBTarget::Launch(SBListener &listener, char const **argv,
error.SetErrorString("process attach is in progress");
else
error.SetErrorString("a process is already being debugged");
- return LLDB_RECORD_RESULT(sb_process);
+ return sb_process;
}
}
@@ -354,7 +353,7 @@ SBProcess SBTarget::Launch(SBListener &listener, char const **argv,
if (listener.IsValid()) {
error.SetErrorString("process is connected and already has a listener, "
"pass empty listener");
- return LLDB_RECORD_RESULT(sb_process);
+ return sb_process;
}
}
@@ -392,7 +391,7 @@ SBProcess SBTarget::Launch(SBListener &listener, char const **argv,
error.SetErrorString("SBTarget is invalid");
}
- return LLDB_RECORD_RESULT(sb_process);
+ return sb_process;
}
SBProcess SBTarget::Launch(SBLaunchInfo &sb_launch_info, SBError &error) {
@@ -417,7 +416,7 @@ SBProcess SBTarget::Launch(SBLaunchInfo &sb_launch_info, SBError &error) {
error.SetErrorString("process attach is in progress");
else
error.SetErrorString("a process is already being debugged");
- return LLDB_RECORD_RESULT(sb_process);
+ return sb_process;
}
}
}
@@ -441,7 +440,7 @@ SBProcess SBTarget::Launch(SBLaunchInfo &sb_launch_info, SBError &error) {
error.SetErrorString("SBTarget is invalid");
}
- return LLDB_RECORD_RESULT(sb_process);
+ return sb_process;
}
lldb::SBProcess SBTarget::Attach(SBAttachInfo &sb_attach_info, SBError &error) {
@@ -465,7 +464,7 @@ lldb::SBProcess SBTarget::Attach(SBAttachInfo &sb_attach_info, SBError &error) {
} else {
error.ref().SetErrorStringWithFormat(
"no process found with process ID %" PRIu64, attach_pid);
- return LLDB_RECORD_RESULT(sb_process);
+ return sb_process;
}
}
}
@@ -476,7 +475,7 @@ lldb::SBProcess SBTarget::Attach(SBAttachInfo &sb_attach_info, SBError &error) {
error.SetErrorString("SBTarget is invalid");
}
- return LLDB_RECORD_RESULT(sb_process);
+ return sb_process;
}
lldb::SBProcess SBTarget::AttachToProcessWithID(
@@ -507,7 +506,7 @@ lldb::SBProcess SBTarget::AttachToProcessWithID(
} else
error.SetErrorString("SBTarget is invalid");
- return LLDB_RECORD_RESULT(sb_process);
+ return sb_process;
}
lldb::SBProcess SBTarget::AttachToProcessWithName(
@@ -536,7 +535,7 @@ lldb::SBProcess SBTarget::AttachToProcessWithName(
} else
error.SetErrorString("SBTarget is invalid");
- return LLDB_RECORD_RESULT(sb_process);
+ return sb_process;
}
lldb::SBProcess SBTarget::ConnectRemote(SBListener &listener, const char *url,
@@ -571,7 +570,7 @@ lldb::SBProcess SBTarget::ConnectRemote(SBListener &listener, const char *url,
error.SetErrorString("SBTarget is invalid");
}
- return LLDB_RECORD_RESULT(sb_process);
+ return sb_process;
}
SBFileSpec SBTarget::GetExecutable() {
@@ -585,7 +584,7 @@ SBFileSpec SBTarget::GetExecutable() {
exe_file_spec.SetFileSpec(exe_module->GetFileSpec());
}
- return LLDB_RECORD_RESULT(exe_file_spec);
+ return exe_file_spec;
}
bool SBTarget::operator==(const SBTarget &rhs) const {
@@ -618,13 +617,13 @@ lldb::SBAddress SBTarget::ResolveLoadAddress(lldb::addr_t vm_addr) {
if (target_sp) {
std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
if (target_sp->ResolveLoadAddress(vm_addr, addr))
- return LLDB_RECORD_RESULT(sb_addr);
+ return sb_addr;
}
// We have a load address that isn't in a section, just return an address
// with the offset filled in (the address) and the section set to NULL
addr.SetRawAddress(vm_addr);
- return LLDB_RECORD_RESULT(sb_addr);
+ return sb_addr;
}
lldb::SBAddress SBTarget::ResolveFileAddress(lldb::addr_t file_addr) {
@@ -637,11 +636,11 @@ lldb::SBAddress SBTarget::ResolveFileAddress(lldb::addr_t file_addr) {
if (target_sp) {
std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
if (target_sp->ResolveFileAddress(file_addr, addr))
- return LLDB_RECORD_RESULT(sb_addr);
+ return sb_addr;
}
addr.SetRawAddress(file_addr);
- return LLDB_RECORD_RESULT(sb_addr);
+ return sb_addr;
}
lldb::SBAddress SBTarget::ResolvePastLoadAddress(uint32_t stop_id,
@@ -655,13 +654,13 @@ lldb::SBAddress SBTarget::ResolvePastLoadAddress(uint32_t stop_id,
if (target_sp) {
std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
if (target_sp->ResolveLoadAddress(vm_addr, addr))
- return LLDB_RECORD_RESULT(sb_addr);
+ return sb_addr;
}
// We have a load address that isn't in a section, just return an address
// with the offset filled in (the address) and the section set to NULL
addr.SetRawAddress(vm_addr);
- return LLDB_RECORD_RESULT(sb_addr);
+ return sb_addr;
}
SBSymbolContext
@@ -679,7 +678,7 @@ SBTarget::ResolveSymbolContextForAddress(const SBAddress &addr,
target_sp->GetImages().ResolveSymbolContextForAddress(addr.ref(), scope,
sc.ref());
}
- return LLDB_RECORD_RESULT(sc);
+ return sc;
}
size_t SBTarget::ReadMemory(const SBAddress addr, void *buf, size_t size,
@@ -707,8 +706,8 @@ SBBreakpoint SBTarget::BreakpointCreateByLocation(const char *file,
LLDB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByLocation,
(const char *, uint32_t), file, line);
- return LLDB_RECORD_RESULT(
- SBBreakpoint(BreakpointCreateByLocation(SBFileSpec(file, false), line)));
+ return SBBreakpoint(
+ BreakpointCreateByLocation(SBFileSpec(file, false), line));
}
SBBreakpoint
@@ -717,7 +716,7 @@ SBTarget::BreakpointCreateByLocation(const SBFileSpec &sb_file_spec,
LLDB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByLocation,
(const lldb::SBFileSpec &, uint32_t), sb_file_spec, line);
- return LLDB_RECORD_RESULT(BreakpointCreateByLocation(sb_file_spec, line, 0));
+ return BreakpointCreateByLocation(sb_file_spec, line, 0);
}
SBBreakpoint
@@ -728,8 +727,7 @@ SBTarget::BreakpointCreateByLocation(const SBFileSpec &sb_file_spec,
sb_file_spec, line, offset);
SBFileSpecList empty_list;
- return LLDB_RECORD_RESULT(
- BreakpointCreateByLocation(sb_file_spec, line, offset, empty_list));
+ return BreakpointCreateByLocation(sb_file_spec, line, offset, empty_list);
}
SBBreakpoint
@@ -741,8 +739,8 @@ SBTarget::BreakpointCreateByLocation(const SBFileSpec &sb_file_spec,
lldb::SBFileSpecList &),
sb_file_spec, line, offset, sb_module_list);
- return LLDB_RECORD_RESULT(BreakpointCreateByLocation(sb_file_spec, line, 0,
- offset, sb_module_list));
+ return BreakpointCreateByLocation(sb_file_spec, line, 0, offset,
+ sb_module_list);
}
SBBreakpoint SBTarget::BreakpointCreateByLocation(
@@ -772,7 +770,7 @@ SBBreakpoint SBTarget::BreakpointCreateByLocation(
skip_prologue, internal, hardware, move_to_nearest_code);
}
- return LLDB_RECORD_RESULT(sb_bp);
+ return sb_bp;
}
SBBreakpoint SBTarget::BreakpointCreateByLocation(
@@ -804,7 +802,7 @@ SBBreakpoint SBTarget::BreakpointCreateByLocation(
move_to_nearest_code ? eLazyBoolYes : eLazyBoolNo);
}
- return LLDB_RECORD_RESULT(sb_bp);
+ return sb_bp;
}
SBBreakpoint SBTarget::BreakpointCreateByName(const char *symbol_name,
@@ -834,7 +832,7 @@ SBBreakpoint SBTarget::BreakpointCreateByName(const char *symbol_name,
}
}
- return LLDB_RECORD_RESULT(sb_bp);
+ return sb_bp;
}
lldb::SBBreakpoint
@@ -847,9 +845,9 @@ SBTarget::BreakpointCreateByName(const char *symbol_name,
symbol_name, module_list, comp_unit_list);
lldb::FunctionNameType name_type_mask = eFunctionNameTypeAuto;
- return LLDB_RECORD_RESULT(
- BreakpointCreateByName(symbol_name, name_type_mask, eLanguageTypeUnknown,
- module_list, comp_unit_list));
+ return BreakpointCreateByName(symbol_name, name_type_mask,
+ eLanguageTypeUnknown, module_list,
+ comp_unit_list);
}
lldb::SBBreakpoint SBTarget::BreakpointCreateByName(
@@ -860,9 +858,9 @@ lldb::SBBreakpoint SBTarget::BreakpointCreateByName(
const lldb::SBFileSpecList &),
symbol_name, name_type_mask, module_list, comp_unit_list);
- return LLDB_RECORD_RESULT(
- BreakpointCreateByName(symbol_name, name_type_mask, eLanguageTypeUnknown,
- module_list, comp_unit_list));
+ return BreakpointCreateByName(symbol_name, name_type_mask,
+ eLanguageTypeUnknown, module_list,
+ comp_unit_list);
}
lldb::SBBreakpoint SBTarget::BreakpointCreateByName(
@@ -889,7 +887,7 @@ lldb::SBBreakpoint SBTarget::BreakpointCreateByName(
skip_prologue, internal, hardware);
}
- return LLDB_RECORD_RESULT(sb_bp);
+ return sb_bp;
}
lldb::SBBreakpoint SBTarget::BreakpointCreateByNames(
@@ -901,9 +899,9 @@ lldb::SBBreakpoint SBTarget::BreakpointCreateByNames(
const lldb::SBFileSpecList &),
symbol_names, num_names, name_type_mask, module_list, comp_unit_list);
- return LLDB_RECORD_RESULT(BreakpointCreateByNames(
- symbol_names, num_names, name_type_mask, eLanguageTypeUnknown,
- module_list, comp_unit_list));
+ return BreakpointCreateByNames(symbol_names, num_names, name_type_mask,
+ eLanguageTypeUnknown, module_list,
+ comp_unit_list);
}
lldb::SBBreakpoint SBTarget::BreakpointCreateByNames(
@@ -917,9 +915,9 @@ lldb::SBBreakpoint SBTarget::BreakpointCreateByNames(
symbol_names, num_names, name_type_mask, symbol_language,
module_list, comp_unit_list);
- return LLDB_RECORD_RESULT(BreakpointCreateByNames(
- symbol_names, num_names, name_type_mask, eLanguageTypeUnknown, 0,
- module_list, comp_unit_list));
+ return BreakpointCreateByNames(symbol_names, num_names, name_type_mask,
+ eLanguageTypeUnknown, 0, module_list,
+ comp_unit_list);
}
lldb::SBBreakpoint SBTarget::BreakpointCreateByNames(
@@ -946,7 +944,7 @@ lldb::SBBreakpoint SBTarget::BreakpointCreateByNames(
symbol_language, offset, skip_prologue, internal, hardware);
}
- return LLDB_RECORD_RESULT(sb_bp);
+ return sb_bp;
}
SBBreakpoint SBTarget::BreakpointCreateByRegex(const char *symbol_name_regex,
@@ -960,9 +958,8 @@ SBBreakpoint SBTarget::BreakpointCreateByRegex(const char *symbol_name_regex,
if (module_name && module_name[0]) {
module_spec_list.Append(FileSpec(module_name));
}
- return LLDB_RECORD_RESULT(
- BreakpointCreateByRegex(symbol_name_regex, eLanguageTypeUnknown,
- module_spec_list, comp_unit_list));
+ return BreakpointCreateByRegex(symbol_name_regex, eLanguageTypeUnknown,
+ module_spec_list, comp_unit_list);
}
lldb::SBBreakpoint
@@ -974,8 +971,8 @@ SBTarget::BreakpointCreateByRegex(const char *symbol_name_regex,
const lldb::SBFileSpecList &),
symbol_name_regex, module_list, comp_unit_list);
- return LLDB_RECORD_RESULT(BreakpointCreateByRegex(
- symbol_name_regex, eLanguageTypeUnknown, module_list, comp_unit_list));
+ return BreakpointCreateByRegex(symbol_name_regex, eLanguageTypeUnknown,
+ module_list, comp_unit_list);
}
lldb::SBBreakpoint SBTarget::BreakpointCreateByRegex(
@@ -1002,7 +999,7 @@ lldb::SBBreakpoint SBTarget::BreakpointCreateByRegex(
symbol_language, skip_prologue, internal, hardware);
}
- return LLDB_RECORD_RESULT(sb_bp);
+ return sb_bp;
}
SBBreakpoint SBTarget::BreakpointCreateByAddress(addr_t address) {
@@ -1017,7 +1014,7 @@ SBBreakpoint SBTarget::BreakpointCreateByAddress(addr_t address) {
sb_bp = target_sp->CreateBreakpoint(address, false, hardware);
}
- return LLDB_RECORD_RESULT(sb_bp);
+ return sb_bp;
}
SBBreakpoint SBTarget::BreakpointCreateBySBAddress(SBAddress &sb_address) {
@@ -1027,7 +1024,7 @@ SBBreakpoint SBTarget::BreakpointCreateBySBAddress(SBAddress &sb_address) {
SBBreakpoint sb_bp;
TargetSP target_sp(GetSP());
if (!sb_address.IsValid()) {
- return LLDB_RECORD_RESULT(sb_bp);
+ return sb_bp;
}
if (target_sp) {
@@ -1036,7 +1033,7 @@ SBBreakpoint SBTarget::BreakpointCreateBySBAddress(SBAddress &sb_address) {
sb_bp = target_sp->CreateBreakpoint(sb_address.ref(), false, hardware);
}
- return LLDB_RECORD_RESULT(sb_bp);
+ return sb_bp;
}
lldb::SBBreakpoint
@@ -1059,8 +1056,8 @@ SBTarget::BreakpointCreateBySourceRegex(const char *source_regex,
source_file_list.Append(source_file);
}
- return LLDB_RECORD_RESULT(BreakpointCreateBySourceRegex(
- source_regex, module_spec_list, source_file_list));
+ return BreakpointCreateBySourceRegex(source_regex, module_spec_list,
+ source_file_list);
}
lldb::SBBreakpoint SBTarget::BreakpointCreateBySourceRegex(
@@ -1072,8 +1069,8 @@ lldb::SBBreakpoint SBTarget::BreakpointCreateBySourceRegex(
const lldb::SBFileSpecList &),
source_regex, module_list, source_file_list);
- return LLDB_RECORD_RESULT(BreakpointCreateBySourceRegex(
- source_regex, module_list, source_file_list, SBStringList()));
+ return BreakpointCreateBySourceRegex(source_regex, module_list,
+ source_file_list, SBStringList());
}
lldb::SBBreakpoint SBTarget::BreakpointCreateBySourceRegex(
@@ -1103,7 +1100,7 @@ lldb::SBBreakpoint SBTarget::BreakpointCreateBySourceRegex(
std::move(regexp), false, hardware, move_to_nearest_code);
}
- return LLDB_RECORD_RESULT(sb_bp);
+ return sb_bp;
}
lldb::SBBreakpoint
@@ -1122,7 +1119,7 @@ SBTarget::BreakpointCreateForException(lldb::LanguageType language,
hardware);
}
- return LLDB_RECORD_RESULT(sb_bp);
+ return sb_bp;
}
lldb::SBBreakpoint SBTarget::BreakpointCreateFromScript(
@@ -1152,7 +1149,7 @@ lldb::SBBreakpoint SBTarget::BreakpointCreateFromScript(
&error);
}
- return LLDB_RECORD_RESULT(sb_bp);
+ return sb_bp;
}
uint32_t SBTarget::GetNumBreakpoints() const {
@@ -1176,7 +1173,7 @@ SBBreakpoint SBTarget::GetBreakpointAtIndex(uint32_t idx) const {
// The breakpoint list is thread safe, no need to lock
sb_breakpoint = target_sp->GetBreakpointList().GetBreakpointAtIndex(idx);
}
- return LLDB_RECORD_RESULT(sb_breakpoint);
+ return sb_breakpoint;
}
bool SBTarget::BreakpointDelete(break_id_t bp_id) {
@@ -1204,7 +1201,7 @@ SBBreakpoint SBTarget::FindBreakpointByID(break_id_t bp_id) {
sb_breakpoint = target_sp->GetBreakpointByID(bp_id);
}
- return LLDB_RECORD_RESULT(sb_breakpoint);
+ return sb_breakpoint;
}
bool SBTarget::FindBreakpointsByName(const char *name,
@@ -1301,8 +1298,7 @@ lldb::SBError SBTarget::BreakpointsCreateFromFile(SBFileSpec &source_file,
source_file, new_bps);
SBStringList empty_name_list;
- return LLDB_RECORD_RESULT(
- BreakpointsCreateFromFile(source_file, empty_name_list, new_bps));
+ return BreakpointsCreateFromFile(source_file, empty_name_list, new_bps);
}
lldb::SBError SBTarget::BreakpointsCreateFromFile(SBFileSpec &source_file,
@@ -1318,7 +1314,7 @@ lldb::SBError SBTarget::BreakpointsCreateFromFile(SBFileSpec &source_file,
if (!target_sp) {
sberr.SetErrorString(
"BreakpointCreateFromFile called with invalid target.");
- return LLDB_RECORD_RESULT(sberr);
+ return sberr;
}
std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
@@ -1332,14 +1328,14 @@ lldb::SBError SBTarget::BreakpointsCreateFromFile(SBFileSpec &source_file,
sberr.ref() = target_sp->CreateBreakpointsFromFile(source_file.ref(),
name_vector, bp_ids);
if (sberr.Fail())
- return LLDB_RECORD_RESULT(sberr);
+ return sberr;
size_t num_bkpts = bp_ids.GetSize();
for (size_t i = 0; i < num_bkpts; i++) {
BreakpointID bp_id = bp_ids.GetBreakpointIDAtIndex(i);
new_bps.AppendByID(bp_id.GetBreakpointID());
}
- return LLDB_RECORD_RESULT(sberr);
+ return sberr;
}
lldb::SBError SBTarget::BreakpointsWriteToFile(SBFileSpec &dest_file) {
@@ -1350,10 +1346,10 @@ lldb::SBError SBTarget::BreakpointsWriteToFile(SBFileSpec &dest_file) {
TargetSP target_sp(GetSP());
if (!target_sp) {
sberr.SetErrorString("BreakpointWriteToFile called with invalid target.");
- return LLDB_RECORD_RESULT(sberr);
+ return sberr;
}
SBBreakpointList bkpt_list(*this);
- return LLDB_RECORD_RESULT(BreakpointsWriteToFile(dest_file, bkpt_list));
+ return BreakpointsWriteToFile(dest_file, bkpt_list);
}
lldb::SBError SBTarget::BreakpointsWriteToFile(SBFileSpec &dest_file,
@@ -1367,7 +1363,7 @@ lldb::SBError SBTarget::BreakpointsWriteToFile(SBFileSpec &dest_file,
TargetSP target_sp(GetSP());
if (!target_sp) {
sberr.SetErrorString("BreakpointWriteToFile called with invalid target.");
- return LLDB_RECORD_RESULT(sberr);
+ return sberr;
}
std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
@@ -1375,7 +1371,7 @@ lldb::SBError SBTarget::BreakpointsWriteToFile(SBFileSpec &dest_file,
bkpt_list.CopyToBreakpointIDList(bp_id_list);
sberr.ref() = target_sp->SerializeBreakpointsToFile(dest_file.ref(),
bp_id_list, append);
- return LLDB_RECORD_RESULT(sberr);
+ return sberr;
}
uint32_t SBTarget::GetNumWatchpoints() const {
@@ -1399,7 +1395,7 @@ SBWatchpoint SBTarget::GetWatchpointAtIndex(uint32_t idx) const {
// The watchpoint list is thread safe, no need to lock
sb_watchpoint.SetSP(target_sp->GetWatchpointList().GetByIndex(idx));
}
- return LLDB_RECORD_RESULT(sb_watchpoint);
+ return sb_watchpoint;
}
bool SBTarget::DeleteWatchpoint(watch_id_t wp_id) {
@@ -1435,7 +1431,7 @@ SBWatchpoint SBTarget::FindWatchpointByID(lldb::watch_id_t wp_id) {
sb_watchpoint.SetSP(watchpoint_sp);
}
- return LLDB_RECORD_RESULT(sb_watchpoint);
+ return sb_watchpoint;
}
lldb::SBWatchpoint SBTarget::WatchAddress(lldb::addr_t addr, size_t size,
@@ -1459,7 +1455,7 @@ lldb::SBWatchpoint SBTarget::WatchAddress(lldb::addr_t addr, size_t size,
if (watch_type == 0) {
error.SetErrorString(
"Can't create a watchpoint that is neither read nor write.");
- return LLDB_RECORD_RESULT(sb_watchpoint);
+ return sb_watchpoint;
}
// Target::CreateWatchpoint() is thread safe.
@@ -1472,7 +1468,7 @@ lldb::SBWatchpoint SBTarget::WatchAddress(lldb::addr_t addr, size_t size,
sb_watchpoint.SetSP(watchpoint_sp);
}
- return LLDB_RECORD_RESULT(sb_watchpoint);
+ return sb_watchpoint;
}
bool SBTarget::EnableAllWatchpoints() {
@@ -1520,7 +1516,7 @@ SBValue SBTarget::CreateValueFromAddress(const char *name, SBAddress addr,
exe_ctx, ast_type);
}
sb_value.SetSP(new_value_sp);
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
lldb::SBValue SBTarget::CreateValueFromData(const char *name, lldb::SBData data,
@@ -1540,7 +1536,7 @@ lldb::SBValue SBTarget::CreateValueFromData(const char *name, lldb::SBData data,
exe_ctx, ast_type);
}
sb_value.SetSP(new_value_sp);
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
lldb::SBValue SBTarget::CreateValueFromExpression(const char *name,
@@ -1557,7 +1553,7 @@ lldb::SBValue SBTarget::CreateValueFromExpression(const char *name,
ValueObject::CreateValueObjectFromExpression(name, expr, exe_ctx);
}
sb_value.SetSP(new_value_sp);
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
bool SBTarget::DeleteAllWatchpoints() {
@@ -1599,7 +1595,7 @@ lldb::SBModule SBTarget::AddModule(const char *path, const char *triple,
(const char *, const char *, const char *), path, triple,
uuid_cstr);
- return LLDB_RECORD_RESULT(AddModule(path, triple, uuid_cstr, nullptr));
+ return AddModule(path, triple, uuid_cstr, nullptr);
}
lldb::SBModule SBTarget::AddModule(const char *path, const char *triple,
@@ -1629,7 +1625,7 @@ lldb::SBModule SBTarget::AddModule(const char *path, const char *triple,
sb_module.SetSP(target_sp->GetOrCreateModule(module_spec, true /* notify */));
}
- return LLDB_RECORD_RESULT(sb_module);
+ return sb_module;
}
lldb::SBModule SBTarget::AddModule(const SBModuleSpec &module_spec) {
@@ -1641,7 +1637,7 @@ lldb::SBModule SBTarget::AddModule(const SBModuleSpec &module_spec) {
if (target_sp)
sb_module.SetSP(target_sp->GetOrCreateModule(*module_spec.m_opaque_up,
true /* notify */));
- return LLDB_RECORD_RESULT(sb_module);
+ return sb_module;
}
bool SBTarget::AddModule(lldb::SBModule &module) {
@@ -1685,7 +1681,7 @@ SBModule SBTarget::FindModule(const SBFileSpec &sb_file_spec) {
// The module list is thread safe, no need to lock
sb_module.SetSP(target_sp->GetImages().FindFirstModule(module_spec));
}
- return LLDB_RECORD_RESULT(sb_module);
+ return sb_module;
}
SBSymbolContextList SBTarget::FindCompileUnits(const SBFileSpec &sb_file_spec) {
@@ -1696,7 +1692,7 @@ SBSymbolContextList SBTarget::FindCompileUnits(const SBFileSpec &sb_file_spec) {
const TargetSP target_sp(GetSP());
if (target_sp && sb_file_spec.IsValid())
target_sp->GetImages().FindCompileUnits(*sb_file_spec, *sb_sc_list);
- return LLDB_RECORD_RESULT(sb_sc_list);
+ return sb_sc_list;
}
lldb::ByteOrder SBTarget::GetByteOrder() {
@@ -1775,7 +1771,7 @@ SBModule SBTarget::GetModuleAtIndex(uint32_t idx) {
sb_module.SetSP(module_sp);
}
- return LLDB_RECORD_RESULT(sb_module);
+ return sb_module;
}
bool SBTarget::RemoveModule(lldb::SBModule module) {
@@ -1795,8 +1791,7 @@ SBBroadcaster SBTarget::GetBroadcaster() const {
TargetSP target_sp(GetSP());
SBBroadcaster broadcaster(target_sp.get(), false);
-
- return LLDB_RECORD_RESULT(broadcaster);
+ return broadcaster;
}
bool SBTarget::GetDescription(SBStream &description,
@@ -1823,11 +1818,11 @@ lldb::SBSymbolContextList SBTarget::FindFunctions(const char *name,
lldb::SBSymbolContextList sb_sc_list;
if (!name || !name[0])
- return LLDB_RECORD_RESULT(sb_sc_list);
+ return sb_sc_list;
TargetSP target_sp(GetSP());
if (!target_sp)
- return LLDB_RECORD_RESULT(sb_sc_list);
+ return sb_sc_list;
ModuleFunctionSearchOptions function_options;
function_options.include_symbols = true;
@@ -1836,7 +1831,7 @@ lldb::SBSymbolContextList SBTarget::FindFunctions(const char *name,
FunctionNameType mask = static_cast<FunctionNameType>(name_type_mask);
target_sp->GetImages().FindFunctions(ConstString(name), mask,
function_options, *sb_sc_list);
- return LLDB_RECORD_RESULT(sb_sc_list);
+ return sb_sc_list;
}
lldb::SBSymbolContextList SBTarget::FindGlobalFunctions(const char *name,
@@ -1874,7 +1869,7 @@ lldb::SBSymbolContextList SBTarget::FindGlobalFunctions(const char *name,
}
}
}
- return LLDB_RECORD_RESULT(sb_sc_list);
+ return sb_sc_list;
}
lldb::SBType SBTarget::FindFirstType(const char *typename_cstr) {
@@ -1895,7 +1890,7 @@ lldb::SBType SBTarget::FindFirstType(const char *typename_cstr) {
TypeSP type_sp(
module_sp->FindFirstType(sc, const_typename, exact_match));
if (type_sp)
- return LLDB_RECORD_RESULT(SBType(type_sp));
+ return SBType(type_sp);
}
}
@@ -1905,7 +1900,7 @@ lldb::SBType SBTarget::FindFirstType(const char *typename_cstr) {
if (auto vendor = runtime->GetDeclVendor()) {
auto types = vendor->FindTypes(const_typename, /*max_matches*/ 1);
if (!types.empty())
- return LLDB_RECORD_RESULT(SBType(types.front()));
+ return SBType(types.front());
}
}
}
@@ -1913,10 +1908,10 @@ lldb::SBType SBTarget::FindFirstType(const char *typename_cstr) {
// No matches, search for basic typename matches
for (auto *type_system : target_sp->GetScratchTypeSystems())
if (auto type = type_system->GetBuiltinTypeByName(const_typename))
- return LLDB_RECORD_RESULT(SBType(type));
+ return SBType(type);
}
- return LLDB_RECORD_RESULT(SBType());
+ return SBType();
}
SBType SBTarget::GetBasicType(lldb::BasicType type) {
@@ -1927,9 +1922,9 @@ SBType SBTarget::GetBasicType(lldb::BasicType type) {
if (target_sp) {
for (auto *type_system : target_sp->GetScratchTypeSystems())
if (auto compiler_type = type_system->GetBasicTypeFromAST(type))
- return LLDB_RECORD_RESULT(SBType(compiler_type));
+ return SBType(compiler_type);
}
- return LLDB_RECORD_RESULT(SBType());
+ return SBType();
}
lldb::SBTypeList SBTarget::FindTypes(const char *typename_cstr) {
@@ -1973,7 +1968,7 @@ lldb::SBTypeList SBTarget::FindTypes(const char *typename_cstr) {
sb_type_list.Append(SBType(compiler_type));
}
}
- return LLDB_RECORD_RESULT(sb_type_list);
+ return sb_type_list;
}
SBValueList SBTarget::FindGlobalVariables(const char *name,
@@ -2001,7 +1996,7 @@ SBValueList SBTarget::FindGlobalVariables(const char *name,
}
}
- return LLDB_RECORD_RESULT(sb_value_list);
+ return sb_value_list;
}
SBValueList SBTarget::FindGlobalVariables(const char *name,
@@ -2047,7 +2042,7 @@ SBValueList SBTarget::FindGlobalVariables(const char *name,
}
}
- return LLDB_RECORD_RESULT(sb_value_list);
+ return sb_value_list;
}
lldb::SBValue SBTarget::FindFirstGlobalVariable(const char *name) {
@@ -2056,15 +2051,15 @@ lldb::SBValue SBTarget::FindFirstGlobalVariable(const char *name) {
SBValueList sb_value_list(FindGlobalVariables(name, 1));
if (sb_value_list.IsValid() && sb_value_list.GetSize() > 0)
- return LLDB_RECORD_RESULT(sb_value_list.GetValueAtIndex(0));
- return LLDB_RECORD_RESULT(SBValue());
+ return sb_value_list.GetValueAtIndex(0);
+ return SBValue();
}
SBSourceManager SBTarget::GetSourceManager() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBSourceManager, SBTarget, GetSourceManager);
SBSourceManager source_manager(*this);
- return LLDB_RECORD_RESULT(source_manager);
+ return source_manager;
}
lldb::SBInstructionList SBTarget::ReadInstructions(lldb::SBAddress base_addr,
@@ -2072,7 +2067,7 @@ lldb::SBInstructionList SBTarget::ReadInstructions(lldb::SBAddress base_addr,
LLDB_RECORD_METHOD(lldb::SBInstructionList, SBTarget, ReadInstructions,
(lldb::SBAddress, uint32_t), base_addr, count);
- return LLDB_RECORD_RESULT(ReadInstructions(base_addr, count, nullptr));
+ return ReadInstructions(base_addr, count, nullptr);
}
lldb::SBInstructionList SBTarget::ReadInstructions(lldb::SBAddress base_addr,
@@ -2104,7 +2099,7 @@ lldb::SBInstructionList SBTarget::ReadInstructions(lldb::SBAddress base_addr,
}
}
- return LLDB_RECORD_RESULT(sb_instructions);
+ return sb_instructions;
}
lldb::SBInstructionList SBTarget::GetInstructions(lldb::SBAddress base_addr,
@@ -2114,8 +2109,7 @@ lldb::SBInstructionList SBTarget::GetInstructions(lldb::SBAddress base_addr,
(lldb::SBAddress, const void *, size_t), base_addr, buf,
size);
- return LLDB_RECORD_RESULT(
- GetInstructionsWithFlavor(base_addr, nullptr, buf, size));
+ return GetInstructionsWithFlavor(base_addr, nullptr, buf, size);
}
lldb::SBInstructionList
@@ -2143,7 +2137,7 @@ SBTarget::GetInstructionsWithFlavor(lldb::SBAddress base_addr,
UINT32_MAX, data_from_file));
}
- return LLDB_RECORD_RESULT(sb_instructions);
+ return sb_instructions;
}
lldb::SBInstructionList SBTarget::GetInstructions(lldb::addr_t base_addr,
@@ -2153,8 +2147,8 @@ lldb::SBInstructionList SBTarget::GetInstructions(lldb::addr_t base_addr,
(lldb::addr_t, const void *, size_t), base_addr, buf,
size);
- return LLDB_RECORD_RESULT(GetInstructionsWithFlavor(
- ResolveLoadAddress(base_addr), nullptr, buf, size));
+ return GetInstructionsWithFlavor(ResolveLoadAddress(base_addr), nullptr, buf,
+ size);
}
lldb::SBInstructionList
@@ -2166,8 +2160,8 @@ SBTarget::GetInstructionsWithFlavor(lldb::addr_t base_addr,
(lldb::addr_t, const char *, const void *, size_t),
base_addr, flavor_string, buf, size);
- return LLDB_RECORD_RESULT(GetInstructionsWithFlavor(
- ResolveLoadAddress(base_addr), flavor_string, buf, size));
+ return GetInstructionsWithFlavor(ResolveLoadAddress(base_addr), flavor_string,
+ buf, size);
}
SBError SBTarget::SetSectionLoadAddress(lldb::SBSection section,
@@ -2206,7 +2200,7 @@ SBError SBTarget::SetSectionLoadAddress(lldb::SBSection section,
} else {
sb_error.SetErrorString("invalid target");
}
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
SBError SBTarget::ClearSectionLoadAddress(lldb::SBSection section) {
@@ -2241,7 +2235,7 @@ SBError SBTarget::ClearSectionLoadAddress(lldb::SBSection section) {
} else {
sb_error.SetErrorStringWithFormat("invalid target");
}
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
SBError SBTarget::SetModuleLoadAddress(lldb::SBModule module,
@@ -2276,7 +2270,7 @@ SBError SBTarget::SetModuleLoadAddress(lldb::SBModule module,
} else {
sb_error.SetErrorStringWithFormat("invalid target");
}
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
SBError SBTarget::ClearModuleLoadAddress(lldb::SBModule module) {
@@ -2328,7 +2322,7 @@ SBError SBTarget::ClearModuleLoadAddress(lldb::SBModule module) {
} else {
sb_error.SetErrorStringWithFormat("invalid target");
}
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
lldb::SBSymbolContextList SBTarget::FindSymbols(const char *name,
@@ -2343,7 +2337,7 @@ lldb::SBSymbolContextList SBTarget::FindSymbols(const char *name,
target_sp->GetImages().FindSymbolsWithNameAndType(
ConstString(name), symbol_type, *sb_sc_list);
}
- return LLDB_RECORD_RESULT(sb_sc_list);
+ return sb_sc_list;
}
lldb::SBValue SBTarget::EvaluateExpression(const char *expr) {
@@ -2352,14 +2346,14 @@ lldb::SBValue SBTarget::EvaluateExpression(const char *expr) {
TargetSP target_sp(GetSP());
if (!target_sp)
- return LLDB_RECORD_RESULT(SBValue());
+ return SBValue();
SBExpressionOptions options;
lldb::DynamicValueType fetch_dynamic_value =
target_sp->GetPreferDynamicValue();
options.SetFetchDynamicValue(fetch_dynamic_value);
options.SetUnwindOnError(true);
- return LLDB_RECORD_RESULT(EvaluateExpression(expr, options));
+ return EvaluateExpression(expr, options);
}
lldb::SBValue SBTarget::EvaluateExpression(const char *expr,
@@ -2375,7 +2369,7 @@ lldb::SBValue SBTarget::EvaluateExpression(const char *expr,
StackFrame *frame = nullptr;
if (target_sp) {
if (expr == nullptr || expr[0] == '\0') {
- return LLDB_RECORD_RESULT(expr_result);
+ return expr_result;
}
std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
@@ -2395,7 +2389,7 @@ lldb::SBValue SBTarget::EvaluateExpression(const char *expr,
"** [SBTarget::EvaluateExpression] Expression result is "
"%s, summary %s **",
expr_result.GetValue(), expr_result.GetSummary());
- return LLDB_RECORD_RESULT(expr_result);
+ return expr_result;
}
lldb::addr_t SBTarget::GetStackRedZoneSize() {
@@ -2437,7 +2431,7 @@ lldb::SBLaunchInfo SBTarget::GetLaunchInfo() const {
TargetSP target_sp(GetSP());
if (target_sp)
launch_info.set_ref(m_opaque_sp->GetProcessLaunchInfo());
- return LLDB_RECORD_RESULT(launch_info);
+ return launch_info;
}
void SBTarget::SetLaunchInfo(const lldb::SBLaunchInfo &launch_info) {
@@ -2454,10 +2448,10 @@ SBEnvironment SBTarget::GetEnvironment() {
TargetSP target_sp(GetSP());
if (target_sp) {
- return LLDB_RECORD_RESULT(SBEnvironment(target_sp->GetEnvironment()));
+ return SBEnvironment(target_sp->GetEnvironment());
}
- return LLDB_RECORD_RESULT(SBEnvironment());
+ return SBEnvironment();
}
lldb::SBTrace SBTarget::GetTrace() {
@@ -2465,9 +2459,9 @@ lldb::SBTrace SBTarget::GetTrace() {
TargetSP target_sp(GetSP());
if (target_sp)
- return LLDB_RECORD_RESULT(SBTrace(target_sp->GetTrace()));
+ return SBTrace(target_sp->GetTrace());
- return LLDB_RECORD_RESULT(SBTrace());
+ return SBTrace();
}
lldb::SBTrace SBTarget::CreateTrace(lldb::SBError &error) {
@@ -2478,12 +2472,12 @@ lldb::SBTrace SBTarget::CreateTrace(lldb::SBError &error) {
if (target_sp) {
if (llvm::Expected<lldb::TraceSP> trace_sp = target_sp->CreateTrace()) {
- return LLDB_RECORD_RESULT(SBTrace(*trace_sp));
+ return SBTrace(*trace_sp);
} else {
error.SetErrorString(llvm::toString(trace_sp.takeError()).c_str());
}
} else {
error.SetErrorString("missing target");
}
- return LLDB_RECORD_RESULT(SBTrace());
+ return SBTrace();
}
diff --git a/lldb/source/API/SBThread.cpp b/lldb/source/API/SBThread.cpp
index 7d3fe170a797..494cfa9b5262 100644
--- a/lldb/source/API/SBThread.cpp
+++ b/lldb/source/API/SBThread.cpp
@@ -81,7 +81,7 @@ const lldb::SBThread &SBThread::operator=(const SBThread &rhs) {
if (this != &rhs)
m_opaque_sp = clone(rhs.m_opaque_sp);
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
// Destructor
@@ -105,7 +105,7 @@ lldb::SBQueue SBThread::GetQueue() const {
}
}
- return LLDB_RECORD_RESULT(sb_queue);
+ return sb_queue;
}
bool SBThread::IsValid() const {
@@ -313,18 +313,18 @@ SBThread::GetStopReasonExtendedBacktraces(InstrumentationRuntimeType type) {
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
if (!exe_ctx.HasThreadScope())
- return LLDB_RECORD_RESULT(SBThreadCollection());
+ return SBThreadCollection();
ProcessSP process_sp = exe_ctx.GetProcessSP();
StopInfoSP stop_info = exe_ctx.GetThreadPtr()->GetStopInfo();
StructuredData::ObjectSP info = stop_info->GetExtendedInfo();
if (!info)
- return LLDB_RECORD_RESULT(threads);
+ return threads;
threads = process_sp->GetInstrumentationRuntime(type)
->GetBacktracesFromExtendedStopInfo(info);
- return LLDB_RECORD_RESULT(threads);
+ return threads;
}
size_t SBThread::GetStopDescription(char *dst, size_t dst_len) {
@@ -373,7 +373,7 @@ SBValue SBThread::GetStopReturnValue() {
}
}
- return LLDB_RECORD_RESULT(SBValue(return_valobj_sp));
+ return SBValue(return_valobj_sp);
}
void SBThread::SetThread(const ThreadSP &lldb_object_sp) {
@@ -807,7 +807,7 @@ SBError SBThread::StepOverUntil(lldb::SBFrame &sb_frame,
if (line == 0) {
sb_error.SetErrorString("invalid line argument");
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
if (!frame_sp) {
@@ -819,7 +819,7 @@ SBError SBThread::StepOverUntil(lldb::SBFrame &sb_frame,
SymbolContext frame_sc;
if (!frame_sp) {
sb_error.SetErrorString("no valid frames in thread to step");
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
// If we have a frame, get its line
@@ -830,7 +830,7 @@ SBError SBThread::StepOverUntil(lldb::SBFrame &sb_frame,
if (frame_sc.comp_unit == nullptr) {
sb_error.SetErrorStringWithFormat(
"frame %u doesn't have debug information", frame_sp->GetFrameIndex());
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
FileSpec step_file_spec;
@@ -842,7 +842,7 @@ SBError SBThread::StepOverUntil(lldb::SBFrame &sb_frame,
step_file_spec = frame_sc.line_entry.file;
else {
sb_error.SetErrorString("invalid file argument or no file for frame");
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
}
@@ -904,15 +904,14 @@ SBError SBThread::StepOverUntil(lldb::SBFrame &sb_frame,
} else {
sb_error.SetErrorString("this SBThread object is invalid");
}
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
SBError SBThread::StepUsingScriptedThreadPlan(const char *script_class_name) {
LLDB_RECORD_METHOD(lldb::SBError, SBThread, StepUsingScriptedThreadPlan,
(const char *), script_class_name);
- return LLDB_RECORD_RESULT(
- StepUsingScriptedThreadPlan(script_class_name, true));
+ return StepUsingScriptedThreadPlan(script_class_name, true);
}
SBError SBThread::StepUsingScriptedThreadPlan(const char *script_class_name,
@@ -922,8 +921,8 @@ SBError SBThread::StepUsingScriptedThreadPlan(const char *script_class_name,
resume_immediately);
lldb::SBStructuredData no_data;
- return LLDB_RECORD_RESULT(StepUsingScriptedThreadPlan(
- script_class_name, no_data, resume_immediately));
+ return StepUsingScriptedThreadPlan(script_class_name, no_data,
+ resume_immediately);
}
SBError SBThread::StepUsingScriptedThreadPlan(const char *script_class_name,
@@ -940,7 +939,7 @@ SBError SBThread::StepUsingScriptedThreadPlan(const char *script_class_name,
if (!exe_ctx.HasThreadScope()) {
error.SetErrorString("this SBThread object is invalid");
- return LLDB_RECORD_RESULT(error);
+ return error;
}
Thread *thread = exe_ctx.GetThreadPtr();
@@ -952,18 +951,18 @@ SBError SBThread::StepUsingScriptedThreadPlan(const char *script_class_name,
if (new_plan_status.Fail()) {
error.SetErrorString(new_plan_status.AsCString());
- return LLDB_RECORD_RESULT(error);
+ return error;
}
if (!resume_immediately)
- return LLDB_RECORD_RESULT(error);
+ return error;
if (new_plan_status.Success())
error = ResumeNewPlan(exe_ctx, new_plan_sp.get());
else
error.SetErrorString(new_plan_status.AsCString());
- return LLDB_RECORD_RESULT(error);
+ return error;
}
SBError SBThread::JumpToLine(lldb::SBFileSpec &file_spec, uint32_t line) {
@@ -977,14 +976,14 @@ SBError SBThread::JumpToLine(lldb::SBFileSpec &file_spec, uint32_t line) {
if (!exe_ctx.HasThreadScope()) {
sb_error.SetErrorString("this SBThread object is invalid");
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
Thread *thread = exe_ctx.GetThreadPtr();
Status err = thread->JumpToLine(file_spec.ref(), line, true);
sb_error.SetError(err);
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
SBError SBThread::ReturnFromFrame(SBFrame &frame, SBValue &return_value) {
@@ -1002,7 +1001,7 @@ SBError SBThread::ReturnFromFrame(SBFrame &frame, SBValue &return_value) {
thread->ReturnFromFrame(frame.GetFrameSP(), return_value.GetSP()));
}
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
SBError SBThread::UnwindInnermostExpression() {
@@ -1021,7 +1020,7 @@ SBError SBThread::UnwindInnermostExpression() {
thread->SetSelectedFrameByIndex(0, false);
}
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
bool SBThread::Suspend() {
@@ -1114,7 +1113,7 @@ SBProcess SBThread::GetProcess() {
sb_process.SetSP(exe_ctx.GetProcessSP());
}
- return LLDB_RECORD_RESULT(sb_process);
+ return sb_process;
}
uint32_t SBThread::GetNumFrames() {
@@ -1150,7 +1149,7 @@ SBFrame SBThread::GetFrameAtIndex(uint32_t idx) {
}
}
- return LLDB_RECORD_RESULT(sb_frame);
+ return sb_frame;
}
lldb::SBFrame SBThread::GetSelectedFrame() {
@@ -1169,7 +1168,7 @@ lldb::SBFrame SBThread::GetSelectedFrame() {
}
}
- return LLDB_RECORD_RESULT(sb_frame);
+ return sb_frame;
}
lldb::SBFrame SBThread::SetSelectedFrame(uint32_t idx) {
@@ -1193,7 +1192,7 @@ lldb::SBFrame SBThread::SetSelectedFrame(uint32_t idx) {
}
}
- return LLDB_RECORD_RESULT(sb_frame);
+ return sb_frame;
}
bool SBThread::EventIsThreadEvent(const SBEvent &event) {
@@ -1207,16 +1206,14 @@ SBFrame SBThread::GetStackFrameFromEvent(const SBEvent &event) {
LLDB_RECORD_STATIC_METHOD(lldb::SBFrame, SBThread, GetStackFrameFromEvent,
(const lldb::SBEvent &), event);
- return LLDB_RECORD_RESULT(
- Thread::ThreadEventData::GetStackFrameFromEvent(event.get()));
+ return Thread::ThreadEventData::GetStackFrameFromEvent(event.get());
}
SBThread SBThread::GetThreadFromEvent(const SBEvent &event) {
LLDB_RECORD_STATIC_METHOD(lldb::SBThread, SBThread, GetThreadFromEvent,
(const lldb::SBEvent &), event);
- return LLDB_RECORD_RESULT(
- Thread::ThreadEventData::GetThreadFromEvent(event.get()));
+ return Thread::ThreadEventData::GetThreadFromEvent(event.get());
}
bool SBThread::operator==(const SBThread &rhs) const {
@@ -1312,7 +1309,7 @@ SBThread SBThread::GetExtendedBacktraceThread(const char *type) {
}
}
- return LLDB_RECORD_RESULT(sb_origin_thread);
+ return sb_origin_thread;
}
uint32_t SBThread::GetExtendedBacktraceOriginatingIndexID() {
@@ -1330,9 +1327,9 @@ SBValue SBThread::GetCurrentException() {
ThreadSP thread_sp(m_opaque_sp->GetThreadSP());
if (!thread_sp)
- return LLDB_RECORD_RESULT(SBValue());
+ return SBValue();
- return LLDB_RECORD_RESULT(SBValue(thread_sp->GetCurrentException()));
+ return SBValue(thread_sp->GetCurrentException());
}
SBThread SBThread::GetCurrentExceptionBacktrace() {
@@ -1341,10 +1338,9 @@ SBThread SBThread::GetCurrentExceptionBacktrace() {
ThreadSP thread_sp(m_opaque_sp->GetThreadSP());
if (!thread_sp)
- return LLDB_RECORD_RESULT(SBThread());
+ return SBThread();
- return LLDB_RECORD_RESULT(
- SBThread(thread_sp->GetCurrentExceptionBacktrace()));
+ return SBThread(thread_sp->GetCurrentExceptionBacktrace());
}
bool SBThread::SafeToCallFunctions() {
diff --git a/lldb/source/API/SBThreadCollection.cpp b/lldb/source/API/SBThreadCollection.cpp
index 0850d01642f2..fcf066381c98 100644
--- a/lldb/source/API/SBThreadCollection.cpp
+++ b/lldb/source/API/SBThreadCollection.cpp
@@ -32,7 +32,7 @@ operator=(const SBThreadCollection &rhs) {
if (this != &rhs)
m_opaque_sp = rhs.m_opaque_sp;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBThreadCollection::SBThreadCollection(const ThreadCollectionSP &threads)
@@ -85,5 +85,5 @@ SBThread SBThreadCollection::GetThreadAtIndex(size_t idx) {
SBThread thread;
if (m_opaque_sp && idx < m_opaque_sp->GetSize())
thread = m_opaque_sp->GetThreadAtIndex(idx);
- return LLDB_RECORD_RESULT(thread);
+ return thread;
}
diff --git a/lldb/source/API/SBThreadPlan.cpp b/lldb/source/API/SBThreadPlan.cpp
index 64bfcdb434d9..26fcca5c2e23 100644
--- a/lldb/source/API/SBThreadPlan.cpp
+++ b/lldb/source/API/SBThreadPlan.cpp
@@ -93,7 +93,7 @@ const lldb::SBThreadPlan &SBThreadPlan::operator=(const SBThreadPlan &rhs) {
if (this != &rhs)
m_opaque_wp = rhs.m_opaque_wp;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
// Destructor
SBThreadPlan::~SBThreadPlan() = default;
@@ -138,10 +138,9 @@ SBThread SBThreadPlan::GetThread() const {
ThreadPlanSP thread_plan_sp(GetSP());
if (thread_plan_sp) {
- return LLDB_RECORD_RESULT(
- SBThread(thread_plan_sp->GetThread().shared_from_this()));
+ return SBThread(thread_plan_sp->GetThread().shared_from_this());
} else
- return LLDB_RECORD_RESULT(SBThread());
+ return SBThread();
}
bool SBThreadPlan::GetDescription(lldb::SBStream &description) const {
@@ -227,8 +226,7 @@ SBThreadPlan::QueueThreadPlanForStepOverRange(SBAddress &sb_start_address,
(lldb::SBAddress &, lldb::addr_t), sb_start_address, size);
SBError error;
- return LLDB_RECORD_RESULT(
- QueueThreadPlanForStepOverRange(sb_start_address, size, error));
+ return QueueThreadPlanForStepOverRange(sb_start_address, size, error);
}
SBThreadPlan SBThreadPlan::QueueThreadPlanForStepOverRange(
@@ -242,7 +240,7 @@ SBThreadPlan SBThreadPlan::QueueThreadPlanForStepOverRange(
if (thread_plan_sp) {
Address *start_address = sb_start_address.get();
if (!start_address) {
- return LLDB_RECORD_RESULT(SBThreadPlan());
+ return SBThreadPlan();
}
AddressRange range(*start_address, size);
@@ -259,9 +257,9 @@ SBThreadPlan SBThreadPlan::QueueThreadPlanForStepOverRange(
else
plan.GetSP()->SetPrivate(true);
- return LLDB_RECORD_RESULT(plan);
+ return plan;
}
- return LLDB_RECORD_RESULT(SBThreadPlan());
+ return SBThreadPlan();
}
SBThreadPlan
@@ -272,8 +270,7 @@ SBThreadPlan::QueueThreadPlanForStepInRange(SBAddress &sb_start_address,
(lldb::SBAddress &, lldb::addr_t), sb_start_address, size);
SBError error;
- return LLDB_RECORD_RESULT(
- QueueThreadPlanForStepInRange(sb_start_address, size, error));
+ return QueueThreadPlanForStepInRange(sb_start_address, size, error);
}
SBThreadPlan
@@ -288,7 +285,7 @@ SBThreadPlan::QueueThreadPlanForStepInRange(SBAddress &sb_start_address,
if (thread_plan_sp) {
Address *start_address = sb_start_address.get();
if (!start_address) {
- return LLDB_RECORD_RESULT(SBThreadPlan());
+ return SBThreadPlan();
}
AddressRange range(*start_address, size);
@@ -305,9 +302,9 @@ SBThreadPlan::QueueThreadPlanForStepInRange(SBAddress &sb_start_address,
else
plan.GetSP()->SetPrivate(true);
- return LLDB_RECORD_RESULT(plan);
+ return plan;
}
- return LLDB_RECORD_RESULT(SBThreadPlan());
+ return SBThreadPlan();
}
SBThreadPlan
@@ -318,8 +315,7 @@ SBThreadPlan::QueueThreadPlanForStepOut(uint32_t frame_idx_to_step_to,
frame_idx_to_step_to, first_insn);
SBError error;
- return LLDB_RECORD_RESULT(
- QueueThreadPlanForStepOut(frame_idx_to_step_to, first_insn, error));
+ return QueueThreadPlanForStepOut(frame_idx_to_step_to, first_insn, error);
}
SBThreadPlan
@@ -347,9 +343,9 @@ SBThreadPlan::QueueThreadPlanForStepOut(uint32_t frame_idx_to_step_to,
else
plan.GetSP()->SetPrivate(true);
- return LLDB_RECORD_RESULT(plan);
+ return plan;
}
- return LLDB_RECORD_RESULT(SBThreadPlan());
+ return SBThreadPlan();
}
SBThreadPlan
@@ -359,7 +355,7 @@ SBThreadPlan::QueueThreadPlanForRunToAddress(SBAddress sb_address) {
sb_address);
SBError error;
- return LLDB_RECORD_RESULT(QueueThreadPlanForRunToAddress(sb_address, error));
+ return QueueThreadPlanForRunToAddress(sb_address, error);
}
SBThreadPlan SBThreadPlan::QueueThreadPlanForRunToAddress(SBAddress sb_address,
@@ -372,7 +368,7 @@ SBThreadPlan SBThreadPlan::QueueThreadPlanForRunToAddress(SBAddress sb_address,
if (thread_plan_sp) {
Address *address = sb_address.get();
if (!address)
- return LLDB_RECORD_RESULT(SBThreadPlan());
+ return SBThreadPlan();
Status plan_status;
SBThreadPlan plan =
@@ -384,9 +380,9 @@ SBThreadPlan SBThreadPlan::QueueThreadPlanForRunToAddress(SBAddress sb_address,
else
plan.GetSP()->SetPrivate(true);
- return LLDB_RECORD_RESULT(plan);
+ return plan;
}
- return LLDB_RECORD_RESULT(SBThreadPlan());
+ return SBThreadPlan();
}
SBThreadPlan
@@ -396,8 +392,7 @@ SBThreadPlan::QueueThreadPlanForStepScripted(const char *script_class_name) {
script_class_name);
SBError error;
- return LLDB_RECORD_RESULT(
- QueueThreadPlanForStepScripted(script_class_name, error));
+ return QueueThreadPlanForStepScripted(script_class_name, error);
}
SBThreadPlan
@@ -420,9 +415,9 @@ SBThreadPlan::QueueThreadPlanForStepScripted(const char *script_class_name,
else
plan.GetSP()->SetPrivate(true);
- return LLDB_RECORD_RESULT(plan);
+ return plan;
}
- return LLDB_RECORD_RESULT(SBThreadPlan());
+ return SBThreadPlan();
}
SBThreadPlan
@@ -447,8 +442,8 @@ SBThreadPlan::QueueThreadPlanForStepScripted(const char *script_class_name,
else
plan.GetSP()->SetPrivate(true);
- return LLDB_RECORD_RESULT(plan);
+ return plan;
} else {
- return LLDB_RECORD_RESULT(SBThreadPlan());
+ return SBThreadPlan();
}
}
diff --git a/lldb/source/API/SBTrace.cpp b/lldb/source/API/SBTrace.cpp
index 4daeab40f0a0..4e13e774e366 100644
--- a/lldb/source/API/SBTrace.cpp
+++ b/lldb/source/API/SBTrace.cpp
@@ -28,8 +28,7 @@ SBTrace::SBTrace(const lldb::TraceSP &trace_sp) : m_opaque_sp(trace_sp) {
const char *SBTrace::GetStartConfigurationHelp() {
LLDB_RECORD_METHOD_NO_ARGS(const char *, SBTrace, GetStartConfigurationHelp);
- return LLDB_RECORD_RESULT(
- m_opaque_sp ? m_opaque_sp->GetStartConfigurationHelp() : nullptr);
+ return m_opaque_sp ? m_opaque_sp->GetStartConfigurationHelp() : nullptr;
}
SBError SBTrace::Start(const SBStructuredData &configuration) {
@@ -41,7 +40,7 @@ SBError SBTrace::Start(const SBStructuredData &configuration) {
else if (llvm::Error err =
m_opaque_sp->Start(configuration.m_impl_up->GetObjectSP()))
error.SetErrorString(llvm::toString(std::move(err)).c_str());
- return LLDB_RECORD_RESULT(error);
+ return error;
}
SBError SBTrace::Start(const SBThread &thread,
@@ -60,7 +59,7 @@ SBError SBTrace::Start(const SBThread &thread,
error.SetErrorString(llvm::toString(std::move(err)).c_str());
}
- return LLDB_RECORD_RESULT(error);
+ return error;
}
SBError SBTrace::Stop() {
@@ -70,7 +69,7 @@ SBError SBTrace::Stop() {
error.SetErrorString("error: invalid trace");
else if (llvm::Error err = m_opaque_sp->Stop())
error.SetErrorString(llvm::toString(std::move(err)).c_str());
- return LLDB_RECORD_RESULT(error);
+ return error;
}
SBError SBTrace::Stop(const SBThread &thread) {
@@ -80,7 +79,7 @@ SBError SBTrace::Stop(const SBThread &thread) {
error.SetErrorString("error: invalid trace");
else if (llvm::Error err = m_opaque_sp->Stop({thread.GetThreadID()}))
error.SetErrorString(llvm::toString(std::move(err)).c_str());
- return LLDB_RECORD_RESULT(error);
+ return error;
}
bool SBTrace::IsValid() {
diff --git a/lldb/source/API/SBType.cpp b/lldb/source/API/SBType.cpp
index f3789fafc872..bd759c8f6bf9 100644
--- a/lldb/source/API/SBType.cpp
+++ b/lldb/source/API/SBType.cpp
@@ -87,7 +87,7 @@ SBType &SBType::operator=(const SBType &rhs) {
if (this != &rhs) {
m_opaque_sp = rhs.m_opaque_sp;
}
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBType::~SBType() = default;
@@ -166,64 +166,59 @@ SBType SBType::GetPointerType() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBType, GetPointerType);
if (!IsValid())
- return LLDB_RECORD_RESULT(SBType());
+ return SBType();
- return LLDB_RECORD_RESULT(
- SBType(TypeImplSP(new TypeImpl(m_opaque_sp->GetPointerType()))));
+ return SBType(TypeImplSP(new TypeImpl(m_opaque_sp->GetPointerType())));
}
SBType SBType::GetPointeeType() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBType, GetPointeeType);
if (!IsValid())
- return LLDB_RECORD_RESULT(SBType());
- return LLDB_RECORD_RESULT(
- SBType(TypeImplSP(new TypeImpl(m_opaque_sp->GetPointeeType()))));
+ return SBType();
+ return SBType(TypeImplSP(new TypeImpl(m_opaque_sp->GetPointeeType())));
}
SBType SBType::GetReferenceType() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBType, GetReferenceType);
if (!IsValid())
- return LLDB_RECORD_RESULT(SBType());
- return LLDB_RECORD_RESULT(
- SBType(TypeImplSP(new TypeImpl(m_opaque_sp->GetReferenceType()))));
+ return SBType();
+ return SBType(TypeImplSP(new TypeImpl(m_opaque_sp->GetReferenceType())));
}
SBType SBType::GetTypedefedType() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBType, GetTypedefedType);
if (!IsValid())
- return LLDB_RECORD_RESULT(SBType());
- return LLDB_RECORD_RESULT(
- SBType(TypeImplSP(new TypeImpl(m_opaque_sp->GetTypedefedType()))));
+ return SBType();
+ return SBType(TypeImplSP(new TypeImpl(m_opaque_sp->GetTypedefedType())));
}
SBType SBType::GetDereferencedType() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBType, GetDereferencedType);
if (!IsValid())
- return LLDB_RECORD_RESULT(SBType());
- return LLDB_RECORD_RESULT(
- SBType(TypeImplSP(new TypeImpl(m_opaque_sp->GetDereferencedType()))));
+ return SBType();
+ return SBType(TypeImplSP(new TypeImpl(m_opaque_sp->GetDereferencedType())));
}
SBType SBType::GetArrayElementType() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBType, GetArrayElementType);
if (!IsValid())
- return LLDB_RECORD_RESULT(SBType());
- return LLDB_RECORD_RESULT(SBType(TypeImplSP(new TypeImpl(
- m_opaque_sp->GetCompilerType(true).GetArrayElementType(nullptr)))));
+ return SBType();
+ return SBType(TypeImplSP(new TypeImpl(
+ m_opaque_sp->GetCompilerType(true).GetArrayElementType(nullptr))));
}
SBType SBType::GetArrayType(uint64_t size) {
LLDB_RECORD_METHOD(lldb::SBType, SBType, GetArrayType, (uint64_t), size);
if (!IsValid())
- return LLDB_RECORD_RESULT(SBType());
- return LLDB_RECORD_RESULT(SBType(TypeImplSP(
- new TypeImpl(m_opaque_sp->GetCompilerType(true).GetArrayType(size)))));
+ return SBType();
+ return SBType(TypeImplSP(
+ new TypeImpl(m_opaque_sp->GetCompilerType(true).GetArrayType(size))));
}
SBType SBType::GetVectorElementType() {
@@ -236,7 +231,7 @@ SBType SBType::GetVectorElementType() {
nullptr))
type_sb.SetSP(TypeImplSP(new TypeImpl(vector_element_type)));
}
- return LLDB_RECORD_RESULT(type_sb);
+ return type_sb;
}
bool SBType::IsFunctionType() {
@@ -286,9 +281,9 @@ lldb::SBType SBType::GetFunctionReturnType() {
CompilerType return_type(
m_opaque_sp->GetCompilerType(true).GetFunctionReturnType());
if (return_type.IsValid())
- return LLDB_RECORD_RESULT(SBType(return_type));
+ return SBType(return_type);
}
- return LLDB_RECORD_RESULT(lldb::SBType());
+ return lldb::SBType();
}
lldb::SBTypeList SBType::GetFunctionArgumentTypes() {
@@ -303,7 +298,7 @@ lldb::SBTypeList SBType::GetFunctionArgumentTypes() {
sb_type_list.Append(SBType(func_type.GetFunctionArgumentAtIndex(i)));
}
}
- return LLDB_RECORD_RESULT(sb_type_list);
+ return sb_type_list;
}
uint32_t SBType::GetNumberOfMemberFunctions() {
@@ -323,35 +318,33 @@ lldb::SBTypeMemberFunction SBType::GetMemberFunctionAtIndex(uint32_t idx) {
if (IsValid())
sb_func_type.reset(new TypeMemberFunctionImpl(
m_opaque_sp->GetCompilerType(true).GetMemberFunctionAtIndex(idx)));
- return LLDB_RECORD_RESULT(sb_func_type);
+ return sb_func_type;
}
lldb::SBType SBType::GetUnqualifiedType() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBType, GetUnqualifiedType);
if (!IsValid())
- return LLDB_RECORD_RESULT(SBType());
- return LLDB_RECORD_RESULT(
- SBType(TypeImplSP(new TypeImpl(m_opaque_sp->GetUnqualifiedType()))));
+ return SBType();
+ return SBType(TypeImplSP(new TypeImpl(m_opaque_sp->GetUnqualifiedType())));
}
lldb::SBType SBType::GetCanonicalType() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBType, GetCanonicalType);
if (IsValid())
- return LLDB_RECORD_RESULT(
- SBType(TypeImplSP(new TypeImpl(m_opaque_sp->GetCanonicalType()))));
- return LLDB_RECORD_RESULT(SBType());
+ return SBType(TypeImplSP(new TypeImpl(m_opaque_sp->GetCanonicalType())));
+ return SBType();
}
SBType SBType::GetEnumerationIntegerType() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBType, GetEnumerationIntegerType);
if (IsValid()) {
- return LLDB_RECORD_RESULT(
- SBType(m_opaque_sp->GetCompilerType(true).GetEnumerationIntegerType()));
+ return SBType(
+ m_opaque_sp->GetCompilerType(true).GetEnumerationIntegerType());
}
- return LLDB_RECORD_RESULT(SBType());
+ return SBType();
}
lldb::BasicType SBType::GetBasicType() {
@@ -367,9 +360,9 @@ SBType SBType::GetBasicType(lldb::BasicType basic_type) {
basic_type);
if (IsValid() && m_opaque_sp->IsValid())
- return LLDB_RECORD_RESULT(SBType(
- m_opaque_sp->GetTypeSystem(false)->GetBasicTypeFromAST(basic_type)));
- return LLDB_RECORD_RESULT(SBType());
+ return SBType(
+ m_opaque_sp->GetTypeSystem(false)->GetBasicTypeFromAST(basic_type));
+ return SBType();
}
uint32_t SBType::GetNumberOfDirectBaseClasses() {
@@ -426,7 +419,7 @@ SBTypeMember SBType::GetDirectBaseClassAtIndex(uint32_t idx) {
sb_type_member.reset(new TypeMemberImpl(
TypeImplSP(new TypeImpl(base_class_type)), bit_offset));
}
- return LLDB_RECORD_RESULT(sb_type_member);
+ return sb_type_member;
}
SBTypeMember SBType::GetVirtualBaseClassAtIndex(uint32_t idx) {
@@ -443,7 +436,7 @@ SBTypeMember SBType::GetVirtualBaseClassAtIndex(uint32_t idx) {
sb_type_member.reset(new TypeMemberImpl(
TypeImplSP(new TypeImpl(base_class_type)), bit_offset));
}
- return LLDB_RECORD_RESULT(sb_type_member);
+ return sb_type_member;
}
SBTypeEnumMemberList SBType::GetEnumMembers() {
@@ -466,7 +459,7 @@ SBTypeEnumMemberList SBType::GetEnumMembers() {
});
}
}
- return LLDB_RECORD_RESULT(sb_enum_member_list);
+ return sb_enum_member_list;
}
SBTypeMember SBType::GetFieldAtIndex(uint32_t idx) {
@@ -493,7 +486,7 @@ SBTypeMember SBType::GetFieldAtIndex(uint32_t idx) {
}
}
}
- return LLDB_RECORD_RESULT(sb_type_member);
+ return sb_type_member;
}
bool SBType::IsTypeComplete() {
@@ -517,10 +510,10 @@ lldb::SBModule SBType::GetModule() {
lldb::SBModule sb_module;
if (!IsValid())
- return LLDB_RECORD_RESULT(sb_module);
+ return sb_module;
sb_module.SetSP(m_opaque_sp->GetModule());
- return LLDB_RECORD_RESULT(sb_module);
+ return sb_module;
}
const char *SBType::GetName() {
@@ -560,7 +553,7 @@ lldb::SBType SBType::GetTemplateArgumentType(uint32_t idx) {
idx);
if (!IsValid())
- return LLDB_RECORD_RESULT(SBType());
+ return SBType();
CompilerType type;
switch(GetTemplateArgumentKind(idx)) {
@@ -576,8 +569,8 @@ lldb::SBType SBType::GetTemplateArgumentType(uint32_t idx) {
break;
}
if (type.IsValid())
- return LLDB_RECORD_RESULT(SBType(type));
- return LLDB_RECORD_RESULT(SBType());
+ return SBType(type);
+ return SBType();
}
lldb::TemplateArgumentKind SBType::GetTemplateArgumentKind(uint32_t idx) {
@@ -622,7 +615,7 @@ SBTypeList &SBTypeList::operator=(const SBTypeList &rhs) {
i < rhs_size; i++)
Append(const_cast<SBTypeList &>(rhs).GetTypeAtIndex(i));
}
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
void SBTypeList::Append(SBType type) {
@@ -637,8 +630,8 @@ SBType SBTypeList::GetTypeAtIndex(uint32_t index) {
index);
if (m_opaque_up)
- return LLDB_RECORD_RESULT(SBType(m_opaque_up->GetTypeAtIndex(index)));
- return LLDB_RECORD_RESULT(SBType());
+ return SBType(m_opaque_up->GetTypeAtIndex(index));
+ return SBType();
}
uint32_t SBTypeList::GetSize() {
@@ -670,7 +663,7 @@ lldb::SBTypeMember &SBTypeMember::operator=(const lldb::SBTypeMember &rhs) {
if (rhs.IsValid())
m_opaque_up = std::make_unique<TypeMemberImpl>(rhs.ref());
}
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
bool SBTypeMember::IsValid() const {
@@ -698,7 +691,7 @@ SBType SBTypeMember::GetType() {
if (m_opaque_up) {
sb_type.SetSP(m_opaque_up->GetTypeImpl());
}
- return LLDB_RECORD_RESULT(sb_type);
+ return sb_type;
}
uint64_t SBTypeMember::GetOffsetInBytes() {
@@ -799,7 +792,7 @@ operator=(const lldb::SBTypeMemberFunction &rhs) {
if (this != &rhs)
m_opaque_sp = rhs.m_opaque_sp;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
bool SBTypeMemberFunction::IsValid() const {
@@ -850,7 +843,7 @@ SBType SBTypeMemberFunction::GetType() {
if (m_opaque_sp) {
sb_type.SetSP(lldb::TypeImplSP(new TypeImpl(m_opaque_sp->GetType())));
}
- return LLDB_RECORD_RESULT(sb_type);
+ return sb_type;
}
lldb::SBType SBTypeMemberFunction::GetReturnType() {
@@ -860,7 +853,7 @@ lldb::SBType SBTypeMemberFunction::GetReturnType() {
if (m_opaque_sp) {
sb_type.SetSP(lldb::TypeImplSP(new TypeImpl(m_opaque_sp->GetReturnType())));
}
- return LLDB_RECORD_RESULT(sb_type);
+ return sb_type;
}
uint32_t SBTypeMemberFunction::GetNumberOfArguments() {
@@ -881,7 +874,7 @@ lldb::SBType SBTypeMemberFunction::GetArgumentTypeAtIndex(uint32_t i) {
sb_type.SetSP(
lldb::TypeImplSP(new TypeImpl(m_opaque_sp->GetArgumentAtIndex(i))));
}
- return LLDB_RECORD_RESULT(sb_type);
+ return sb_type;
}
lldb::MemberFunctionKind SBTypeMemberFunction::GetKind() {
diff --git a/lldb/source/API/SBTypeCategory.cpp b/lldb/source/API/SBTypeCategory.cpp
index e6461d47c633..17aca3267e67 100644
--- a/lldb/source/API/SBTypeCategory.cpp
+++ b/lldb/source/API/SBTypeCategory.cpp
@@ -146,9 +146,9 @@ SBTypeCategory::GetTypeNameSpecifierForFilterAtIndex(uint32_t index) {
GetTypeNameSpecifierForFilterAtIndex, (uint32_t), index);
if (!IsValid())
- return LLDB_RECORD_RESULT(SBTypeNameSpecifier());
- return LLDB_RECORD_RESULT(SBTypeNameSpecifier(
- m_opaque_sp->GetTypeNameSpecifierForFilterAtIndex(index)));
+ return SBTypeNameSpecifier();
+ return SBTypeNameSpecifier(
+ m_opaque_sp->GetTypeNameSpecifierForFilterAtIndex(index));
}
lldb::SBTypeNameSpecifier
@@ -157,9 +157,9 @@ SBTypeCategory::GetTypeNameSpecifierForFormatAtIndex(uint32_t index) {
GetTypeNameSpecifierForFormatAtIndex, (uint32_t), index);
if (!IsValid())
- return LLDB_RECORD_RESULT(SBTypeNameSpecifier());
- return LLDB_RECORD_RESULT(SBTypeNameSpecifier(
- m_opaque_sp->GetTypeNameSpecifierForFormatAtIndex(index)));
+ return SBTypeNameSpecifier();
+ return SBTypeNameSpecifier(
+ m_opaque_sp->GetTypeNameSpecifierForFormatAtIndex(index));
}
lldb::SBTypeNameSpecifier
@@ -168,9 +168,9 @@ SBTypeCategory::GetTypeNameSpecifierForSummaryAtIndex(uint32_t index) {
GetTypeNameSpecifierForSummaryAtIndex, (uint32_t), index);
if (!IsValid())
- return LLDB_RECORD_RESULT(SBTypeNameSpecifier());
- return LLDB_RECORD_RESULT(SBTypeNameSpecifier(
- m_opaque_sp->GetTypeNameSpecifierForSummaryAtIndex(index)));
+ return SBTypeNameSpecifier();
+ return SBTypeNameSpecifier(
+ m_opaque_sp->GetTypeNameSpecifierForSummaryAtIndex(index));
}
lldb::SBTypeNameSpecifier
@@ -180,9 +180,9 @@ SBTypeCategory::GetTypeNameSpecifierForSyntheticAtIndex(uint32_t index) {
index);
if (!IsValid())
- return LLDB_RECORD_RESULT(SBTypeNameSpecifier());
- return LLDB_RECORD_RESULT(SBTypeNameSpecifier(
- m_opaque_sp->GetTypeNameSpecifierForSyntheticAtIndex(index)));
+ return SBTypeNameSpecifier();
+ return SBTypeNameSpecifier(
+ m_opaque_sp->GetTypeNameSpecifierForSyntheticAtIndex(index));
}
SBTypeFilter SBTypeCategory::GetFilterForType(SBTypeNameSpecifier spec) {
@@ -190,10 +190,10 @@ SBTypeFilter SBTypeCategory::GetFilterForType(SBTypeNameSpecifier spec) {
(lldb::SBTypeNameSpecifier), spec);
if (!IsValid())
- return LLDB_RECORD_RESULT(SBTypeFilter());
+ return SBTypeFilter();
if (!spec.IsValid())
- return LLDB_RECORD_RESULT(SBTypeFilter());
+ return SBTypeFilter();
lldb::TypeFilterImplSP children_sp;
@@ -205,22 +205,22 @@ SBTypeFilter SBTypeCategory::GetFilterForType(SBTypeNameSpecifier spec) {
ConstString(spec.GetName()), children_sp);
if (!children_sp)
- return LLDB_RECORD_RESULT(lldb::SBTypeFilter());
+ return lldb::SBTypeFilter();
TypeFilterImplSP filter_sp =
std::static_pointer_cast<TypeFilterImpl>(children_sp);
- return LLDB_RECORD_RESULT(lldb::SBTypeFilter(filter_sp));
+ return lldb::SBTypeFilter(filter_sp);
}
SBTypeFormat SBTypeCategory::GetFormatForType(SBTypeNameSpecifier spec) {
LLDB_RECORD_METHOD(lldb::SBTypeFormat, SBTypeCategory, GetFormatForType,
(lldb::SBTypeNameSpecifier), spec);
if (!IsValid())
- return LLDB_RECORD_RESULT(SBTypeFormat());
+ return SBTypeFormat();
if (!spec.IsValid())
- return LLDB_RECORD_RESULT(SBTypeFormat());
+ return SBTypeFormat();
lldb::TypeFormatImplSP format_sp;
@@ -232,9 +232,9 @@ SBTypeFormat SBTypeCategory::GetFormatForType(SBTypeNameSpecifier spec) {
ConstString(spec.GetName()), format_sp);
if (!format_sp)
- return LLDB_RECORD_RESULT(lldb::SBTypeFormat());
+ return lldb::SBTypeFormat();
- return LLDB_RECORD_RESULT(lldb::SBTypeFormat(format_sp));
+ return lldb::SBTypeFormat(format_sp);
}
SBTypeSummary SBTypeCategory::GetSummaryForType(SBTypeNameSpecifier spec) {
@@ -242,10 +242,10 @@ SBTypeSummary SBTypeCategory::GetSummaryForType(SBTypeNameSpecifier spec) {
(lldb::SBTypeNameSpecifier), spec);
if (!IsValid())
- return LLDB_RECORD_RESULT(SBTypeSummary());
+ return SBTypeSummary();
if (!spec.IsValid())
- return LLDB_RECORD_RESULT(SBTypeSummary());
+ return SBTypeSummary();
lldb::TypeSummaryImplSP summary_sp;
@@ -257,9 +257,9 @@ SBTypeSummary SBTypeCategory::GetSummaryForType(SBTypeNameSpecifier spec) {
ConstString(spec.GetName()), summary_sp);
if (!summary_sp)
- return LLDB_RECORD_RESULT(lldb::SBTypeSummary());
+ return lldb::SBTypeSummary();
- return LLDB_RECORD_RESULT(lldb::SBTypeSummary(summary_sp));
+ return lldb::SBTypeSummary(summary_sp);
}
SBTypeSynthetic SBTypeCategory::GetSyntheticForType(SBTypeNameSpecifier spec) {
@@ -267,10 +267,10 @@ SBTypeSynthetic SBTypeCategory::GetSyntheticForType(SBTypeNameSpecifier spec) {
(lldb::SBTypeNameSpecifier), spec);
if (!IsValid())
- return LLDB_RECORD_RESULT(SBTypeSynthetic());
+ return SBTypeSynthetic();
if (!spec.IsValid())
- return LLDB_RECORD_RESULT(SBTypeSynthetic());
+ return SBTypeSynthetic();
lldb::SyntheticChildrenSP children_sp;
@@ -282,12 +282,12 @@ SBTypeSynthetic SBTypeCategory::GetSyntheticForType(SBTypeNameSpecifier spec) {
ConstString(spec.GetName()), children_sp);
if (!children_sp)
- return LLDB_RECORD_RESULT(lldb::SBTypeSynthetic());
+ return lldb::SBTypeSynthetic();
ScriptedSyntheticChildrenSP synth_sp =
std::static_pointer_cast<ScriptedSyntheticChildren>(children_sp);
- return LLDB_RECORD_RESULT(lldb::SBTypeSynthetic(synth_sp));
+ return lldb::SBTypeSynthetic(synth_sp);
}
SBTypeFilter SBTypeCategory::GetFilterAtIndex(uint32_t index) {
@@ -295,17 +295,17 @@ SBTypeFilter SBTypeCategory::GetFilterAtIndex(uint32_t index) {
(uint32_t), index);
if (!IsValid())
- return LLDB_RECORD_RESULT(SBTypeFilter());
+ return SBTypeFilter();
lldb::SyntheticChildrenSP children_sp =
m_opaque_sp->GetSyntheticAtIndex((index));
if (!children_sp.get())
- return LLDB_RECORD_RESULT(lldb::SBTypeFilter());
+ return lldb::SBTypeFilter();
TypeFilterImplSP filter_sp =
std::static_pointer_cast<TypeFilterImpl>(children_sp);
- return LLDB_RECORD_RESULT(lldb::SBTypeFilter(filter_sp));
+ return lldb::SBTypeFilter(filter_sp);
}
SBTypeFormat SBTypeCategory::GetFormatAtIndex(uint32_t index) {
@@ -313,9 +313,8 @@ SBTypeFormat SBTypeCategory::GetFormatAtIndex(uint32_t index) {
(uint32_t), index);
if (!IsValid())
- return LLDB_RECORD_RESULT(SBTypeFormat());
- return LLDB_RECORD_RESULT(
- SBTypeFormat(m_opaque_sp->GetFormatAtIndex((index))));
+ return SBTypeFormat();
+ return SBTypeFormat(m_opaque_sp->GetFormatAtIndex((index)));
}
SBTypeSummary SBTypeCategory::GetSummaryAtIndex(uint32_t index) {
@@ -323,9 +322,8 @@ SBTypeSummary SBTypeCategory::GetSummaryAtIndex(uint32_t index) {
(uint32_t), index);
if (!IsValid())
- return LLDB_RECORD_RESULT(SBTypeSummary());
- return LLDB_RECORD_RESULT(
- SBTypeSummary(m_opaque_sp->GetSummaryAtIndex((index))));
+ return SBTypeSummary();
+ return SBTypeSummary(m_opaque_sp->GetSummaryAtIndex((index)));
}
SBTypeSynthetic SBTypeCategory::GetSyntheticAtIndex(uint32_t index) {
@@ -333,17 +331,17 @@ SBTypeSynthetic SBTypeCategory::GetSyntheticAtIndex(uint32_t index) {
(uint32_t), index);
if (!IsValid())
- return LLDB_RECORD_RESULT(SBTypeSynthetic());
+ return SBTypeSynthetic();
lldb::SyntheticChildrenSP children_sp =
m_opaque_sp->GetSyntheticAtIndex((index));
if (!children_sp.get())
- return LLDB_RECORD_RESULT(lldb::SBTypeSynthetic());
+ return lldb::SBTypeSynthetic();
ScriptedSyntheticChildrenSP synth_sp =
std::static_pointer_cast<ScriptedSyntheticChildren>(children_sp);
- return LLDB_RECORD_RESULT(lldb::SBTypeSynthetic(synth_sp));
+ return lldb::SBTypeSynthetic(synth_sp);
}
bool SBTypeCategory::AddTypeFormat(SBTypeNameSpecifier type_name,
@@ -607,7 +605,7 @@ operator=(const lldb::SBTypeCategory &rhs) {
if (this != &rhs) {
m_opaque_sp = rhs.m_opaque_sp;
}
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
bool SBTypeCategory::operator==(lldb::SBTypeCategory &rhs) {
diff --git a/lldb/source/API/SBTypeEnumMember.cpp b/lldb/source/API/SBTypeEnumMember.cpp
index e04f51f39a91..d5fc382a35e8 100644
--- a/lldb/source/API/SBTypeEnumMember.cpp
+++ b/lldb/source/API/SBTypeEnumMember.cpp
@@ -45,7 +45,7 @@ SBTypeEnumMember &SBTypeEnumMember::operator=(const SBTypeEnumMember &rhs) {
if (this != &rhs)
m_opaque_sp = clone(rhs.m_opaque_sp);
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
bool SBTypeEnumMember::IsValid() const {
@@ -89,7 +89,7 @@ SBType SBTypeEnumMember::GetType() {
if (m_opaque_sp.get()) {
sb_type.SetSP(m_opaque_sp->GetIntegerType());
}
- return LLDB_RECORD_RESULT(sb_type);
+ return sb_type;
}
void SBTypeEnumMember::reset(TypeEnumMemberImpl *type_member_impl) {
@@ -147,7 +147,7 @@ operator=(const SBTypeEnumMemberList &rhs) {
Append(
const_cast<SBTypeEnumMemberList &>(rhs).GetTypeEnumMemberAtIndex(i));
}
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
void SBTypeEnumMemberList::Append(SBTypeEnumMember enum_member) {
@@ -164,9 +164,8 @@ SBTypeEnumMemberList::GetTypeEnumMemberAtIndex(uint32_t index) {
GetTypeEnumMemberAtIndex, (uint32_t), index);
if (m_opaque_up)
- return LLDB_RECORD_RESULT(
- SBTypeEnumMember(m_opaque_up->GetTypeEnumMemberAtIndex(index)));
- return LLDB_RECORD_RESULT(SBTypeEnumMember());
+ return SBTypeEnumMember(m_opaque_up->GetTypeEnumMemberAtIndex(index));
+ return SBTypeEnumMember();
}
uint32_t SBTypeEnumMemberList::GetSize() {
diff --git a/lldb/source/API/SBTypeFilter.cpp b/lldb/source/API/SBTypeFilter.cpp
index 389da2b2278c..a36d93854098 100644
--- a/lldb/source/API/SBTypeFilter.cpp
+++ b/lldb/source/API/SBTypeFilter.cpp
@@ -123,7 +123,7 @@ lldb::SBTypeFilter &SBTypeFilter::operator=(const lldb::SBTypeFilter &rhs) {
if (this != &rhs) {
m_opaque_sp = rhs.m_opaque_sp;
}
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
bool SBTypeFilter::operator==(lldb::SBTypeFilter &rhs) {
diff --git a/lldb/source/API/SBTypeFormat.cpp b/lldb/source/API/SBTypeFormat.cpp
index 4cc1daf201d0..139bbebaa3f4 100644
--- a/lldb/source/API/SBTypeFormat.cpp
+++ b/lldb/source/API/SBTypeFormat.cpp
@@ -118,7 +118,7 @@ lldb::SBTypeFormat &SBTypeFormat::operator=(const lldb::SBTypeFormat &rhs) {
if (this != &rhs) {
m_opaque_sp = rhs.m_opaque_sp;
}
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
bool SBTypeFormat::operator==(lldb::SBTypeFormat &rhs) {
diff --git a/lldb/source/API/SBTypeNameSpecifier.cpp b/lldb/source/API/SBTypeNameSpecifier.cpp
index 3cb586c0641a..3b9dd8300c87 100644
--- a/lldb/source/API/SBTypeNameSpecifier.cpp
+++ b/lldb/source/API/SBTypeNameSpecifier.cpp
@@ -69,11 +69,11 @@ SBType SBTypeNameSpecifier::GetType() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBTypeNameSpecifier, GetType);
if (!IsValid())
- return LLDB_RECORD_RESULT(SBType());
+ return SBType();
lldb_private::CompilerType c_type = m_opaque_sp->GetCompilerType();
if (c_type.IsValid())
- return LLDB_RECORD_RESULT(SBType(c_type));
- return LLDB_RECORD_RESULT(SBType());
+ return SBType(c_type);
+ return SBType();
}
bool SBTypeNameSpecifier::IsRegex() {
@@ -107,7 +107,7 @@ operator=(const lldb::SBTypeNameSpecifier &rhs) {
if (this != &rhs) {
m_opaque_sp = rhs.m_opaque_sp;
}
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
bool SBTypeNameSpecifier::operator==(lldb::SBTypeNameSpecifier &rhs) {
diff --git a/lldb/source/API/SBTypeSummary.cpp b/lldb/source/API/SBTypeSummary.cpp
index 72ae8438b0e4..8fbb47302f68 100644
--- a/lldb/source/API/SBTypeSummary.cpp
+++ b/lldb/source/API/SBTypeSummary.cpp
@@ -118,10 +118,10 @@ SBTypeSummary SBTypeSummary::CreateWithSummaryString(const char *data,
data, options);
if (!data || data[0] == 0)
- return LLDB_RECORD_RESULT(SBTypeSummary());
+ return SBTypeSummary();
- return LLDB_RECORD_RESULT(
- SBTypeSummary(TypeSummaryImplSP(new StringSummaryFormat(options, data))));
+ return SBTypeSummary(
+ TypeSummaryImplSP(new StringSummaryFormat(options, data)));
}
SBTypeSummary SBTypeSummary::CreateWithFunctionName(const char *data,
@@ -131,10 +131,10 @@ SBTypeSummary SBTypeSummary::CreateWithFunctionName(const char *data,
data, options);
if (!data || data[0] == 0)
- return LLDB_RECORD_RESULT(SBTypeSummary());
+ return SBTypeSummary();
- return LLDB_RECORD_RESULT(
- SBTypeSummary(TypeSummaryImplSP(new ScriptSummaryFormat(options, data))));
+ return SBTypeSummary(
+ TypeSummaryImplSP(new ScriptSummaryFormat(options, data)));
}
SBTypeSummary SBTypeSummary::CreateWithScriptCode(const char *data,
@@ -144,10 +144,10 @@ SBTypeSummary SBTypeSummary::CreateWithScriptCode(const char *data,
data, options);
if (!data || data[0] == 0)
- return LLDB_RECORD_RESULT(SBTypeSummary());
+ return SBTypeSummary();
- return LLDB_RECORD_RESULT(SBTypeSummary(
- TypeSummaryImplSP(new ScriptSummaryFormat(options, "", data))));
+ return SBTypeSummary(
+ TypeSummaryImplSP(new ScriptSummaryFormat(options, "", data)));
}
SBTypeSummary SBTypeSummary::CreateWithCallback(FormatCallback cb,
@@ -335,7 +335,7 @@ lldb::SBTypeSummary &SBTypeSummary::operator=(const lldb::SBTypeSummary &rhs) {
if (this != &rhs) {
m_opaque_sp = rhs.m_opaque_sp;
}
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
bool SBTypeSummary::operator==(lldb::SBTypeSummary &rhs) {
diff --git a/lldb/source/API/SBTypeSynthetic.cpp b/lldb/source/API/SBTypeSynthetic.cpp
index 0f03613e77a9..5b8a03b27077 100644
--- a/lldb/source/API/SBTypeSynthetic.cpp
+++ b/lldb/source/API/SBTypeSynthetic.cpp
@@ -27,9 +27,9 @@ SBTypeSynthetic SBTypeSynthetic::CreateWithClassName(const char *data,
options);
if (!data || data[0] == 0)
- return LLDB_RECORD_RESULT(SBTypeSynthetic());
- return LLDB_RECORD_RESULT(SBTypeSynthetic(ScriptedSyntheticChildrenSP(
- new ScriptedSyntheticChildren(options, data, ""))));
+ return SBTypeSynthetic();
+ return SBTypeSynthetic(ScriptedSyntheticChildrenSP(
+ new ScriptedSyntheticChildren(options, data, "")));
}
SBTypeSynthetic SBTypeSynthetic::CreateWithScriptCode(const char *data,
@@ -39,9 +39,9 @@ SBTypeSynthetic SBTypeSynthetic::CreateWithScriptCode(const char *data,
data, options);
if (!data || data[0] == 0)
- return LLDB_RECORD_RESULT(SBTypeSynthetic());
- return LLDB_RECORD_RESULT(SBTypeSynthetic(ScriptedSyntheticChildrenSP(
- new ScriptedSyntheticChildren(options, "", data))));
+ return SBTypeSynthetic();
+ return SBTypeSynthetic(ScriptedSyntheticChildrenSP(
+ new ScriptedSyntheticChildren(options, "", data)));
}
SBTypeSynthetic::SBTypeSynthetic(const lldb::SBTypeSynthetic &rhs)
@@ -142,7 +142,7 @@ operator=(const lldb::SBTypeSynthetic &rhs) {
if (this != &rhs) {
m_opaque_sp = rhs.m_opaque_sp;
}
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
bool SBTypeSynthetic::operator==(lldb::SBTypeSynthetic &rhs) {
diff --git a/lldb/source/API/SBUnixSignals.cpp b/lldb/source/API/SBUnixSignals.cpp
index ac920e08bf23..6ee7afb04e7b 100644
--- a/lldb/source/API/SBUnixSignals.cpp
+++ b/lldb/source/API/SBUnixSignals.cpp
@@ -39,7 +39,7 @@ const SBUnixSignals &SBUnixSignals::operator=(const SBUnixSignals &rhs) {
if (this != &rhs)
m_opaque_wp = rhs.m_opaque_wp;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBUnixSignals::~SBUnixSignals() = default;
diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp
index 1e3e2bd32b44..151ccba8381e 100644
--- a/lldb/source/API/SBValue.cpp
+++ b/lldb/source/API/SBValue.cpp
@@ -236,7 +236,7 @@ SBValue &SBValue::operator=(const SBValue &rhs) {
if (this != &rhs) {
SetSP(rhs.m_opaque_sp);
}
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBValue::~SBValue() = default;
@@ -274,7 +274,7 @@ SBError SBValue::GetError() {
sb_error.SetErrorStringWithFormat("error: %s",
locker.GetError().AsCString());
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
user_id_t SBValue::GetID() {
@@ -403,7 +403,7 @@ SBType SBValue::GetType() {
sb_type.SetSP(type_sp);
}
- return LLDB_RECORD_RESULT(sb_type);
+ return sb_type;
}
bool SBValue::GetValueDidChange() {
@@ -500,7 +500,7 @@ lldb::SBTypeFormat SBValue::GetTypeFormat() {
format.SetSP(format_sp);
}
}
- return LLDB_RECORD_RESULT(format);
+ return format;
}
lldb::SBTypeSummary SBValue::GetTypeSummary() {
@@ -516,7 +516,7 @@ lldb::SBTypeSummary SBValue::GetTypeSummary() {
summary.SetSP(summary_sp);
}
}
- return LLDB_RECORD_RESULT(summary);
+ return summary;
}
lldb::SBTypeFilter SBValue::GetTypeFilter() {
@@ -536,7 +536,7 @@ lldb::SBTypeFilter SBValue::GetTypeFilter() {
}
}
}
- return LLDB_RECORD_RESULT(filter);
+ return filter;
}
lldb::SBTypeSynthetic SBValue::GetTypeSynthetic() {
@@ -556,7 +556,7 @@ lldb::SBTypeSynthetic SBValue::GetTypeSynthetic() {
}
}
}
- return LLDB_RECORD_RESULT(synthetic);
+ return synthetic;
}
lldb::SBValue SBValue::CreateChildAtOffset(const char *name, uint32_t offset,
@@ -577,7 +577,7 @@ lldb::SBValue SBValue::CreateChildAtOffset(const char *name, uint32_t offset,
GetPreferDynamicValue(), GetPreferSyntheticValue(), name);
}
}
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
lldb::SBValue SBValue::Cast(SBType type) {
@@ -590,7 +590,7 @@ lldb::SBValue SBValue::Cast(SBType type) {
if (value_sp && type_sp)
sb_value.SetSP(value_sp->Cast(type_sp->GetCompilerType(false)),
GetPreferDynamicValue(), GetPreferSyntheticValue());
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
lldb::SBValue SBValue::CreateValueFromExpression(const char *name,
@@ -600,8 +600,7 @@ lldb::SBValue SBValue::CreateValueFromExpression(const char *name,
SBExpressionOptions options;
options.ref().SetKeepInMemory(true);
- return LLDB_RECORD_RESULT(
- CreateValueFromExpression(name, expression, options));
+ return CreateValueFromExpression(name, expression, options);
}
lldb::SBValue SBValue::CreateValueFromExpression(const char *name,
@@ -623,7 +622,7 @@ lldb::SBValue SBValue::CreateValueFromExpression(const char *name,
new_value_sp->SetName(ConstString(name));
}
sb_value.SetSP(new_value_sp);
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
lldb::SBValue SBValue::CreateValueFromAddress(const char *name,
@@ -645,7 +644,7 @@ lldb::SBValue SBValue::CreateValueFromAddress(const char *name,
exe_ctx, ast_type);
}
sb_value.SetSP(new_value_sp);
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
lldb::SBValue SBValue::CreateValueFromData(const char *name, SBData data,
@@ -666,7 +665,7 @@ lldb::SBValue SBValue::CreateValueFromData(const char *name, SBData data,
new_value_sp->SetAddressTypeOfChildren(eAddressTypeLoad);
}
sb_value.SetSP(new_value_sp);
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
SBValue SBValue::GetChildAtIndex(uint32_t idx) {
@@ -681,8 +680,7 @@ SBValue SBValue::GetChildAtIndex(uint32_t idx) {
if (target_sp)
use_dynamic = target_sp->GetPreferDynamicValue();
- return LLDB_RECORD_RESULT(
- GetChildAtIndex(idx, use_dynamic, can_create_synthetic));
+ return GetChildAtIndex(idx, use_dynamic, can_create_synthetic);
}
SBValue SBValue::GetChildAtIndex(uint32_t idx,
@@ -707,7 +705,7 @@ SBValue SBValue::GetChildAtIndex(uint32_t idx,
SBValue sb_value;
sb_value.SetSP(child_sp, use_dynamic, GetPreferSyntheticValue());
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
uint32_t SBValue::GetIndexOfChildWithName(const char *name) {
@@ -734,7 +732,7 @@ SBValue SBValue::GetChildMemberWithName(const char *name) {
if (target_sp)
use_dynamic_value = target_sp->GetPreferDynamicValue();
- return LLDB_RECORD_RESULT(GetChildMemberWithName(name, use_dynamic_value));
+ return GetChildMemberWithName(name, use_dynamic_value);
}
SBValue
@@ -756,7 +754,7 @@ SBValue::GetChildMemberWithName(const char *name,
SBValue sb_value;
sb_value.SetSP(child_sp, use_dynamic_value, GetPreferSyntheticValue());
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
lldb::SBValue SBValue::GetDynamicValue(lldb::DynamicValueType use_dynamic) {
@@ -769,7 +767,7 @@ lldb::SBValue SBValue::GetDynamicValue(lldb::DynamicValueType use_dynamic) {
m_opaque_sp->GetUseSynthetic()));
value_sb.SetSP(proxy_sp);
}
- return LLDB_RECORD_RESULT(value_sb);
+ return value_sb;
}
lldb::SBValue SBValue::GetStaticValue() {
@@ -782,7 +780,7 @@ lldb::SBValue SBValue::GetStaticValue() {
m_opaque_sp->GetUseSynthetic()));
value_sb.SetSP(proxy_sp);
}
- return LLDB_RECORD_RESULT(value_sb);
+ return value_sb;
}
lldb::SBValue SBValue::GetNonSyntheticValue() {
@@ -794,7 +792,7 @@ lldb::SBValue SBValue::GetNonSyntheticValue() {
m_opaque_sp->GetUseDynamic(), false));
value_sb.SetSP(proxy_sp);
}
- return LLDB_RECORD_RESULT(value_sb);
+ return value_sb;
}
lldb::DynamicValueType SBValue::GetPreferDynamicValue() {
@@ -884,7 +882,7 @@ lldb::SBValue SBValue::GetValueForExpressionPath(const char *expr_path) {
SBValue sb_value;
sb_value.SetSP(child_sp, GetPreferDynamicValue(), GetPreferSyntheticValue());
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
int64_t SBValue::GetValueAsSigned(SBError &error, int64_t fail_value) {
@@ -1006,7 +1004,7 @@ SBValue SBValue::Dereference() {
sb_value = value_sp->Dereference(error);
}
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
// Deprecated - please use GetType().IsPointerType() instead.
@@ -1036,7 +1034,7 @@ lldb::SBTarget SBValue::GetTarget() {
sb_target.SetSP(target_sp);
}
- return LLDB_RECORD_RESULT(sb_target);
+ return sb_target;
}
lldb::SBProcess SBValue::GetProcess() {
@@ -1049,7 +1047,7 @@ lldb::SBProcess SBValue::GetProcess() {
sb_process.SetSP(process_sp);
}
- return LLDB_RECORD_RESULT(sb_process);
+ return sb_process;
}
lldb::SBThread SBValue::GetThread() {
@@ -1062,7 +1060,7 @@ lldb::SBThread SBValue::GetThread() {
sb_thread.SetThread(thread_sp);
}
- return LLDB_RECORD_RESULT(sb_thread);
+ return sb_thread;
}
lldb::SBFrame SBValue::GetFrame() {
@@ -1075,7 +1073,7 @@ lldb::SBFrame SBValue::GetFrame() {
sb_frame.SetFrameSP(frame_sp);
}
- return LLDB_RECORD_RESULT(sb_frame);
+ return sb_frame;
}
lldb::ValueObjectSP SBValue::GetSP(ValueLocker &locker) const {
@@ -1090,7 +1088,7 @@ lldb::ValueObjectSP SBValue::GetSP() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::ValueObjectSP, SBValue, GetSP);
ValueLocker locker;
- return LLDB_RECORD_RESULT(GetSP(locker));
+ return GetSP(locker);
}
void SBValue::SetSP(ValueImplSP impl_sp) { m_opaque_sp = impl_sp; }
@@ -1181,18 +1179,18 @@ lldb::SBValue SBValue::EvaluateExpression(const char *expr) const {
ValueLocker locker;
lldb::ValueObjectSP value_sp(GetSP(locker));
if (!value_sp)
- return LLDB_RECORD_RESULT(SBValue());
+ return SBValue();
lldb::TargetSP target_sp = value_sp->GetTargetSP();
if (!target_sp)
- return LLDB_RECORD_RESULT(SBValue());
+ return SBValue();
lldb::SBExpressionOptions options;
options.SetFetchDynamicValue(target_sp->GetPreferDynamicValue());
options.SetUnwindOnError(true);
options.SetIgnoreBreakpoints(true);
- return LLDB_RECORD_RESULT(EvaluateExpression(expr, options, nullptr));
+ return EvaluateExpression(expr, options, nullptr);
}
lldb::SBValue
@@ -1202,7 +1200,7 @@ SBValue::EvaluateExpression(const char *expr,
(const char *, const lldb::SBExpressionOptions &),
expr, options);
- return LLDB_RECORD_RESULT(EvaluateExpression(expr, options, nullptr));
+ return EvaluateExpression(expr, options, nullptr);
}
lldb::SBValue SBValue::EvaluateExpression(const char *expr,
@@ -1215,19 +1213,19 @@ lldb::SBValue SBValue::EvaluateExpression(const char *expr,
if (!expr || expr[0] == '\0') {
- return LLDB_RECORD_RESULT(SBValue());
+ return SBValue();
}
ValueLocker locker;
lldb::ValueObjectSP value_sp(GetSP(locker));
if (!value_sp) {
- return LLDB_RECORD_RESULT(SBValue());
+ return SBValue();
}
lldb::TargetSP target_sp = value_sp->GetTargetSP();
if (!target_sp) {
- return LLDB_RECORD_RESULT(SBValue());
+ return SBValue();
}
std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
@@ -1235,7 +1233,7 @@ lldb::SBValue SBValue::EvaluateExpression(const char *expr,
StackFrame *frame = exe_ctx.GetFramePtr();
if (!frame) {
- return LLDB_RECORD_RESULT(SBValue());
+ return SBValue();
}
ValueObjectSP res_val_sp;
@@ -1247,7 +1245,7 @@ lldb::SBValue SBValue::EvaluateExpression(const char *expr,
SBValue result;
result.SetSP(res_val_sp, options.GetFetchDynamicValue());
- return LLDB_RECORD_RESULT(result);
+ return result;
}
bool SBValue::GetDescription(SBStream &description) {
@@ -1297,7 +1295,7 @@ lldb::SBValue SBValue::AddressOf() {
GetPreferSyntheticValue());
}
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
lldb::addr_t SBValue::GetLoadAddress() {
@@ -1356,7 +1354,7 @@ lldb::SBAddress SBValue::GetAddress() {
}
}
- return LLDB_RECORD_RESULT(SBAddress(addr));
+ return SBAddress(addr);
}
lldb::SBData SBValue::GetPointeeData(uint32_t item_idx, uint32_t item_count) {
@@ -1376,7 +1374,7 @@ lldb::SBData SBValue::GetPointeeData(uint32_t item_idx, uint32_t item_count) {
}
}
- return LLDB_RECORD_RESULT(sb_data);
+ return sb_data;
}
lldb::SBData SBValue::GetData() {
@@ -1393,7 +1391,7 @@ lldb::SBData SBValue::GetData() {
*sb_data = data_sp;
}
- return LLDB_RECORD_RESULT(sb_data);
+ return sb_data;
}
bool SBValue::SetData(lldb::SBData &data, SBError &error) {
@@ -1454,7 +1452,7 @@ lldb::SBDeclaration SBValue::GetDeclaration() {
if (value_sp->GetDeclaration(decl))
decl_sb.SetDeclaration(decl);
}
- return LLDB_RECORD_RESULT(decl_sb);
+ return decl_sb;
}
lldb::SBWatchpoint SBValue::Watch(bool resolve_location, bool read, bool write,
@@ -1472,18 +1470,18 @@ lldb::SBWatchpoint SBValue::Watch(bool resolve_location, bool read, bool write,
if (value_sp && target_sp) {
// Read and Write cannot both be false.
if (!read && !write)
- return LLDB_RECORD_RESULT(sb_watchpoint);
+ return sb_watchpoint;
// If the value is not in scope, don't try and watch and invalid value
if (!IsInScope())
- return LLDB_RECORD_RESULT(sb_watchpoint);
+ return sb_watchpoint;
addr_t addr = GetLoadAddress();
if (addr == LLDB_INVALID_ADDRESS)
- return LLDB_RECORD_RESULT(sb_watchpoint);
+ return sb_watchpoint;
size_t byte_size = GetByteSize();
if (byte_size == 0)
- return LLDB_RECORD_RESULT(sb_watchpoint);
+ return sb_watchpoint;
uint32_t watch_type = 0;
if (read)
@@ -1516,7 +1514,7 @@ lldb::SBWatchpoint SBValue::Watch(bool resolve_location, bool read, bool write,
error.SetErrorString("could not set watchpoint, a target is required");
}
- return LLDB_RECORD_RESULT(sb_watchpoint);
+ return sb_watchpoint;
}
// FIXME: Remove this method impl (as well as the decl in .h) once it is no
@@ -1528,7 +1526,7 @@ lldb::SBWatchpoint SBValue::Watch(bool resolve_location, bool read,
resolve_location, read, write);
SBError error;
- return LLDB_RECORD_RESULT(Watch(resolve_location, read, write, error));
+ return Watch(resolve_location, read, write, error);
}
lldb::SBWatchpoint SBValue::WatchPointee(bool resolve_location, bool read,
@@ -1540,7 +1538,7 @@ lldb::SBWatchpoint SBValue::WatchPointee(bool resolve_location, bool read,
SBWatchpoint sb_watchpoint;
if (IsInScope() && GetType().IsPointerType())
sb_watchpoint = Dereference().Watch(resolve_location, read, write, error);
- return LLDB_RECORD_RESULT(sb_watchpoint);
+ return sb_watchpoint;
}
lldb::SBValue SBValue::Persist() {
@@ -1552,5 +1550,5 @@ lldb::SBValue SBValue::Persist() {
if (value_sp) {
persisted_sb.SetSP(value_sp->Persist());
}
- return LLDB_RECORD_RESULT(persisted_sb);
+ return persisted_sb;
}
diff --git a/lldb/source/API/SBValueList.cpp b/lldb/source/API/SBValueList.cpp
index db46da2f9ebf..797c615ce585 100644
--- a/lldb/source/API/SBValueList.cpp
+++ b/lldb/source/API/SBValueList.cpp
@@ -109,7 +109,7 @@ const SBValueList &SBValueList::operator=(const SBValueList &rhs) {
else
m_opaque_up.reset();
}
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
ValueListImpl *SBValueList::operator->() { return m_opaque_up.get(); }
@@ -156,7 +156,7 @@ SBValue SBValueList::GetValueAtIndex(uint32_t idx) const {
if (m_opaque_up)
sb_value = m_opaque_up->GetValueAtIndex(idx);
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
uint32_t SBValueList::GetSize() const {
@@ -181,7 +181,7 @@ SBValue SBValueList::FindValueObjectByUID(lldb::user_id_t uid) {
SBValue sb_value;
if (m_opaque_up)
sb_value = m_opaque_up->FindValueByUID(uid);
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
SBValue SBValueList::GetFirstValueByName(const char *name) const {
@@ -191,7 +191,7 @@ SBValue SBValueList::GetFirstValueByName(const char *name) const {
SBValue sb_value;
if (m_opaque_up)
sb_value = m_opaque_up->GetFirstValueByName(name);
- return LLDB_RECORD_RESULT(sb_value);
+ return sb_value;
}
void *SBValueList::opaque_ptr() { return m_opaque_up.get(); }
diff --git a/lldb/source/API/SBVariablesOptions.cpp b/lldb/source/API/SBVariablesOptions.cpp
index 1b6d9605a50e..4057e283e2b2 100644
--- a/lldb/source/API/SBVariablesOptions.cpp
+++ b/lldb/source/API/SBVariablesOptions.cpp
@@ -97,7 +97,7 @@ operator=(const SBVariablesOptions &options) {
options);
m_opaque_up = std::make_unique<VariablesOptionsImpl>(options.ref());
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBVariablesOptions::~SBVariablesOptions() = default;
diff --git a/lldb/source/API/SBWatchpoint.cpp b/lldb/source/API/SBWatchpoint.cpp
index eb6b77558a14..207141f5dca6 100644
--- a/lldb/source/API/SBWatchpoint.cpp
+++ b/lldb/source/API/SBWatchpoint.cpp
@@ -43,7 +43,7 @@ const SBWatchpoint &SBWatchpoint::operator=(const SBWatchpoint &rhs) {
SBWatchpoint, operator=,(const lldb::SBWatchpoint &), rhs);
m_opaque_wp = rhs.m_opaque_wp;
- return LLDB_RECORD_RESULT(*this);
+ return *this;
}
SBWatchpoint::~SBWatchpoint() = default;
@@ -92,7 +92,7 @@ SBError SBWatchpoint::GetError() {
if (watchpoint_sp) {
sb_error.SetError(watchpoint_sp->GetError());
}
- return LLDB_RECORD_RESULT(sb_error);
+ return sb_error;
}
int32_t SBWatchpoint::GetHardwareIndex() {
@@ -262,7 +262,7 @@ void SBWatchpoint::Clear() {
lldb::WatchpointSP SBWatchpoint::GetSP() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::WatchpointSP, SBWatchpoint, GetSP);
- return LLDB_RECORD_RESULT(m_opaque_wp.lock());
+ return m_opaque_wp.lock();
}
void SBWatchpoint::SetSP(const lldb::WatchpointSP &sp) {
@@ -301,5 +301,5 @@ SBWatchpoint SBWatchpoint::GetWatchpointFromEvent(const lldb::SBEvent &event) {
if (event.IsValid())
sb_watchpoint =
Watchpoint::WatchpointEventData::GetWatchpointFromEvent(event.GetSP());
- return LLDB_RECORD_RESULT(sb_watchpoint);
+ return sb_watchpoint;
}