HomePhabricator

[AMDGPU] Use std::make_tuple to make some toolchains happy again

Description

[AMDGPU] Use std::make_tuple to make some toolchains happy again

My toolchain stopped working (LLVM 8.0 , libstdc++ 5.4.0) after
r372338.

The same problem was seen in clang-cuda-build buildbots:

clang-cuda-build/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp:763:12:
error: chosen constructor is explicit in copy-initialization

return {Reg, 0, nullptr};
       ^~~~~~~~~~~~~~~~~

/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/tuple:479:19:
note: explicit constructor declared here

constexpr tuple(_UElements&&... __elements)
          ^

This commit adds explicit calls to std::make_tuple to work around
the problem.

Details

Committed
bjopeSep 20 2019, 5:13 AM
Parents
rL372383: Revert r372366 "Use getTargetConstant for BLENDI, and add a test to catch it."
Branches
Unknown
Tags
Unknown