[clang] [lldb] [WebAssembly][Clang] Give wasm tables their own type in clang AST (PR #205817)
Demetrius Kanios via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 30 00:12:05 PDT 2026
================
@@ -1520,6 +1521,19 @@ void TypePrinter::printPipeBefore(const PipeType *T, raw_ostream &OS) {
void TypePrinter::printPipeAfter(const PipeType *T, raw_ostream &OS) {}
+void TypePrinter::printWebAssemblyTableBefore(const WebAssemblyTableType *T,
+ raw_ostream &OS) {
+ IncludeStrongLifetimeRAII Strong(Policy);
+ printBefore(T->getElementType(), OS);
+}
+
+void TypePrinter::printWebAssemblyTableAfter(const WebAssemblyTableType *T,
+ raw_ostream &OS) {
+ // Print like the zero-length array a table is declared as.
+ OS << "[0]";
----------------
QuantumSegfault wrote:
Maybe be more explicit? Make it obvious that it's a Wasm table, rather than using `[0]` (`table` could probably do; e.g.. `invalid argument '__externref_t table'`)
https://github.com/llvm/llvm-project/pull/205817
More information about the cfe-commits
mailing list