[llvm] 735cb7b - [AMDGPU] Avoid using tuple where pair does suffice
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 21 00:42:46 PDT 2023
Author: Jay Foad
Date: 2023-04-21T08:30:35+01:00
New Revision: 735cb7b1f84a36049ea187fecdd281c6e93600bb
URL: https://github.com/llvm/llvm-project/commit/735cb7b1f84a36049ea187fecdd281c6e93600bb
DIFF: https://github.com/llvm/llvm-project/commit/735cb7b1f84a36049ea187fecdd281c6e93600bb.diff
LOG: [AMDGPU] Avoid using tuple where pair does suffice
Fixes the following building errors, happening with official Android prebuilt clang 14 shipped with Android 13:
external/llvm-project/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp:5491:13: error: no viable constructor or deduction guide for deduction of template arguments of 'tuple'
? std::tuple(HSAMD::V3::AssemblerDirectiveBegin,
^
...
external/llvm-project/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp:5493:13: error: no viable constructor or deduction guide for deduction of template arguments of 'tuple'
: std::tuple(HSAMD::AssemblerDirectiveBegin,
^
Fixes: 6443c0e ("[AMDGPU] Stop using make_pair and make_tuple. NFC.")
Patch by Mauro Rossi!
Differential Revision: https://reviews.llvm.org/D142839
Added:
Modified:
llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp b/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
index 7a0910fe90aab..ff781a02f5536 100644
--- a/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
+++ b/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
@@ -5507,10 +5507,10 @@ bool AMDGPUAsmParser::ParseDirectiveHSAMetadata() {
const char *AssemblerDirectiveEnd;
std::tie(AssemblerDirectiveBegin, AssemblerDirectiveEnd) =
isHsaAbiVersion3AndAbove(&getSTI())
- ? std::tuple(HSAMD::V3::AssemblerDirectiveBegin,
- HSAMD::V3::AssemblerDirectiveEnd)
- : std::tuple(HSAMD::AssemblerDirectiveBegin,
- HSAMD::AssemblerDirectiveEnd);
+ ? std::pair(HSAMD::V3::AssemblerDirectiveBegin,
+ HSAMD::V3::AssemblerDirectiveEnd)
+ : std::pair(HSAMD::AssemblerDirectiveBegin,
+ HSAMD::AssemblerDirectiveEnd);
if (getSTI().getTargetTriple().getOS() != Triple::AMDHSA) {
return Error(getLoc(),
More information about the llvm-commits
mailing list