diff --git a/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h b/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h index 8f34cf054fe28..e0ccba4d6a59e 100644 --- a/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h +++ b/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h @@ -700,8 +700,8 @@ AArch64StringToVectorLayout(StringRef LayoutStr) { namespace AArch64SysReg { struct SysReg { - const char *Name; - const char *AltName; + const char Name[32]; + const char AltName[32]; unsigned Encoding; bool Readable; bool Writeable; diff --git a/llvm/lib/Target/ARM/Utils/ARMBaseInfo.h b/llvm/lib/Target/ARM/Utils/ARMBaseInfo.h index 56a925f09ea7a..5562572c5abf4 100644 --- a/llvm/lib/Target/ARM/Utils/ARMBaseInfo.h +++ b/llvm/lib/Target/ARM/Utils/ARMBaseInfo.h @@ -189,7 +189,7 @@ inline static unsigned ARMCondCodeFromString(StringRef CC) { // System Registers namespace ARMSysReg { struct MClassSysReg { - const char *Name; + const char Name[32]; uint16_t M1Encoding12; uint16_t M2M3Encoding8; uint16_t Encoding; diff --git a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h index 9e36d62352ae5..fe28195654fde 100644 --- a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h +++ b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h @@ -449,9 +449,9 @@ int getLoadFPImm(APFloat FPImm); namespace RISCVSysReg { struct SysReg { - const char *Name; - const char *AltName; - const char *DeprecatedName; + const char Name[32]; + const char AltName[32]; + const char DeprecatedName[32]; unsigned Encoding; // FIXME: add these additional fields when needed. // Privilege Access: Read, Write, Read-Only.