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

llvm-svn: 268389
  • Loading branch information
jyknight committed May 3, 2016
1 parent d8dfdfd commit ef31eaf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion llvm/lib/Target/Sparc/SparcISelLowering.cpp
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 llvm/lib/Target/Sparc/SparcISelLowering.h
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 llvm/lib/Target/Sparc/SparcSubtarget.cpp
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 llvm/lib/Target/Sparc/SparcSubtarget.h
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 ef31eaf

Please sign in to comment.