[PATCH] D142839: [AMDGPU] Avoid using tuple where pair does suffice

Mauro Rossi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 29 05:58:36 PST 2023


maurossi created this revision.
maurossi added reviewers: foad, kosarev.
maurossi added projects: LLVM, AMDGPU.
Herald added subscribers: StephenFan, kerbowa, hiraditya, tpr, dstuttard, yaxunl, jvesely, kzhuravl, arsenm.
Herald added a project: All.
maurossi requested review of this revision.
Herald added subscribers: llvm-commits, wdng.

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 g
uide 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 g
uide for deduction of template arguments of 'tuple'

  : std::tuple(HSAMD::AssemblerDirectiveBegin,
    ^

Fixes: 6443c0e <https://reviews.llvm.org/rG6443c0ee02c7785bc917fcf508f4cc7ded38487a> ("[AMDGPU] Stop using make_pair and make_tuple. NFC.")


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142839

Files:
  llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp


Index: llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
+++ llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
@@ -5487,9 +5487,9 @@
   const char *AssemblerDirectiveEnd;
   std::tie(AssemblerDirectiveBegin, AssemblerDirectiveEnd) =
       isHsaAbiVersion3AndAbove(&getSTI())
-          ? std::tuple(HSAMD::V3::AssemblerDirectiveBegin,
+          ? std::pair(HSAMD::V3::AssemblerDirectiveBegin,
                        HSAMD::V3::AssemblerDirectiveEnd)
-          : std::tuple(HSAMD::AssemblerDirectiveBegin,
+          : std::pair(HSAMD::AssemblerDirectiveBegin,
                        HSAMD::AssemblerDirectiveEnd);
 
   if (getSTI().getTargetTriple().getOS() != Triple::AMDHSA) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142839.493088.patch
Type: text/x-patch
Size: 815 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230129/bfec8d8c/attachment.bin>


More information about the llvm-commits mailing list