Skip to content

Commit f9ac13a

Browse files
committed
[lldb] Remove remaining calls to DataBufferLLVM::GetChars
Update the Linux and NetBSD Host libraries for 2165c36 which removed DataBufferLLVM::GetChars. These files are compiled conditionally based on the host platform.
1 parent 2165c36 commit f9ac13a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

lldb/source/Host/linux/Host.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ static ArchSpec GetELFProcessCPUType(llvm::StringRef exe_path) {
133133
if (!buffer_sp)
134134
return ArchSpec();
135135

136-
uint8_t exe_class =
137-
llvm::object::getElfArchType(
138-
{buffer_sp->GetChars(), size_t(buffer_sp->GetByteSize())})
139-
.first;
136+
uint8_t exe_class = llvm::object::getElfArchType(
137+
{reinterpret_cast<char *>(buffer_sp->GetBytes()),
138+
size_t(buffer_sp->GetByteSize())})
139+
.first;
140140

141141
switch (exe_class) {
142142
case llvm::ELF::ELFCLASS32:

lldb/source/Host/netbsd/HostNetBSD.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ static bool GetNetBSDProcessCPUType(ProcessInstanceInfo &process_info) {
108108
auto buffer_sp = FileSystem::Instance().CreateDataBuffer(
109109
process_info.GetExecutableFile(), 0x20, 0);
110110
if (buffer_sp) {
111-
uint8_t exe_class =
112-
llvm::object::getElfArchType(
113-
{buffer_sp->GetChars(), size_t(buffer_sp->GetByteSize())})
114-
.first;
111+
uint8_t exe_class = llvm::object::getElfArchType(
112+
{reinterpret_cast<char *>(buffer_sp->GetBytes()),
113+
size_t(buffer_sp->GetByteSize())})
114+
.first;
115115

116116
switch (exe_class) {
117117
case llvm::ELF::ELFCLASS32:

0 commit comments

Comments
 (0)