Skip to content

Commit a7dee14

Browse files
committed
PPC: Fix missing const on TargetInstrInfo's subtarget reference
1 parent 811538e commit a7dee14

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/lib/Target/PowerPC/PPCInstrInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ static cl::opt<bool> EnableFMARegPressureReduction(
8888
// Pin the vtable to this file.
8989
void PPCInstrInfo::anchor() {}
9090

91-
PPCInstrInfo::PPCInstrInfo(PPCSubtarget &STI)
91+
PPCInstrInfo::PPCInstrInfo(const PPCSubtarget &STI)
9292
: PPCGenInstrInfo(PPC::ADJCALLSTACKDOWN, PPC::ADJCALLSTACKUP,
9393
/* CatchRetOpcode */ -1,
9494
STI.isPPC64() ? PPC::BLR8 : PPC::BLR),

llvm/lib/Target/PowerPC/PPCInstrInfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ enum PPCMachineCombinerPattern : unsigned {
279279

280280
class PPCSubtarget;
281281
class PPCInstrInfo : public PPCGenInstrInfo {
282-
PPCSubtarget &Subtarget;
282+
const PPCSubtarget &Subtarget;
283283
const PPCRegisterInfo RI;
284284
const unsigned StoreSpillOpcodesArray[4][SOK_LastOpcodeSpill] =
285285
StoreOpcodesForSpill;
@@ -369,7 +369,7 @@ class PPCInstrInfo : public PPCGenInstrInfo {
369369
unsigned OpIdx2) const override;
370370

371371
public:
372-
explicit PPCInstrInfo(PPCSubtarget &STI);
372+
explicit PPCInstrInfo(const PPCSubtarget &STI);
373373

374374
bool isLoadFromConstantPool(MachineInstr *I) const;
375375
const Constant *getConstantFromConstantPool(MachineInstr *I) const;

0 commit comments

Comments
 (0)