From 00294b34a3c99f3540214a148c0bd15e68f9d7fd Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Tue, 22 Mar 2016 21:05:51 +0000 Subject: Backend support for top-level Clang epxressions This patch adds a new ExecutionPolicy, eExecutionPolicyTopLevel, which tells the expression parser that the expression should be JITted as top level code but nothing (except static initializers) should be run. I have modified the Clang expression parser to recognize this execution policy. On top of the existing patches that support storing IR and maintaining a map of arbitrary Decls, this is mainly just patching up a few places in the expression parser. I intend to submit a patch for review that exposes this functionality through the "expression" command and through the SB API. That patch also includes a testcase for all of this. llvm-svn: 264095 --- .../Plugins/ExpressionParser/Clang/ClangExpressionHelper.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionHelper.h') diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionHelper.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionHelper.h index bb620def691..bcd30ec4af2 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionHelper.h +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionHelper.h @@ -67,11 +67,14 @@ public: /// the ASTs to after transformation. //------------------------------------------------------------------ virtual clang::ASTConsumer * - ASTTransformer (clang::ASTConsumer *passthrough) = 0; - + ASTTransformer(clang::ASTConsumer *passthrough) = 0; -protected: + virtual void + CommitPersistentDecls() + { + } +protected: }; } // namespace lldb_private -- cgit v1.2.3