summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2019-09-25 09:21:00 +0000
committerRaphael Isemann <teemperor@gmail.com>2019-09-25 09:21:00 +0000
commit286860986e2281d2b7c67a1d50d142b4834b0d1f (patch)
treeaed3a2cd7cb684b755bd102fd3f56971077289cd
parent2a69ed0bc87bb657b31aab5250f6dc158068d220 (diff)
downloadbcm5719-llvm-286860986e2281d2b7c67a1d50d142b4834b0d1f.tar.gz
bcm5719-llvm-286860986e2281d2b7c67a1d50d142b4834b0d1f.zip
[lldb][NFC] Remove unused method chaining from Read[Buffer/String]AndDumpToStreamOptions
All this code isn't used anywhere and method chaining isn't really useful for some option struct. llvm-svn: 372834
-rw-r--r--lldb/include/lldb/DataFormatters/StringPrinter.h136
1 files changed, 27 insertions, 109 deletions
diff --git a/lldb/include/lldb/DataFormatters/StringPrinter.h b/lldb/include/lldb/DataFormatters/StringPrinter.h
index d26dd31d3b0..81bb3bf283d 100644
--- a/lldb/include/lldb/DataFormatters/StringPrinter.h
+++ b/lldb/include/lldb/DataFormatters/StringPrinter.h
@@ -30,97 +30,55 @@ public:
ReadStringAndDumpToStreamOptions(ValueObject &valobj);
- ReadStringAndDumpToStreamOptions &SetLocation(uint64_t l) {
- m_location = l;
- return *this;
- }
+ void SetLocation(uint64_t l) { m_location = l; }
uint64_t GetLocation() const { return m_location; }
- ReadStringAndDumpToStreamOptions &SetProcessSP(lldb::ProcessSP p) {
- m_process_sp = p;
- return *this;
- }
+ void SetProcessSP(lldb::ProcessSP p) { m_process_sp = p; }
lldb::ProcessSP GetProcessSP() const { return m_process_sp; }
- ReadStringAndDumpToStreamOptions &SetStream(Stream *s) {
- m_stream = s;
- return *this;
- }
+ void SetStream(Stream *s) { m_stream = s; }
Stream *GetStream() const { return m_stream; }
- ReadStringAndDumpToStreamOptions &SetPrefixToken(const std::string &p) {
- m_prefix_token = p;
- return *this;
- }
+ void SetPrefixToken(const std::string &p) { m_prefix_token = p; }
- ReadStringAndDumpToStreamOptions &SetPrefixToken(std::nullptr_t) {
- m_prefix_token.clear();
- return *this;
- }
+ void SetPrefixToken(std::nullptr_t) { m_prefix_token.clear(); }
const char *GetPrefixToken() const { return m_prefix_token.c_str(); }
- ReadStringAndDumpToStreamOptions &SetSuffixToken(const std::string &p) {
- m_suffix_token = p;
- return *this;
- }
+ void SetSuffixToken(const std::string &p) { m_suffix_token = p; }
- ReadStringAndDumpToStreamOptions &SetSuffixToken(std::nullptr_t) {
- m_suffix_token.clear();
- return *this;
- }
+ void SetSuffixToken(std::nullptr_t) { m_suffix_token.clear(); }
const char *GetSuffixToken() const { return m_suffix_token.c_str(); }
- ReadStringAndDumpToStreamOptions &SetQuote(char q) {
- m_quote = q;
- return *this;
- }
+ void SetQuote(char q) { m_quote = q; }
char GetQuote() const { return m_quote; }
- ReadStringAndDumpToStreamOptions &SetSourceSize(uint32_t s) {
- m_source_size = s;
- return *this;
- }
+ void SetSourceSize(uint32_t s) { m_source_size = s; }
uint32_t GetSourceSize() const { return m_source_size; }
- ReadStringAndDumpToStreamOptions &SetNeedsZeroTermination(bool z) {
- m_needs_zero_termination = z;
- return *this;
- }
+ void SetNeedsZeroTermination(bool z) { m_needs_zero_termination = z; }
bool GetNeedsZeroTermination() const { return m_needs_zero_termination; }
- ReadStringAndDumpToStreamOptions &SetBinaryZeroIsTerminator(bool e) {
- m_zero_is_terminator = e;
- return *this;
- }
+ void SetBinaryZeroIsTerminator(bool e) { m_zero_is_terminator = e; }
bool GetBinaryZeroIsTerminator() const { return m_zero_is_terminator; }
- ReadStringAndDumpToStreamOptions &SetEscapeNonPrintables(bool e) {
- m_escape_non_printables = e;
- return *this;
- }
+ void SetEscapeNonPrintables(bool e) { m_escape_non_printables = e; }
bool GetEscapeNonPrintables() const { return m_escape_non_printables; }
- ReadStringAndDumpToStreamOptions &SetIgnoreMaxLength(bool e) {
- m_ignore_max_length = e;
- return *this;
- }
+ void SetIgnoreMaxLength(bool e) { m_ignore_max_length = e; }
bool GetIgnoreMaxLength() const { return m_ignore_max_length; }
- ReadStringAndDumpToStreamOptions &SetLanguage(lldb::LanguageType l) {
- m_language_type = l;
- return *this;
- }
+ void SetLanguage(lldb::LanguageType l) { m_language_type = l; }
lldb::LanguageType GetLanguage() const
{
@@ -151,89 +109,49 @@ public:
ReadBufferAndDumpToStreamOptions(
const ReadStringAndDumpToStreamOptions &options);
- ReadBufferAndDumpToStreamOptions &SetData(DataExtractor d) {
- m_data = d;
- return *this;
- }
+ void SetData(DataExtractor d) { m_data = d; }
lldb_private::DataExtractor GetData() const { return m_data; }
- ReadBufferAndDumpToStreamOptions &SetStream(Stream *s) {
- m_stream = s;
- return *this;
- }
+ void SetStream(Stream *s) { m_stream = s; }
Stream *GetStream() const { return m_stream; }
- ReadBufferAndDumpToStreamOptions &SetPrefixToken(const std::string &p) {
- m_prefix_token = p;
- return *this;
- }
+ void SetPrefixToken(const std::string &p) { m_prefix_token = p; }
- ReadBufferAndDumpToStreamOptions &SetPrefixToken(std::nullptr_t) {
- m_prefix_token.clear();
- return *this;
- }
+ void SetPrefixToken(std::nullptr_t) { m_prefix_token.clear(); }
const char *GetPrefixToken() const { return m_prefix_token.c_str(); }
- ReadBufferAndDumpToStreamOptions &SetSuffixToken(const std::string &p) {
- m_suffix_token = p;
- return *this;
- }
+ void SetSuffixToken(const std::string &p) { m_suffix_token = p; }
- ReadBufferAndDumpToStreamOptions &SetSuffixToken(std::nullptr_t) {
- m_suffix_token.clear();
- return *this;
- }
+ void SetSuffixToken(std::nullptr_t) { m_suffix_token.clear(); }
const char *GetSuffixToken() const { return m_suffix_token.c_str(); }
- ReadBufferAndDumpToStreamOptions &SetQuote(char q) {
- m_quote = q;
- return *this;
- }
+ void SetQuote(char q) { m_quote = q; }
char GetQuote() const { return m_quote; }
- ReadBufferAndDumpToStreamOptions &SetSourceSize(uint32_t s) {
- m_source_size = s;
- return *this;
- }
+ void SetSourceSize(uint32_t s) { m_source_size = s; }
uint32_t GetSourceSize() const { return m_source_size; }
- ReadBufferAndDumpToStreamOptions &SetEscapeNonPrintables(bool e) {
- m_escape_non_printables = e;
- return *this;
- }
+ void SetEscapeNonPrintables(bool e) { m_escape_non_printables = e; }
bool GetEscapeNonPrintables() const { return m_escape_non_printables; }
- ReadBufferAndDumpToStreamOptions &SetBinaryZeroIsTerminator(bool e) {
- m_zero_is_terminator = e;
- return *this;
- }
+ void SetBinaryZeroIsTerminator(bool e) { m_zero_is_terminator = e; }
bool GetBinaryZeroIsTerminator() const { return m_zero_is_terminator; }
- ReadBufferAndDumpToStreamOptions &SetIsTruncated(bool t) {
- m_is_truncated = t;
- return *this;
- }
+ void SetIsTruncated(bool t) { m_is_truncated = t; }
bool GetIsTruncated() const { return m_is_truncated; }
- ReadBufferAndDumpToStreamOptions &SetLanguage(lldb::LanguageType l) {
- m_language_type = l;
- return *this;
- }
-
- lldb::LanguageType GetLanguage() const
+ void SetLanguage(lldb::LanguageType l) { m_language_type = l; }
- {
- return m_language_type;
- }
+ lldb::LanguageType GetLanguage() const { return m_language_type; }
private:
DataExtractor m_data;
OpenPOWER on IntegriCloud