https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/157409
None >From ac19605eb9b39362c28433d1cada25f50dbe2ebb Mon Sep 17 00:00:00 2001 From: Matt Arsenault <[email protected]> Date: Mon, 8 Sep 2025 18:41:41 +0900 Subject: [PATCH] PPC: Use StringRef for subtarget constructor arguments --- llvm/lib/Target/PowerPC/PPCSubtarget.cpp | 5 ++--- llvm/lib/Target/PowerPC/PPCSubtarget.h | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp b/llvm/lib/Target/PowerPC/PPCSubtarget.cpp index 5f80929e86f99..736ba1edcaea6 100644 --- a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp +++ b/llvm/lib/Target/PowerPC/PPCSubtarget.cpp @@ -52,9 +52,8 @@ PPCSubtarget &PPCSubtarget::initializeSubtargetDependencies(StringRef CPU, return *this; } -PPCSubtarget::PPCSubtarget(const Triple &TT, const std::string &CPU, - const std::string &TuneCPU, const std::string &FS, - const PPCTargetMachine &TM) +PPCSubtarget::PPCSubtarget(const Triple &TT, StringRef CPU, StringRef TuneCPU, + StringRef FS, const PPCTargetMachine &TM) : PPCGenSubtargetInfo(TT, CPU, TuneCPU, FS), IsPPC64(getTargetTriple().getArch() == Triple::ppc64 || getTargetTriple().getArch() == Triple::ppc64le), diff --git a/llvm/lib/Target/PowerPC/PPCSubtarget.h b/llvm/lib/Target/PowerPC/PPCSubtarget.h index 17d9d2ab402be..c17fca7f70a3c 100644 --- a/llvm/lib/Target/PowerPC/PPCSubtarget.h +++ b/llvm/lib/Target/PowerPC/PPCSubtarget.h @@ -116,8 +116,7 @@ class PPCSubtarget : public PPCGenSubtargetInfo { /// This constructor initializes the data members to match that /// of the specified triple. /// - PPCSubtarget(const Triple &TT, const std::string &CPU, - const std::string &TuneCPU, const std::string &FS, + PPCSubtarget(const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS, const PPCTargetMachine &TM); ~PPCSubtarget() override; _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
