mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-24 12:55:45 +00:00
[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:
parent
a306e612b4
commit
ff605efe5c
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user