From 982e8d48f82d86d6d3030845e01a94de65ee7f2c Mon Sep 17 00:00:00 2001 From: Hal Finkel Date: Sun, 30 Aug 2015 08:07:29 +0000 Subject: [PATCH] [MIR Serialization] static -> static const in getSerializable*MachineOperandTargetFlags Make the arrays 'static const' instead of just 'static'. Post-commit review comment from Roman Divacky on IRC. NFC. llvm-svn: 246376 --- llvm/lib/Target/AArch64/AArch64InstrInfo.cpp | 4 ++-- llvm/lib/Target/PowerPC/PPCInstrInfo.cpp | 4 ++-- llvm/lib/Target/X86/X86InstrInfo.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp index f0e02489ae3f..2013f8beace0 100644 --- a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp +++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp @@ -2988,7 +2988,7 @@ AArch64InstrInfo::decomposeMachineOperandsTargetFlags(unsigned TF) const { ArrayRef> AArch64InstrInfo::getSerializableDirectMachineOperandTargetFlags() const { using namespace AArch64II; - static std::pair TargetFlags[] = { + static const std::pair TargetFlags[] = { {MO_PAGE, "aarch64-page"}, {MO_PAGEOFF, "aarch64-pageoff"}, {MO_G3, "aarch64-g3"}, @@ -3002,7 +3002,7 @@ AArch64InstrInfo::getSerializableDirectMachineOperandTargetFlags() const { ArrayRef> AArch64InstrInfo::getSerializableBitmaskMachineOperandTargetFlags() const { using namespace AArch64II; - static std::pair TargetFlags[] = { + static const std::pair TargetFlags[] = { {MO_GOT, "aarch64-got"}, {MO_NC, "aarch64-nc"}, {MO_TLS, "aarch64-tls"}, diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp b/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp index 358beaf5bf6b..79c399b71ae8 100644 --- a/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp +++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp @@ -2001,7 +2001,7 @@ PPCInstrInfo::decomposeMachineOperandsTargetFlags(unsigned TF) const { ArrayRef> PPCInstrInfo::getSerializableDirectMachineOperandTargetFlags() const { using namespace PPCII; - static std::pair TargetFlags[] = { + static const std::pair TargetFlags[] = { {MO_LO, "ppc-lo"}, {MO_HA, "ppc-ha"}, {MO_TPREL_LO, "ppc-tprel-lo"}, @@ -2016,7 +2016,7 @@ PPCInstrInfo::getSerializableDirectMachineOperandTargetFlags() const { ArrayRef> PPCInstrInfo::getSerializableBitmaskMachineOperandTargetFlags() const { using namespace PPCII; - static std::pair TargetFlags[] = { + static const std::pair TargetFlags[] = { {MO_PLT_OR_STUB, "ppc-plt-or-stub"}, {MO_PIC_FLAG, "ppc-pic"}, {MO_NLP_FLAG, "ppc-nlp"}, diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp index 44c16a2b2f7f..be4f6c723201 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.cpp +++ b/llvm/lib/Target/X86/X86InstrInfo.cpp @@ -6654,7 +6654,7 @@ X86InstrInfo::decomposeMachineOperandsTargetFlags(unsigned TF) const { ArrayRef> X86InstrInfo::getSerializableDirectMachineOperandTargetFlags() const { using namespace X86II; - static std::pair TargetFlags[] = { + static const std::pair TargetFlags[] = { {MO_GOT_ABSOLUTE_ADDRESS, "x86-got-absolute-address"}, {MO_PIC_BASE_OFFSET, "x86-pic-base-offset"}, {MO_GOT, "x86-got"},