diff options
Diffstat (limited to 'llvm/utils/TableGen/SequenceToOffsetTable.h')
| -rw-r--r-- | llvm/utils/TableGen/SequenceToOffsetTable.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/utils/TableGen/SequenceToOffsetTable.h b/llvm/utils/TableGen/SequenceToOffsetTable.h index 41cdefdb1949..1b3451c24cb0 100644 --- a/llvm/utils/TableGen/SequenceToOffsetTable.h +++ b/llvm/utils/TableGen/SequenceToOffsetTable.h @@ -170,18 +170,18 @@ public: /// `EmitLongStrLiterals` is false void emitStringLiteralDef(raw_ostream &OS, const llvm::Twine &Decl) const { assert(Entries && "Call layout() before emitStringLiteralDef()"); - if (EmitLongStrLiterals) { - OS << "\n#ifdef __GNUC__\n" - << "#pragma GCC diagnostic push\n" - << "#pragma GCC diagnostic ignored \"-Woverlength-strings\"\n" - << "#endif\n" - << Decl << " = {\n"; - } else { + if (!EmitLongStrLiterals) { OS << Decl << " = {\n"; emit(OS, printChar, "0"); - OS << "\n};\n\n"; + OS << " 0\n};\n\n"; return; } + + OS << "\n#ifdef __GNUC__\n" + << "#pragma GCC diagnostic push\n" + << "#pragma GCC diagnostic ignored \"-Woverlength-strings\"\n" + << "#endif\n" + << Decl << " = {\n"; for (auto I : Seqs) { OS << " /* " << I.second << " */ \""; for (auto C : I.first) { |
