Backend support for top-level Clang epxressions
authorSean Callanan <scallanan@apple.com>
Tue, 22 Mar 2016 21:05:51 +0000 (21:05 +0000)
committerSean Callanan <scallanan@apple.com>
Tue, 22 Mar 2016 21:05:51 +0000 (21:05 +0000)
commit00294b34a3c99f3540214a148c0bd15e68f9d7fd
treea6892887ee99bed68154d36a82a975d01ec566a1
parente32368fc6edd4f1c284a9ba0cbdd6b8931dbe925
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.

<rdar://problem/22864976>

llvm-svn: 264095
lldb/include/lldb/lldb-private-enumerations.h
lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp
lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionHelper.h
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h
lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h