[PATCH] D90635: [TableGen] Add true and false literals to represent booleans
Paul C. Anagnostopoulos via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 2 11:28:01 PST 2020
Paul-C-Anagnostopoulos created this revision.
Paul-C-Anagnostopoulos added reviewers: lattner, nhaehnle, madhur13490, tlively.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
Paul-C-Anagnostopoulos requested review of this revision.
This revision adds the 'true' and 'false' literals to TableGen, which represent boolean values.
This is primarily syntactic sugar aimed at improving the readability of TableGen files. Once parsed, these literals are converted to 1 and 0. Note that they can be used in bit sequences, too.
The documentation was updated. A test was added and a couple of other tests updated due to an improved error message.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D90635
Files:
llvm/docs/TableGen/ProgRef.rst
llvm/lib/TableGen/TGLexer.cpp
llvm/lib/TableGen/TGLexer.h
llvm/lib/TableGen/TGParser.cpp
llvm/test/TableGen/foreach-range-parse-errors0.td
llvm/test/TableGen/paste-reserved.td
llvm/test/TableGen/true-false.td
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90635.302353.patch
Type: text/x-patch
Size: 10785 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201102/7d4f2e4f/attachment.bin>
More information about the llvm-commits
mailing list