[lldb] Silence warnings about unused static variables in RegisterInfos_arm64.h

Move them to the only source file that included RegisterInfos_arm64.h
that actually used these variables.

This silences warnings like these:

    In file included from lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp:42:
    lldb/source/Plugins/Process/Utility/RegisterInfos_arm64.h:790:35: warning: ‘g_register_infos_mte’ defined but not used [-Wunused-variable]
      790 | static lldb_private::RegisterInfo g_register_infos_mte[] = {
          |                                   ^~~~~~~~~~~~~~~~~~~~
    lldb/source/Plugins/Process/Utility/RegisterInfos_arm64.h:787:35: warning: ‘g_register_infos_pauth’ defined but not used [-Wunused-variable]
      787 | static lldb_private::RegisterInfo g_register_infos_pauth[] = {
          |                                   ^~~~~~~~~~~~~~~~~~~~~~

Differential Revision: https://reviews.llvm.org/D123206
This commit is contained in:
Martin Storsjö 2022-04-06 14:13:54 +03:00
parent 28cb508195
commit 373d08adb4
2 changed files with 6 additions and 5 deletions

View File

@ -72,6 +72,12 @@
#include "RegisterInfos_arm64_sve.h"
#undef DECLARE_REGISTER_INFOS_ARM64_STRUCT
static lldb_private::RegisterInfo g_register_infos_pauth[] = {
DEFINE_EXTENSION_REG(data_mask), DEFINE_EXTENSION_REG(code_mask)};
static lldb_private::RegisterInfo g_register_infos_mte[] = {
DEFINE_EXTENSION_REG(mte_ctrl)};
// Number of register sets provided by this context.
enum {
k_num_gpr_registers = gpr_w28 - gpr_x0 + 1,

View File

@ -784,10 +784,5 @@ static lldb_private::RegisterInfo g_register_infos_arm64_le[] = {
{DEFINE_DBG(wcr, 15)}
};
// clang-format on
static lldb_private::RegisterInfo g_register_infos_pauth[] = {
DEFINE_EXTENSION_REG(data_mask), DEFINE_EXTENSION_REG(code_mask)};
static lldb_private::RegisterInfo g_register_infos_mte[] = {
DEFINE_EXTENSION_REG(mte_ctrl)};
#endif // DECLARE_REGISTER_INFOS_ARM64_STRUCT