From 16c92083ab87bc41cddc1aafca7babb5b571ebe4 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246376 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/AArch64/AArch64InstrInfo.cpp | 4 ++-- lib/Target/PowerPC/PPCInstrInfo.cpp | 4 ++-- lib/Target/X86/X86InstrInfo.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Target/AArch64/AArch64InstrInfo.cpp b/lib/Target/AArch64/AArch64InstrInfo.cpp index f0e02489ae3..2013f8beace 100644 --- a/lib/Target/AArch64/AArch64InstrInfo.cpp +++ b/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/lib/Target/PowerPC/PPCInstrInfo.cpp b/lib/Target/PowerPC/PPCInstrInfo.cpp index 358beaf5bf6..79c399b71ae 100644 --- a/lib/Target/PowerPC/PPCInstrInfo.cpp +++ b/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/lib/Target/X86/X86InstrInfo.cpp b/lib/Target/X86/X86InstrInfo.cpp index 44c16a2b2f7..be4f6c72320 100644 --- a/lib/Target/X86/X86InstrInfo.cpp +++ b/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"}, -- 2.34.1