summaryrefslogtreecommitdiffstats
path: root/clang/utils/TableGen/TableGen.cpp
diff options
context:
space:
mode:
authorNandor Licker <n@ndor.email>2019-09-02 10:38:08 +0000
committerNandor Licker <n@ndor.email>2019-09-02 10:38:08 +0000
commit8327fed9475a14c3376b4860c75370c730e08f33 (patch)
tree55d82a5722537f02304cf40ab59dd237c9a0f41f /clang/utils/TableGen/TableGen.cpp
parentd8bc6a48eaa9111b1fc232aa678695a57ae25ec6 (diff)
downloadbcm5719-llvm-8327fed9475a14c3376b4860c75370c730e08f33.tar.gz
bcm5719-llvm-8327fed9475a14c3376b4860c75370c730e08f33.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: 370636
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