summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/expression_command/top-level/dummy.cpp
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2016-03-28 21:20:05 +0000
committerSean Callanan <scallanan@apple.com>2016-03-28 21:20:05 +0000
commit863fab69a295ac3759d2c937227ae6086baed3a5 (patch)
treeb4bfa580f3b95ff7b309a78bd3ee6b8575252b7e /lldb/packages/Python/lldbsuite/test/expression_command/top-level/dummy.cpp
parent7092de4cd2b3c4c209544ee631f36c64b52caf84 (diff)
downloadbcm5719-llvm-863fab69a295ac3759d2c937227ae6086baed3a5.tar.gz
bcm5719-llvm-863fab69a295ac3759d2c937227ae6086baed3a5.zip
Expose top-level Clang expressions via the command line and the API.
Top-level Clang expressions are expressions that act as new translation units, and define their own symbols. They do not have function wrappers like regular expressions do, and declarations are persistent regardless of use of the dollar sign in identifiers. Names defined by these are given priority over all other symbol lookups. This patch adds a new expression option, '-p' or '--top-level,' which controls whether the expression is treated this way. It also adds a flag controlling this to SBExpressionOptions so that this API is usable externally. It also adds a test that validates that this works. (The test requires a fix to the Clang AST importer which I will be committing shortly.) <rdar://problem/22864976> llvm-svn: 264662
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/expression_command/top-level/dummy.cpp')
-rw-r--r--lldb/packages/Python/lldbsuite/test/expression_command/top-level/dummy.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/top-level/dummy.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/top-level/dummy.cpp
new file mode 100644
index 00000000000..31204b21d97
--- /dev/null
+++ b/lldb/packages/Python/lldbsuite/test/expression_command/top-level/dummy.cpp
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int main()
+{
+ printf("This is a dummy\n"); // Set breakpoint here
+ return 0;
+}
OpenPOWER on IntegriCloud