Skip to content

Commit

Permalink
[Sparc] Constification of TargetMachine arguments
Browse files Browse the repository at this point in the history
This patch changes the TargetMachine arguments to be const. This is
required for {D19265}, and was requested to be done in a separate patch.

Patch by Jacob Hansen!

Differential Revision: http://reviews.llvm.org/D19797

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268389 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
jyknight committed May 3, 2016
1 parent 1f8afe4 commit 0e6cb51
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/Target/Sparc/SparcISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1448,7 +1448,7 @@ static SPCC::CondCodes FPCondCCodeToFCC(ISD::CondCode CC) {
}
}

SparcTargetLowering::SparcTargetLowering(TargetMachine &TM,
SparcTargetLowering::SparcTargetLowering(const TargetMachine &TM,
const SparcSubtarget &STI)
: TargetLowering(TM), Subtarget(&STI) {
MVT PtrVT = MVT::getIntegerVT(8 * TM.getPointerSize());
Expand Down
2 changes: 1 addition & 1 deletion lib/Target/Sparc/SparcISelLowering.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ namespace llvm {
class SparcTargetLowering : public TargetLowering {
const SparcSubtarget *Subtarget;
public:
SparcTargetLowering(TargetMachine &TM, const SparcSubtarget &STI);
SparcTargetLowering(const TargetMachine &TM, const SparcSubtarget &STI);
SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const override;

/// computeKnownBitsForTargetNode - Determine which of the bits specified
Expand Down
2 changes: 1 addition & 1 deletion lib/Target/Sparc/SparcSubtarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ SparcSubtarget &SparcSubtarget::initializeSubtargetDependencies(StringRef CPU,
}

SparcSubtarget::SparcSubtarget(const Triple &TT, const std::string &CPU,
const std::string &FS, TargetMachine &TM,
const std::string &FS, const TargetMachine &TM,
bool is64Bit)
: SparcGenSubtargetInfo(TT, CPU, FS), TargetTriple(TT), Is64Bit(is64Bit),
InstrInfo(initializeSubtargetDependencies(CPU, FS)), TLInfo(TM, *this),
Expand Down
2 changes: 1 addition & 1 deletion lib/Target/Sparc/SparcSubtarget.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class SparcSubtarget : public SparcGenSubtargetInfo {

public:
SparcSubtarget(const Triple &TT, const std::string &CPU,
const std::string &FS, TargetMachine &TM, bool is64bit);
const std::string &FS, const TargetMachine &TM, bool is64bit);

const SparcInstrInfo *getInstrInfo() const override { return &InstrInfo; }
const TargetFrameLowering *getFrameLowering() const override {
Expand Down

0 comments on commit 0e6cb51

Please sign in to comment.