llvm-project/llvm/lib/TableGen
Javed Absar a3e3d85286 [TblGen] Extend !if semantics through new feature !cond
This patch extends TableGen language with !cond operator.
Instead of embedding !if inside !if which can get cumbersome,
one can now use !cond.
Below is an example to convert an integer 'x' into a string:

    !cond(!lt(x,0) : "Negative",
          !eq(x,0) : "Zero",
          !eq(x,1) : "One,
          1        : "MoreThanOne")

Reviewed By: hfinkel, simon_tatham, greened
Differential Revision: https://reviews.llvm.org/D55758

llvm-svn: 352185
2019-01-25 10:25:25 +00:00
..
CMakeLists.txt [TableGen] Add a general-purpose JSON backend. 2018-07-11 08:40:19 +00:00
Error.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
JSONBackend.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Main.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Record.cpp [TblGen] Extend !if semantics through new feature !cond 2019-01-25 10:25:25 +00:00
SetTheory.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
StringMatcher.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TGLexer.cpp [TblGen] Extend !if semantics through new feature !cond 2019-01-25 10:25:25 +00:00
TGLexer.h [TblGen] Extend !if semantics through new feature !cond 2019-01-25 10:25:25 +00:00
TGParser.cpp [TblGen] Extend !if semantics through new feature !cond 2019-01-25 10:25:25 +00:00
TGParser.h [TblGen] Extend !if semantics through new feature !cond 2019-01-25 10:25:25 +00:00
TableGenBackend.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00