Skip to content

Commit 6dd67fe

Browse files
[lldb] Remove unused API CompilerType::GetIndexOfFieldWithName
1 parent b9ce185 commit 6dd67fe

File tree

3 files changed

+0
-46
lines changed

3 files changed

+0
-46
lines changed

lldb/include/lldb/Symbol/CompilerType.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -433,12 +433,6 @@ class CompilerType {
433433

434434
CompilerDecl GetStaticFieldWithName(llvm::StringRef name) const;
435435

436-
uint32_t GetIndexOfFieldWithName(const char *name,
437-
CompilerType *field_compiler_type = nullptr,
438-
uint64_t *bit_offset_ptr = nullptr,
439-
uint32_t *bitfield_bit_size_ptr = nullptr,
440-
bool *is_bitfield_ptr = nullptr) const;
441-
442436
llvm::Expected<CompilerType> GetChildCompilerTypeAtIndex(
443437
ExecutionContext *exe_ctx, size_t idx, bool transparent_pointers,
444438
bool omit_empty_base_classes, bool ignore_array_bounds,

lldb/source/Symbol/CompilerType.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -893,25 +893,6 @@ CompilerDecl CompilerType::GetStaticFieldWithName(llvm::StringRef name) const {
893893
return CompilerDecl();
894894
}
895895

896-
uint32_t CompilerType::GetIndexOfFieldWithName(
897-
const char *name, CompilerType *field_compiler_type_ptr,
898-
uint64_t *bit_offset_ptr, uint32_t *bitfield_bit_size_ptr,
899-
bool *is_bitfield_ptr) const {
900-
unsigned count = GetNumFields();
901-
std::string field_name;
902-
for (unsigned index = 0; index < count; index++) {
903-
CompilerType field_compiler_type(
904-
GetFieldAtIndex(index, field_name, bit_offset_ptr,
905-
bitfield_bit_size_ptr, is_bitfield_ptr));
906-
if (strcmp(field_name.c_str(), name) == 0) {
907-
if (field_compiler_type_ptr)
908-
*field_compiler_type_ptr = field_compiler_type;
909-
return index;
910-
}
911-
}
912-
return UINT32_MAX;
913-
}
914-
915896
llvm::Expected<CompilerType> CompilerType::GetChildCompilerTypeAtIndex(
916897
ExecutionContext *exe_ctx, size_t idx, bool transparent_pointers,
917898
bool omit_empty_base_classes, bool ignore_array_bounds,

lldb/unittests/Platform/PlatformSiginfoTest.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -50,27 +50,6 @@ class PlatformSiginfoTest : public ::testing::Test {
5050

5151
typedef std::tuple<const char *, uint64_t, uint64_t> field_tuple;
5252

53-
void ExpectField(const CompilerType &siginfo_type, field_tuple field) {
54-
const char *path;
55-
uint64_t offset, size;
56-
std::tie(path, offset, size) = field;
57-
58-
SCOPED_TRACE(path);
59-
CompilerType field_type = siginfo_type;
60-
uint64_t total_offset = 0;
61-
for (auto field_name : llvm::split(path, '.')) {
62-
uint64_t bit_offset;
63-
ASSERT_NE(field_type.GetIndexOfFieldWithName(field_name.str().c_str(),
64-
&field_type, &bit_offset),
65-
UINT32_MAX);
66-
total_offset += bit_offset;
67-
}
68-
69-
EXPECT_EQ(total_offset, offset * 8);
70-
EXPECT_EQ(llvm::expectedToOptional(field_type.GetByteSize(nullptr)),
71-
std::optional<uint64_t>(size));
72-
}
73-
7453
void ExpectFields(const CompilerType &container,
7554
std::initializer_list<field_tuple> fields) {
7655
for (auto x : fields)

0 commit comments

Comments
 (0)