summaryrefslogtreecommitdiffstats
path: root/clang/utils/TableGen/TableGen.cpp
diff options
context:
space:
mode:
authorNandor Licker <n@ndor.email>2019-09-04 05:49:41 +0000
committerNandor Licker <n@ndor.email>2019-09-04 05:49:41 +0000
commit32f82c9cbaf397a2ff0391511105ecd069b6250d (patch)
tree4c8dd4af243f8358038dec3727b098cea4ac5688 /clang/utils/TableGen/TableGen.cpp
parent48ab3a0185f67b9ab6b4ef3b3524ff0921f4d5a8 (diff)
downloadbcm5719-llvm-32f82c9cbaf397a2ff0391511105ecd069b6250d.tar.gz
bcm5719-llvm-32f82c9cbaf397a2ff0391511105ecd069b6250d.zip
[Clang Interpreter] Initial patch for the constexpr interpreter
Summary: This patch introduces the skeleton of the constexpr interpreter, capable of evaluating a simple constexpr functions consisting of if statements. The interpreter is described in more detail in the RFC. Further patches will add more features. Reviewers: Bigcheese, jfb, rsmith Subscribers: bruno, uenoku, ldionne, Tyker, thegameg, tschuett, dexonsmith, mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64146 llvm-svn: 370839
Diffstat (limited to 'clang/utils/TableGen/TableGen.cpp')
-rw-r--r--clang/utils/TableGen/TableGen.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/utils/TableGen/TableGen.cpp b/clang/utils/TableGen/TableGen.cpp
index b9ec90fd5bc..a9237001933 100644
--- a/clang/utils/TableGen/TableGen.cpp
+++ b/clang/utils/TableGen/TableGen.cpp
@@ -47,6 +47,7 @@ enum ActionType {
GenClangCommentNodes,
GenClangDeclNodes,
GenClangStmtNodes,
+ GenClangOpcodes,
GenClangSACheckers,
GenClangCommentHTMLTags,
GenClangCommentHTMLTagsProperties,
@@ -129,6 +130,8 @@ cl::opt<ActionType> Action(
"Generate Clang AST declaration nodes"),
clEnumValN(GenClangStmtNodes, "gen-clang-stmt-nodes",
"Generate Clang AST statement nodes"),
+ clEnumValN(GenClangOpcodes, "gen-clang-opcodes",
+ "Generate Clang constexpr interpreter opcodes"),
clEnumValN(GenClangSACheckers, "gen-clang-sa-checkers",
"Generate Clang Static Analyzer checkers"),
clEnumValN(GenClangCommentHTMLTags, "gen-clang-comment-html-tags",
@@ -251,6 +254,9 @@ bool ClangTableGenMain(raw_ostream &OS, RecordKeeper &Records) {
case GenClangStmtNodes:
EmitClangASTNodes(Records, OS, "Stmt", "");
break;
+ case GenClangOpcodes:
+ EmitClangOpcodes(Records, OS);
+ break;
case GenClangSACheckers:
EmitClangSACheckers(Records, OS);
break;
OpenPOWER on IntegriCloud