[PATCH] D90635: [TableGen] Add true and false literals to represent booleans
Jessica Clarke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 5 13:06:46 PST 2020
jrtc27 added a comment.
In D90635#2377186 <https://reviews.llvm.org/D90635#2377186>, @Paul-C-Anagnostopoulos wrote:
> I would have to invent a boolean type to prevent that assignment. That would be such a box of frogs that I quickly gave up on the idea. I'm not even sure we could do it compatibly. What would !eq(x, y) produce? And I don't think people would want !if(pred, ...) to require a boolean, since it doesn't in C++. [Much to my chagrin, and perhaps yours.]
>
> Now, I might be able to make a special case out of field and let assignments. But do we want true/false suddenly to become "sort of a typed literal"?
>
> My heart is with you, but I'm not sure we could do it.
Hm, if those already produce an integer rather than `bit`/`bits<1>` then yeah it seems our hands are tied here without disruptive changes.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90635/new/
https://reviews.llvm.org/D90635
More information about the llvm-commits
mailing list