Skip to content

Commit b6e2cf3

Browse files
committed
[lldb][NFC] Remove ability to pass a custom printf format to DataExtractor::PutToLog
This is luckily not used anywhere.
1 parent 5ee8e67 commit b6e2cf3

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

lldb/include/lldb/Utility/DataExtractor.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,16 +188,11 @@ class DataExtractor {
188188
/// The type of objects to use when dumping data from this
189189
/// object. See DataExtractor::Type.
190190
///
191-
/// \param[in] type_format
192-
/// The optional format to use for the \a type objects. If this
193-
/// is nullptr, the default format for the \a type will be used.
194-
///
195191
/// \return
196192
/// The offset at which dumping ended.
197193
lldb::offset_t PutToLog(Log *log, lldb::offset_t offset,
198194
lldb::offset_t length, uint64_t base_addr,
199-
uint32_t num_per_line, Type type,
200-
const char *type_format = nullptr) const;
195+
uint32_t num_per_line, Type type) const;
201196

202197
/// Extract an arbitrary number of bytes in the specified byte order.
203198
///

lldb/source/Utility/DataExtractor.cpp

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -985,8 +985,7 @@ uint32_t DataExtractor::Skip_LEB128(offset_t *offset_ptr) const {
985985
lldb::offset_t DataExtractor::PutToLog(Log *log, offset_t start_offset,
986986
offset_t length, uint64_t base_addr,
987987
uint32_t num_per_line,
988-
DataExtractor::Type type,
989-
const char *format) const {
988+
DataExtractor::Type type) const {
990989
if (log == nullptr)
991990
return start_offset;
992991

@@ -1010,29 +1009,29 @@ lldb::offset_t DataExtractor::PutToLog(Log *log, offset_t start_offset,
10101009

10111010
switch (type) {
10121011
case TypeUInt8:
1013-
sstr.Printf(format ? format : " %2.2x", GetU8(&offset));
1012+
sstr.Printf(" %2.2x", GetU8(&offset));
10141013
break;
10151014
case TypeChar: {
10161015
char ch = GetU8(&offset);
1017-
sstr.Printf(format ? format : " %c", isprint(ch) ? ch : ' ');
1016+
sstr.Printf(" %c", isprint(ch) ? ch : ' ');
10181017
} break;
10191018
case TypeUInt16:
1020-
sstr.Printf(format ? format : " %4.4x", GetU16(&offset));
1019+
sstr.Printf(" %4.4x", GetU16(&offset));
10211020
break;
10221021
case TypeUInt32:
1023-
sstr.Printf(format ? format : " %8.8x", GetU32(&offset));
1022+
sstr.Printf(" %8.8x", GetU32(&offset));
10241023
break;
10251024
case TypeUInt64:
1026-
sstr.Printf(format ? format : " %16.16" PRIx64, GetU64(&offset));
1025+
sstr.Printf(" %16.16" PRIx64, GetU64(&offset));
10271026
break;
10281027
case TypePointer:
1029-
sstr.Printf(format ? format : " 0x%" PRIx64, GetAddress(&offset));
1028+
sstr.Printf(" 0x%" PRIx64, GetAddress(&offset));
10301029
break;
10311030
case TypeULEB128:
1032-
sstr.Printf(format ? format : " 0x%" PRIx64, GetULEB128(&offset));
1031+
sstr.Printf(" 0x%" PRIx64, GetULEB128(&offset));
10331032
break;
10341033
case TypeSLEB128:
1035-
sstr.Printf(format ? format : " %" PRId64, GetSLEB128(&offset));
1034+
sstr.Printf(" %" PRId64, GetSLEB128(&offset));
10361035
break;
10371036
}
10381037
}

0 commit comments

Comments
 (0)