diff options
Diffstat (limited to 'lldb/source/API/SBTypeSynthetic.cpp')
-rw-r--r-- | lldb/source/API/SBTypeSynthetic.cpp | 102 |
1 files changed, 26 insertions, 76 deletions
diff --git a/lldb/source/API/SBTypeSynthetic.cpp b/lldb/source/API/SBTypeSynthetic.cpp index af5e167b9c24..7258ff04745d 100644 --- a/lldb/source/API/SBTypeSynthetic.cpp +++ b/lldb/source/API/SBTypeSynthetic.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// #include "lldb/API/SBTypeSynthetic.h" -#include "SBReproducerPrivate.h" +#include "lldb/Utility/Instrumentation.h" #include "lldb/API/SBStream.h" @@ -16,54 +16,47 @@ using namespace lldb; using namespace lldb_private; -SBTypeSynthetic::SBTypeSynthetic() : m_opaque_sp() { - LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBTypeSynthetic); -} +SBTypeSynthetic::SBTypeSynthetic() { LLDB_INSTRUMENT_VA(this); } SBTypeSynthetic SBTypeSynthetic::CreateWithClassName(const char *data, uint32_t options) { - LLDB_RECORD_STATIC_METHOD(lldb::SBTypeSynthetic, SBTypeSynthetic, - CreateWithClassName, (const char *, uint32_t), data, - options); + LLDB_INSTRUMENT_VA(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, uint32_t options) { - LLDB_RECORD_STATIC_METHOD(lldb::SBTypeSynthetic, SBTypeSynthetic, - CreateWithScriptCode, (const char *, uint32_t), - data, options); + LLDB_INSTRUMENT_VA(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) : m_opaque_sp(rhs.m_opaque_sp) { - LLDB_RECORD_CONSTRUCTOR(SBTypeSynthetic, (const lldb::SBTypeSynthetic &), - rhs); + LLDB_INSTRUMENT_VA(this, rhs); } SBTypeSynthetic::~SBTypeSynthetic() = default; bool SBTypeSynthetic::IsValid() const { - LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeSynthetic, IsValid); + LLDB_INSTRUMENT_VA(this); return this->operator bool(); } SBTypeSynthetic::operator bool() const { - LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeSynthetic, operator bool); + LLDB_INSTRUMENT_VA(this); return m_opaque_sp.get() != nullptr; } bool SBTypeSynthetic::IsClassCode() { - LLDB_RECORD_METHOD_NO_ARGS(bool, SBTypeSynthetic, IsClassCode); + LLDB_INSTRUMENT_VA(this); if (!IsValid()) return false; @@ -72,7 +65,7 @@ bool SBTypeSynthetic::IsClassCode() { } bool SBTypeSynthetic::IsClassName() { - LLDB_RECORD_METHOD_NO_ARGS(bool, SBTypeSynthetic, IsClassName); + LLDB_INSTRUMENT_VA(this); if (!IsValid()) return false; @@ -80,7 +73,7 @@ bool SBTypeSynthetic::IsClassName() { } const char *SBTypeSynthetic::GetData() { - LLDB_RECORD_METHOD_NO_ARGS(const char *, SBTypeSynthetic, GetData); + LLDB_INSTRUMENT_VA(this); if (!IsValid()) return nullptr; @@ -91,21 +84,21 @@ const char *SBTypeSynthetic::GetData() { } void SBTypeSynthetic::SetClassName(const char *data) { - LLDB_RECORD_METHOD(void, SBTypeSynthetic, SetClassName, (const char *), data); + LLDB_INSTRUMENT_VA(this, data); if (IsValid() && data && *data) m_opaque_sp->SetPythonClassName(data); } void SBTypeSynthetic::SetClassCode(const char *data) { - LLDB_RECORD_METHOD(void, SBTypeSynthetic, SetClassCode, (const char *), data); + LLDB_INSTRUMENT_VA(this, data); if (IsValid() && data && *data) m_opaque_sp->SetPythonCode(data); } uint32_t SBTypeSynthetic::GetOptions() { - LLDB_RECORD_METHOD_NO_ARGS(uint32_t, SBTypeSynthetic, GetOptions); + LLDB_INSTRUMENT_VA(this); if (!IsValid()) return lldb::eTypeOptionNone; @@ -113,7 +106,7 @@ uint32_t SBTypeSynthetic::GetOptions() { } void SBTypeSynthetic::SetOptions(uint32_t value) { - LLDB_RECORD_METHOD(void, SBTypeSynthetic, SetOptions, (uint32_t), value); + LLDB_INSTRUMENT_VA(this, value); if (!CopyOnWrite_Impl()) return; @@ -122,9 +115,7 @@ void SBTypeSynthetic::SetOptions(uint32_t value) { bool SBTypeSynthetic::GetDescription(lldb::SBStream &description, lldb::DescriptionLevel description_level) { - LLDB_RECORD_METHOD(bool, SBTypeSynthetic, GetDescription, - (lldb::SBStream &, lldb::DescriptionLevel), description, - description_level); + LLDB_INSTRUMENT_VA(this, description, description_level); if (m_opaque_sp) { description.Printf("%s\n", m_opaque_sp->GetDescription().c_str()); @@ -135,19 +126,16 @@ bool SBTypeSynthetic::GetDescription(lldb::SBStream &description, lldb::SBTypeSynthetic &SBTypeSynthetic:: operator=(const lldb::SBTypeSynthetic &rhs) { - LLDB_RECORD_METHOD(lldb::SBTypeSynthetic &, - SBTypeSynthetic, operator=,(const lldb::SBTypeSynthetic &), - rhs); + LLDB_INSTRUMENT_VA(this, rhs); if (this != &rhs) { m_opaque_sp = rhs.m_opaque_sp; } - return LLDB_RECORD_RESULT(*this); + return *this; } bool SBTypeSynthetic::operator==(lldb::SBTypeSynthetic &rhs) { - LLDB_RECORD_METHOD( - bool, SBTypeSynthetic, operator==,(lldb::SBTypeSynthetic &), rhs); + LLDB_INSTRUMENT_VA(this, rhs); if (!IsValid()) return !rhs.IsValid(); @@ -155,8 +143,7 @@ bool SBTypeSynthetic::operator==(lldb::SBTypeSynthetic &rhs) { } bool SBTypeSynthetic::IsEqualTo(lldb::SBTypeSynthetic &rhs) { - LLDB_RECORD_METHOD(bool, SBTypeSynthetic, IsEqualTo, - (lldb::SBTypeSynthetic &), rhs); + LLDB_INSTRUMENT_VA(this, rhs); if (!IsValid()) return !rhs.IsValid(); @@ -174,8 +161,7 @@ bool SBTypeSynthetic::IsEqualTo(lldb::SBTypeSynthetic &rhs) { } bool SBTypeSynthetic::operator!=(lldb::SBTypeSynthetic &rhs) { - LLDB_RECORD_METHOD( - bool, SBTypeSynthetic, operator!=,(lldb::SBTypeSynthetic &), rhs); + LLDB_INSTRUMENT_VA(this, rhs); if (!IsValid()) return !rhs.IsValid(); @@ -209,39 +195,3 @@ bool SBTypeSynthetic::CopyOnWrite_Impl() { return true; } - -namespace lldb_private { -namespace repro { - -template <> -void RegisterMethods<SBTypeSynthetic>(Registry &R) { - LLDB_REGISTER_CONSTRUCTOR(SBTypeSynthetic, ()); - LLDB_REGISTER_STATIC_METHOD(lldb::SBTypeSynthetic, SBTypeSynthetic, - CreateWithClassName, (const char *, uint32_t)); - LLDB_REGISTER_STATIC_METHOD(lldb::SBTypeSynthetic, SBTypeSynthetic, - CreateWithScriptCode, (const char *, uint32_t)); - LLDB_REGISTER_CONSTRUCTOR(SBTypeSynthetic, (const lldb::SBTypeSynthetic &)); - LLDB_REGISTER_METHOD_CONST(bool, SBTypeSynthetic, IsValid, ()); - LLDB_REGISTER_METHOD_CONST(bool, SBTypeSynthetic, operator bool, ()); - LLDB_REGISTER_METHOD(bool, SBTypeSynthetic, IsClassCode, ()); - LLDB_REGISTER_METHOD(bool, SBTypeSynthetic, IsClassName, ()); - LLDB_REGISTER_METHOD(const char *, SBTypeSynthetic, GetData, ()); - LLDB_REGISTER_METHOD(void, SBTypeSynthetic, SetClassName, (const char *)); - LLDB_REGISTER_METHOD(void, SBTypeSynthetic, SetClassCode, (const char *)); - LLDB_REGISTER_METHOD(uint32_t, SBTypeSynthetic, GetOptions, ()); - LLDB_REGISTER_METHOD(void, SBTypeSynthetic, SetOptions, (uint32_t)); - LLDB_REGISTER_METHOD(bool, SBTypeSynthetic, GetDescription, - (lldb::SBStream &, lldb::DescriptionLevel)); - LLDB_REGISTER_METHOD( - lldb::SBTypeSynthetic &, - SBTypeSynthetic, operator=,(const lldb::SBTypeSynthetic &)); - LLDB_REGISTER_METHOD(bool, - SBTypeSynthetic, operator==,(lldb::SBTypeSynthetic &)); - LLDB_REGISTER_METHOD(bool, SBTypeSynthetic, IsEqualTo, - (lldb::SBTypeSynthetic &)); - LLDB_REGISTER_METHOD(bool, - SBTypeSynthetic, operator!=,(lldb::SBTypeSynthetic &)); -} - -} -} |