[llvm] [NFC][TableGen] Emit more readable builtin string table. (PR #105445)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 15:44:46 PDT 2024


jurahul wrote:

The new string table for builtin names looks like:

```C++

#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Woverlength-strings"
#endif
  static constexpr char BuiltinNames[] = {
  /* 0 */ "MoveFromCoprocessor2\0"
  /* 21 */ "_dmb\0"
  /* 26 */ "_dsb\0"
  /* 31 */ "_isb\0"
  /* 36 */ "MoveFromCoprocessor\0"
};
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
```

The code emits the GCC pragmas to ignore string length, which are not needed here. May be they are no longer needed, or based on the max string length that will be emitted, they could be conditionally omitted. But I am not changing that here.

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


More information about the llvm-commits mailing list