[llvm] [TableGen] Allow empty terminator in SequenceToOffsetTable (PR #119751)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 12 13:10:18 PST 2024


================
@@ -127,10 +135,10 @@ class SequenceToOffsetTable {
   /// `\0`. Falls back to emitting a comma-separated integer list if
   /// `EmitLongStrLiterals` is false
   void emitStringLiteralDef(raw_ostream &OS, const Twine &Decl) const {
-    assert(Entries && "Call layout() before emitStringLiteralDef()");
+    assert(IsLaidOut && "Call layout() before emitStringLiteralDef()");
     if (!EmitLongStrLiterals) {
       OS << Decl << " = {\n";
-      emit(OS, printChar, "0");
+      emit(OS, printChar);
----------------
jurahul wrote:

Do we need to print the terminator here?

https://github.com/llvm/llvm-project/pull/119751


More information about the llvm-commits mailing list