summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBDeclaration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API/SBDeclaration.cpp')
-rw-r--r--lldb/source/API/SBDeclaration.cpp46
1 files changed, 42 insertions, 4 deletions
diff --git a/lldb/source/API/SBDeclaration.cpp b/lldb/source/API/SBDeclaration.cpp
index bec3791b506..971f46e3456 100644
--- a/lldb/source/API/SBDeclaration.cpp
+++ b/lldb/source/API/SBDeclaration.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBDeclaration.h"
+#include "SBReproducerPrivate.h"
#include "Utils.h"
#include "lldb/API/SBStream.h"
#include "lldb/Host/PosixApi.h"
@@ -19,9 +20,13 @@
using namespace lldb;
using namespace lldb_private;
-SBDeclaration::SBDeclaration() : m_opaque_up() {}
+SBDeclaration::SBDeclaration() : m_opaque_up() {
+ LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBDeclaration);
+}
SBDeclaration::SBDeclaration(const SBDeclaration &rhs) : m_opaque_up() {
+ LLDB_RECORD_CONSTRUCTOR(SBDeclaration, (const lldb::SBDeclaration &), rhs);
+
m_opaque_up = clone(rhs.m_opaque_up);
}
@@ -32,6 +37,10 @@ SBDeclaration::SBDeclaration(const lldb_private::Declaration *lldb_object_ptr)
}
const SBDeclaration &SBDeclaration::operator=(const SBDeclaration &rhs) {
+ LLDB_RECORD_METHOD(const lldb::SBDeclaration &,
+ SBDeclaration, operator=,(const lldb::SBDeclaration &),
+ rhs);
+
if (this != &rhs)
m_opaque_up = clone(rhs.m_opaque_up);
return *this;
@@ -45,10 +54,15 @@ void SBDeclaration::SetDeclaration(
SBDeclaration::~SBDeclaration() {}
bool SBDeclaration::IsValid() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBDeclaration, IsValid);
+
return m_opaque_up.get() && m_opaque_up->IsValid();
}
SBFileSpec SBDeclaration::GetFileSpec() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBFileSpec, SBDeclaration,
+ GetFileSpec);
+
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
SBFileSpec sb_file_spec;
@@ -63,10 +77,12 @@ SBFileSpec SBDeclaration::GetFileSpec() const {
static_cast<const void *>(sb_file_spec.get()), sstr.GetData());
}
- return sb_file_spec;
+ return LLDB_RECORD_RESULT(sb_file_spec);
}
uint32_t SBDeclaration::GetLine() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBDeclaration, GetLine);
+
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
uint32_t line = 0;
@@ -81,22 +97,38 @@ uint32_t SBDeclaration::GetLine() const {
}
uint32_t SBDeclaration::GetColumn() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBDeclaration, GetColumn);
+
if (m_opaque_up)
return m_opaque_up->GetColumn();
return 0;
}
void SBDeclaration::SetFileSpec(lldb::SBFileSpec filespec) {
+ LLDB_RECORD_METHOD(void, SBDeclaration, SetFileSpec, (lldb::SBFileSpec),
+ filespec);
+
if (filespec.IsValid())
ref().SetFile(filespec.ref());
else
ref().SetFile(FileSpec());
}
-void SBDeclaration::SetLine(uint32_t line) { ref().SetLine(line); }
+void SBDeclaration::SetLine(uint32_t line) {
+ LLDB_RECORD_METHOD(void, SBDeclaration, SetLine, (uint32_t), line);
-void SBDeclaration::SetColumn(uint32_t column) { ref().SetColumn(column); }
+ ref().SetLine(line);
+}
+
+void SBDeclaration::SetColumn(uint32_t column) {
+ LLDB_RECORD_METHOD(void, SBDeclaration, SetColumn, (uint32_t), column);
+
+ ref().SetColumn(column);
+}
bool SBDeclaration::operator==(const SBDeclaration &rhs) const {
+ LLDB_RECORD_METHOD_CONST(
+ bool, SBDeclaration, operator==,(const lldb::SBDeclaration &), rhs);
+
lldb_private::Declaration *lhs_ptr = m_opaque_up.get();
lldb_private::Declaration *rhs_ptr = rhs.m_opaque_up.get();
@@ -107,6 +139,9 @@ bool SBDeclaration::operator==(const SBDeclaration &rhs) const {
}
bool SBDeclaration::operator!=(const SBDeclaration &rhs) const {
+ LLDB_RECORD_METHOD_CONST(
+ bool, SBDeclaration, operator!=,(const lldb::SBDeclaration &), rhs);
+
lldb_private::Declaration *lhs_ptr = m_opaque_up.get();
lldb_private::Declaration *rhs_ptr = rhs.m_opaque_up.get();
@@ -131,6 +166,9 @@ const lldb_private::Declaration &SBDeclaration::ref() const {
}
bool SBDeclaration::GetDescription(SBStream &description) {
+ LLDB_RECORD_METHOD(bool, SBDeclaration, GetDescription, (lldb::SBStream &),
+ description);
+
Stream &strm = description.ref();
if (m_opaque_up) {
OpenPOWER on IntegriCloud