[llvm] r186309 - Add const qualifier to some static arrays.
Craig Topper
craig.topper at gmail.com
Mon Jul 15 00:02:45 PDT 2013
Author: ctopper
Date: Mon Jul 15 02:02:45 2013
New Revision: 186309
URL: http://llvm.org/viewvc/llvm-project?rev=186309&view=rev
Log:
Add const qualifier to some static arrays.
Modified:
llvm/trunk/lib/Target/AArch64/AArch64FrameLowering.cpp
llvm/trunk/lib/Target/AArch64/AArch64FrameLowering.h
Modified: llvm/trunk/lib/Target/AArch64/AArch64FrameLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64FrameLowering.cpp?rev=186309&r1=186308&r2=186309&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64FrameLowering.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64FrameLowering.cpp Mon Jul 15 02:02:45 2013
@@ -425,7 +425,7 @@ AArch64FrameLowering::emitFrameMemOps(bo
MachineBasicBlock::iterator MBBI,
const std::vector<CalleeSavedInfo> &CSI,
const TargetRegisterInfo *TRI,
- LoadStoreMethod PossClasses[],
+ const LoadStoreMethod PossClasses[],
unsigned NumClasses) const {
DebugLoc DL = MBB.findDebugLoc(MBBI);
MachineFunction &MF = *MBB.getParent();
@@ -528,11 +528,11 @@ AArch64FrameLowering::spillCalleeSavedRe
if (CSI.empty())
return false;
- static LoadStoreMethod PossibleClasses[] = {
+ static const LoadStoreMethod PossibleClasses[] = {
{&AArch64::GPR64RegClass, AArch64::LSPair64_STR, AArch64::LS64_STR},
{&AArch64::FPR64RegClass, AArch64::LSFPPair64_STR, AArch64::LSFP64_STR},
};
- unsigned NumClasses = llvm::array_lengthof(PossibleClasses);
+ const unsigned NumClasses = llvm::array_lengthof(PossibleClasses);
emitFrameMemOps(/* isPrologue = */ true, MBB, MBBI, CSI, TRI,
PossibleClasses, NumClasses);
@@ -549,11 +549,11 @@ AArch64FrameLowering::restoreCalleeSaved
if (CSI.empty())
return false;
- static LoadStoreMethod PossibleClasses[] = {
+ static const LoadStoreMethod PossibleClasses[] = {
{&AArch64::GPR64RegClass, AArch64::LSPair64_LDR, AArch64::LS64_LDR},
{&AArch64::FPR64RegClass, AArch64::LSFPPair64_LDR, AArch64::LSFP64_LDR},
};
- unsigned NumClasses = llvm::array_lengthof(PossibleClasses);
+ const unsigned NumClasses = llvm::array_lengthof(PossibleClasses);
emitFrameMemOps(/* isPrologue = */ false, MBB, MBBI, CSI, TRI,
PossibleClasses, NumClasses);
Modified: llvm/trunk/lib/Target/AArch64/AArch64FrameLowering.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64FrameLowering.h?rev=186309&r1=186308&r2=186309&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64FrameLowering.h (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64FrameLowering.h Mon Jul 15 02:02:45 2013
@@ -90,7 +90,7 @@ public:
MachineBasicBlock::iterator MI,
const std::vector<CalleeSavedInfo> &CSI,
const TargetRegisterInfo *TRI,
- LoadStoreMethod PossibleClasses[],
+ const LoadStoreMethod PossibleClasses[],
unsigned NumClasses) const;
More information about the llvm-commits
mailing list