[PATCH] D152998: [TableGen] Support named arguments

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 11 12:12:53 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/include/llvm/TableGen/Record.h:495
   Init *Value;
+  union {
+    unsigned Index;
----------------
reames wrote:
> Drop the union.  The minimal space savings is not worth the awful and hard to debug problems.
> 
> You can use a signal value (i.e. -1 on Index) to track the type of the argument.  
or use std::variant


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152998/new/

https://reviews.llvm.org/D152998



More information about the llvm-commits mailing list