Skip to content

Commit a722dea

Browse files
committed
[lldb] Update reinterpret_cast in linux/Host.cpp
Fixes error: reinterpret_cast from type ‘const uint8_t*’ {aka ‘const unsigned char*’} to type ‘char*’ casts away qualifiers
1 parent b4ad3c3 commit a722dea

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lldb/source/Host/linux/Host.cpp

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

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

141142
switch (exe_class) {
142143
case llvm::ELF::ELFCLASS32:

0 commit comments

Comments
 (0)