diff options
author | Raphael Isemann <teemperor@gmail.com> | 2019-12-06 09:44:50 +0100 |
---|---|---|
committer | Raphael Isemann <teemperor@gmail.com> | 2019-12-06 10:27:45 +0100 |
commit | b6e2cf3270dab43dbc6ffad4695c5c14789bc5e5 (patch) | |
tree | 6dbf9f705bfcb89c0815dad12fd27b689ef93631 | |
parent | 5ee8e673135891072789f0f9bf14a5d82f0f8e01 (diff) | |
download | bcm5719-llvm-b6e2cf3270dab43dbc6ffad4695c5c14789bc5e5.tar.gz bcm5719-llvm-b6e2cf3270dab43dbc6ffad4695c5c14789bc5e5.zip |
[lldb][NFC] Remove ability to pass a custom printf format to DataExtractor::PutToLog
This is luckily not used anywhere.
-rw-r--r-- | lldb/include/lldb/Utility/DataExtractor.h | 7 | ||||
-rw-r--r-- | lldb/source/Utility/DataExtractor.cpp | 19 |
2 files changed, 10 insertions, 16 deletions
diff --git a/lldb/include/lldb/Utility/DataExtractor.h b/lldb/include/lldb/Utility/DataExtractor.h index 333baf9fd34..bf0d1055cf4 100644 --- a/lldb/include/lldb/Utility/DataExtractor.h +++ b/lldb/include/lldb/Utility/DataExtractor.h @@ -188,16 +188,11 @@ public: /// The type of objects to use when dumping data from this /// object. See DataExtractor::Type. /// - /// \param[in] type_format - /// The optional format to use for the \a type objects. If this - /// is nullptr, the default format for the \a type will be used. - /// /// \return /// The offset at which dumping ended. lldb::offset_t PutToLog(Log *log, lldb::offset_t offset, lldb::offset_t length, uint64_t base_addr, - uint32_t num_per_line, Type type, - const char *type_format = nullptr) const; + uint32_t num_per_line, Type type) const; /// Extract an arbitrary number of bytes in the specified byte order. /// diff --git a/lldb/source/Utility/DataExtractor.cpp b/lldb/source/Utility/DataExtractor.cpp index 4e45baf3aa4..ea4fb09bdaa 100644 --- a/lldb/source/Utility/DataExtractor.cpp +++ b/lldb/source/Utility/DataExtractor.cpp @@ -985,8 +985,7 @@ uint32_t DataExtractor::Skip_LEB128(offset_t *offset_ptr) const { lldb::offset_t DataExtractor::PutToLog(Log *log, offset_t start_offset, offset_t length, uint64_t base_addr, uint32_t num_per_line, - DataExtractor::Type type, - const char *format) const { + DataExtractor::Type type) const { if (log == nullptr) return start_offset; @@ -1010,29 +1009,29 @@ lldb::offset_t DataExtractor::PutToLog(Log *log, offset_t start_offset, switch (type) { case TypeUInt8: - sstr.Printf(format ? format : " %2.2x", GetU8(&offset)); + sstr.Printf(" %2.2x", GetU8(&offset)); break; case TypeChar: { char ch = GetU8(&offset); - sstr.Printf(format ? format : " %c", isprint(ch) ? ch : ' '); + sstr.Printf(" %c", isprint(ch) ? ch : ' '); } break; case TypeUInt16: - sstr.Printf(format ? format : " %4.4x", GetU16(&offset)); + sstr.Printf(" %4.4x", GetU16(&offset)); break; case TypeUInt32: - sstr.Printf(format ? format : " %8.8x", GetU32(&offset)); + sstr.Printf(" %8.8x", GetU32(&offset)); break; case TypeUInt64: - sstr.Printf(format ? format : " %16.16" PRIx64, GetU64(&offset)); + sstr.Printf(" %16.16" PRIx64, GetU64(&offset)); break; case TypePointer: - sstr.Printf(format ? format : " 0x%" PRIx64, GetAddress(&offset)); + sstr.Printf(" 0x%" PRIx64, GetAddress(&offset)); break; case TypeULEB128: - sstr.Printf(format ? format : " 0x%" PRIx64, GetULEB128(&offset)); + sstr.Printf(" 0x%" PRIx64, GetULEB128(&offset)); break; case TypeSLEB128: - sstr.Printf(format ? format : " %" PRId64, GetSLEB128(&offset)); + sstr.Printf(" %" PRId64, GetSLEB128(&offset)); break; } } |