[AMDGPU] Fix std::array initializers to avoid warnings with older tool chains. NFC

A std::array is implemented as a template with an array
inside a struct. Older versions of clang, like 3.6,
require an extra set of curly braces around std::array
initializations to avoid warnings.

The C++ language was changed regarding this by CWG 1270.
So more modern tool chains does not complaing even if
leaving out one level of braces.

llvm-svn: 361171
This commit is contained in:
Bjorn Pettersson 2019-05-20 16:41:08 +00:00
parent a306e612b4
commit ff605efe5c

View File

@ -160,7 +160,7 @@ AMDGPURegisterBankInfo::getInstrAlternativeMappingsIntrinsicWSideEffects(
};
// rsrc, voffset, offset
const std::array<unsigned, 3> RegSrcOpIdx = { 2, 3, 4 };
const std::array<unsigned, 3> RegSrcOpIdx = { { 2, 3, 4 } };
return addMappingFromTable<3>(MI, MRI, RegSrcOpIdx, makeArrayRef(Table));
}
case Intrinsic::amdgcn_s_buffer_load: {
@ -179,7 +179,7 @@ AMDGPURegisterBankInfo::getInstrAlternativeMappingsIntrinsicWSideEffects(
};
// rsrc, offset
const std::array<unsigned, 2> RegSrcOpIdx = { 2, 3 };
const std::array<unsigned, 2> RegSrcOpIdx = { { 2, 3 } };
return addMappingFromTable<2>(MI, MRI, RegSrcOpIdx, makeArrayRef(Table));
}
default: