Skip to content

Commit 14e6f63

Browse files
committed
[Frontend][OpenMP] Add suggested brackets in array initialization
Fixes -Werror build after 40137ff.
1 parent e95e94a commit 14e6f63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/utils/TableGen/DirectiveEmitter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ static void EmitLeafTable(const DirectiveLanguage &DirLang, raw_ostream &OS,
578578
<< "[][" << MaxLeafCount + 2 << "] = {\n";
579579
for (size_t I = 0, E = Directives.size(); I != E; ++I) {
580580
auto &Leaves = LeafTable[Ordering[I]];
581-
OS << " " << GetDirectiveName(DirLang, Directives[Leaves[0]]);
581+
OS << " {" << GetDirectiveName(DirLang, Directives[Leaves[0]]);
582582
OS << ", static_cast<" << DirectiveType << ">(" << Leaves[1] << "),";
583583
for (size_t I = 2, E = Leaves.size(); I != E; ++I) {
584584
int Idx = Leaves[I];
@@ -587,7 +587,7 @@ static void EmitLeafTable(const DirectiveLanguage &DirLang, raw_ostream &OS,
587587
else
588588
OS << " static_cast<" << DirectiveType << ">(-1),";
589589
}
590-
OS << '\n';
590+
OS << "},\n";
591591
}
592592
OS << "};\n\n";
593593

0 commit comments

Comments
 (0)