Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions lldb/include/lldb/Symbol/CompilerType.h
Original file line number Diff line number Diff line change
Expand Up @@ -464,12 +464,6 @@ class CompilerType {

CompilerDecl GetStaticFieldWithName(llvm::StringRef name) const;

uint32_t GetIndexOfFieldWithName(const char *name,
CompilerType *field_compiler_type = nullptr,
uint64_t *bit_offset_ptr = nullptr,
uint32_t *bitfield_bit_size_ptr = nullptr,
bool *is_bitfield_ptr = nullptr) const;

llvm::Expected<CompilerType> GetChildCompilerTypeAtIndex(
ExecutionContext *exe_ctx, size_t idx, bool transparent_pointers,
bool omit_empty_base_classes, bool ignore_array_bounds,
Expand Down
19 changes: 0 additions & 19 deletions lldb/source/Symbol/CompilerType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -941,25 +941,6 @@ CompilerDecl CompilerType::GetStaticFieldWithName(llvm::StringRef name) const {
return CompilerDecl();
}

uint32_t CompilerType::GetIndexOfFieldWithName(
const char *name, CompilerType *field_compiler_type_ptr,
uint64_t *bit_offset_ptr, uint32_t *bitfield_bit_size_ptr,
bool *is_bitfield_ptr) const {
unsigned count = GetNumFields();
std::string field_name;
for (unsigned index = 0; index < count; index++) {
CompilerType field_compiler_type(
GetFieldAtIndex(index, field_name, bit_offset_ptr,
bitfield_bit_size_ptr, is_bitfield_ptr));
if (strcmp(field_name.c_str(), name) == 0) {
if (field_compiler_type_ptr)
*field_compiler_type_ptr = field_compiler_type;
return index;
}
}
return UINT32_MAX;
}

llvm::Expected<CompilerType> CompilerType::GetChildCompilerTypeAtIndex(
ExecutionContext *exe_ctx, size_t idx, bool transparent_pointers,
bool omit_empty_base_classes, bool ignore_array_bounds,
Expand Down
9 changes: 6 additions & 3 deletions lldb/unittests/Platform/PlatformSiginfoTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,12 @@ class PlatformSiginfoTest : public ::testing::Test {
uint64_t total_offset = 0;
for (auto field_name : llvm::split(path, '.')) {
uint64_t bit_offset;
ASSERT_NE(field_type.GetIndexOfFieldWithName(field_name.str().c_str(),
&field_type, &bit_offset),
UINT32_MAX);
std::string name;
lldb_private::ExecutionContext exe_ctx{};
field_type = field_type.GetFieldAtIndex(
field_type.GetIndexOfChildWithName(field_name, &exe_ctx, false), name,
&bit_offset, nullptr, nullptr);
ASSERT_TRUE(field_type);
total_offset += bit_offset;
}

Expand Down