summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBStringList.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-03-06 00:06:00 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-03-06 00:06:00 +0000
commitbaf5664f5056b13329db8410f19d9fe7aca77686 (patch)
treea4b267266e551c167bdb7fd7c508fd148d0d9b7a /lldb/source/API/SBStringList.cpp
parentbd4bf82a48c2b5b632766593916f8d7ea98c9e0a (diff)
downloadbcm5719-llvm-baf5664f5056b13329db8410f19d9fe7aca77686.tar.gz
bcm5719-llvm-baf5664f5056b13329db8410f19d9fe7aca77686.zip
[Reproducers] Add SBReproducer macros
This patch adds the SBReproducer macros needed to capture and reply the corresponding calls. This patch was generated by running the lldb-instr tool on the API source files. Differential revision: https://reviews.llvm.org/D57475 llvm-svn: 355459
Diffstat (limited to 'lldb/source/API/SBStringList.cpp')
-rw-r--r--lldb/source/API/SBStringList.cpp34
1 files changed, 32 insertions, 2 deletions
diff --git a/lldb/source/API/SBStringList.cpp b/lldb/source/API/SBStringList.cpp
index 12d35c9ecd2..a248468b0cf 100644
--- a/lldb/source/API/SBStringList.cpp
+++ b/lldb/source/API/SBStringList.cpp
@@ -7,13 +7,16 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBStringList.h"
+#include "SBReproducerPrivate.h"
#include "Utils.h"
#include "lldb/Utility/StringList.h"
using namespace lldb;
using namespace lldb_private;
-SBStringList::SBStringList() : m_opaque_up() {}
+SBStringList::SBStringList() : m_opaque_up() {
+ LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBStringList);
+}
SBStringList::SBStringList(const lldb_private::StringList *lldb_strings_ptr)
: m_opaque_up() {
@@ -22,10 +25,15 @@ SBStringList::SBStringList(const lldb_private::StringList *lldb_strings_ptr)
}
SBStringList::SBStringList(const SBStringList &rhs) : m_opaque_up() {
+ LLDB_RECORD_CONSTRUCTOR(SBStringList, (const lldb::SBStringList &), rhs);
+
m_opaque_up = clone(rhs.m_opaque_up);
}
const SBStringList &SBStringList::operator=(const SBStringList &rhs) {
+ LLDB_RECORD_METHOD(const lldb::SBStringList &,
+ SBStringList, operator=,(const lldb::SBStringList &), rhs);
+
if (this != &rhs)
m_opaque_up = clone(rhs.m_opaque_up);
return *this;
@@ -41,9 +49,15 @@ const lldb_private::StringList &SBStringList::operator*() const {
return *m_opaque_up;
}
-bool SBStringList::IsValid() const { return (m_opaque_up != NULL); }
+bool SBStringList::IsValid() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBStringList, IsValid);
+
+ return (m_opaque_up != NULL);
+}
void SBStringList::AppendString(const char *str) {
+ LLDB_RECORD_METHOD(void, SBStringList, AppendString, (const char *), str);
+
if (str != NULL) {
if (IsValid())
m_opaque_up->AppendString(str);
@@ -53,6 +67,9 @@ void SBStringList::AppendString(const char *str) {
}
void SBStringList::AppendList(const char **strv, int strc) {
+ LLDB_RECORD_METHOD(void, SBStringList, AppendList, (const char **, int), strv,
+ strc);
+
if ((strv != NULL) && (strc > 0)) {
if (IsValid())
m_opaque_up->AppendList(strv, strc);
@@ -62,6 +79,9 @@ void SBStringList::AppendList(const char **strv, int strc) {
}
void SBStringList::AppendList(const SBStringList &strings) {
+ LLDB_RECORD_METHOD(void, SBStringList, AppendList,
+ (const lldb::SBStringList &), strings);
+
if (strings.IsValid()) {
if (!IsValid())
m_opaque_up.reset(new lldb_private::StringList());
@@ -76,6 +96,8 @@ void SBStringList::AppendList(const StringList &strings) {
}
uint32_t SBStringList::GetSize() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBStringList, GetSize);
+
if (IsValid()) {
return m_opaque_up->GetSize();
}
@@ -83,6 +105,9 @@ uint32_t SBStringList::GetSize() const {
}
const char *SBStringList::GetStringAtIndex(size_t idx) {
+ LLDB_RECORD_METHOD(const char *, SBStringList, GetStringAtIndex, (size_t),
+ idx);
+
if (IsValid()) {
return m_opaque_up->GetStringAtIndex(idx);
}
@@ -90,6 +115,9 @@ const char *SBStringList::GetStringAtIndex(size_t idx) {
}
const char *SBStringList::GetStringAtIndex(size_t idx) const {
+ LLDB_RECORD_METHOD_CONST(const char *, SBStringList, GetStringAtIndex,
+ (size_t), idx);
+
if (IsValid()) {
return m_opaque_up->GetStringAtIndex(idx);
}
@@ -97,6 +125,8 @@ const char *SBStringList::GetStringAtIndex(size_t idx) const {
}
void SBStringList::Clear() {
+ LLDB_RECORD_METHOD_NO_ARGS(void, SBStringList, Clear);
+
if (IsValid()) {
m_opaque_up->Clear();
}
OpenPOWER on IntegriCloud