Skip to content

Commit b829439

Browse files
committed
Print a dummy element if the array would be empty otherwise
1 parent a3676ed commit b829439

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

llvm/utils/TableGen/Basic/SequenceToOffsetTable.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,13 @@ class SequenceToOffsetTable {
180180
}
181181
OS << '\n';
182182
}
183+
184+
// Print a dummy element if the array would be empty otherwise.
185+
if (!Entries) {
186+
OS << " /* dummy */ ";
187+
Print(OS, ElemT());
188+
OS << '\n';
189+
}
183190
}
184191
};
185192

0 commit comments

Comments
 (0)