[llvm] [TableGen] Allow empty terminator in SequenceToOffsetTable (PR #119751)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 12 14:13:35 PST 2024
s-barannikov wrote:
> There is a bunch of warnings I need to deal with: `warning: zero size arrays are an extension [-Wzero-length-array]` that turn into an error when building with MSVC: `error C2466: cannot allocate an array of constant size 0`.
>
> ```
> 84 extern const uint16_t XCoreSubRegIdxLists[] = {
> 85 /* 0 */
> 86 };
> ```
I couldn't think of anything better than to print a dummy default-constructed element if the array would otherwise be empty.
https://github.com/llvm/llvm-project/pull/119751
More information about the llvm-commits
mailing list