Skip to content

Commit e1acbc3

Browse files
authored
PPC: Use StringRef for subtarget constructor arguments (#157409)
1 parent 75fe619 commit e1acbc3

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

llvm/lib/Target/PowerPC/PPCSubtarget.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,8 @@ PPCSubtarget &PPCSubtarget::initializeSubtargetDependencies(StringRef CPU,
5252
return *this;
5353
}
5454

55-
PPCSubtarget::PPCSubtarget(const Triple &TT, const std::string &CPU,
56-
const std::string &TuneCPU, const std::string &FS,
57-
const PPCTargetMachine &TM)
55+
PPCSubtarget::PPCSubtarget(const Triple &TT, StringRef CPU, StringRef TuneCPU,
56+
StringRef FS, const PPCTargetMachine &TM)
5857
: PPCGenSubtargetInfo(TT, CPU, TuneCPU, FS),
5958
IsPPC64(getTargetTriple().getArch() == Triple::ppc64 ||
6059
getTargetTriple().getArch() == Triple::ppc64le),

llvm/lib/Target/PowerPC/PPCSubtarget.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ class PPCSubtarget : public PPCGenSubtargetInfo {
116116
/// This constructor initializes the data members to match that
117117
/// of the specified triple.
118118
///
119-
PPCSubtarget(const Triple &TT, const std::string &CPU,
120-
const std::string &TuneCPU, const std::string &FS,
119+
PPCSubtarget(const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS,
121120
const PPCTargetMachine &TM);
122121

123122
~PPCSubtarget() override;

0 commit comments

Comments
 (0)