[llvm] AMDGPU: Fix copy of Triple (PR #184594)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 4 03:49:41 PST 2026


https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/184594

None

>From 8260200c60ab980cb5977a156db2481b51f595dc Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Wed, 4 Mar 2026 12:15:02 +0100
Subject: [PATCH] AMDGPU: Fix copy of Triple

---
 llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
index 865770031bb06..428e4cfdd9a25 100644
--- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
@@ -1135,7 +1135,7 @@ std::string AMDGPUTargetID::toString() const {
   std::string StringRep;
   raw_string_ostream StreamRep(StringRep);
 
-  auto TargetTriple = STI.getTargetTriple();
+  const Triple &TargetTriple = STI.getTargetTriple();
   auto Version = getIsaVersion(STI.getCPU());
 
   StreamRep << TargetTriple.getArchName() << '-' << TargetTriple.getVendorName()



More information about the llvm-commits mailing list