diff options
Diffstat (limited to 'lldb/source/Plugins/ABI/ARM/ABISysV_arm.cpp')
| -rw-r--r-- | lldb/source/Plugins/ABI/ARM/ABISysV_arm.cpp | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/lldb/source/Plugins/ABI/ARM/ABISysV_arm.cpp b/lldb/source/Plugins/ABI/ARM/ABISysV_arm.cpp index 1a93bac564f7..26b3152bed16 100644 --- a/lldb/source/Plugins/ABI/ARM/ABISysV_arm.cpp +++ b/lldb/source/Plugins/ABI/ARM/ABISysV_arm.cpp @@ -36,7 +36,7 @@ using namespace lldb_private; LLDB_PLUGIN_DEFINE(ABISysV_arm) -static RegisterInfo g_register_infos[] = { +static const RegisterInfo g_register_infos[] = { // NAME ALT SZ OFF ENCODING FORMAT EH_FRAME // DWARF GENERIC PROCESS PLUGIN // LLDB NATIVE VALUE REGS INVALIDATE REGS @@ -1295,24 +1295,9 @@ static RegisterInfo g_register_infos[] = { static const uint32_t k_num_register_infos = llvm::array_lengthof(g_register_infos); -static bool g_register_info_names_constified = false; const lldb_private::RegisterInfo * ABISysV_arm::GetRegisterInfoArray(uint32_t &count) { - // Make the C-string names and alt_names for the register infos into const - // C-string values by having the ConstString unique the names in the global - // constant C-string pool. - if (!g_register_info_names_constified) { - g_register_info_names_constified = true; - for (uint32_t i = 0; i < k_num_register_infos; ++i) { - if (g_register_infos[i].name) - g_register_infos[i].name = - ConstString(g_register_infos[i].name).GetCString(); - if (g_register_infos[i].alt_name) - g_register_infos[i].alt_name = - ConstString(g_register_infos[i].alt_name).GetCString(); - } - } count = k_num_register_infos; return g_register_infos; } @@ -1718,7 +1703,7 @@ ValueObjectSP ABISysV_arm::GetReturnValueObjectImpl( if (homogeneous_count > 0 && homogeneous_count <= 4) { llvm::Optional<uint64_t> base_byte_size = - base_type.GetByteSize(nullptr); + base_type.GetByteSize(&thread); if (base_type.IsVectorType(nullptr, nullptr)) { if (base_byte_size && (*base_byte_size == 8 || *base_byte_size == 16)) { @@ -1747,7 +1732,7 @@ ValueObjectSP ABISysV_arm::GetReturnValueObjectImpl( if (base_type.IsFloatingPointType(float_count, is_complex)) { llvm::Optional<uint64_t> base_byte_size = - base_type.GetByteSize(nullptr); + base_type.GetByteSize(&thread); if (float_count == 2 && is_complex) { if (index != 0 && base_byte_size && vfp_byte_size != *base_byte_size) |
