Skip to content

Commit

Permalink
[TableGen] emitStringLiteralDef: Pad trailing '\0' at the end of char…
Browse files Browse the repository at this point in the history
… array.

Fixup for https://reviews.llvm.org/D73044
String literal has an implicit terminator '\0'. This commit adjusts char array
to long literal.

This causes difference of artifacts between -long-string-literals=true
and false.

Differential Revision: https://reviews.llvm.org/D126136
  • Loading branch information
chapuni committed May 23, 2022
1 parent a1d4903 commit c8e0870
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/utils/TableGen/SequenceToOffsetTable.h
Expand Up @@ -173,7 +173,7 @@ class SequenceToOffsetTable {
if (!EmitLongStrLiterals) {
OS << Decl << " = {\n";
emit(OS, printChar, "0");
OS << "\n};\n\n";
OS << " 0\n};\n\n";
return;
}

Expand Down

0 comments on commit c8e0870

Please sign in to comment.