[TableGen] Fix std::array initializer 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 complain even if leaving out one level of braces.

llvm-svn: 362360
This commit is contained in:
Mikael Holmen 2019-06-03 06:38:01 +00:00
parent 8522d579b8
commit 404a679e1d

View File

@ -692,7 +692,7 @@ void MatcherGen::EmitResultLeafAsOperand(const TreePatternNode *N,
}
if (Def->getName() == "undef_tied_input") {
std::array<MVT::SimpleValueType, 1> ResultVTs = { N->getSimpleType(0) };
std::array<MVT::SimpleValueType, 1> ResultVTs = {{ N->getSimpleType(0) }};
std::array<unsigned, 0> InstOps;
auto IDOperandNo = NextRecordedOperandNo++;
AddMatcher(new EmitNodeMatcher("TargetOpcode::IMPLICIT_DEF",