[llvm-dev] TableGen assertion mechanism

Jan Svoboda via llvm-dev llvm-dev at lists.llvm.org
Mon Dec 14 08:15:55 PST 2020


Hi all,

I found myself needing some kind of assertion mechanism in TableGen that would error out whenever a precondition isn't met.
This precondition needs to be checked parse-time, as it's much harder to retroactively verify in the backend in my case.

Is there any simple way to achieve this right now?

I think one could simulate this by doing something invalid (e.g. defining two records with the same name) whenever the precondition evaluates to false, but I'm looking for something cleaner.

Thanks,
Jan


More information about the llvm-dev mailing list