Added support for persistent variables to the
expression parser. It is now possible to type:
(lldb) expr int $i = 5; $i + 1
(int) 6
(lldb) expr $i + 2
(int) 7
The skeleton for automatic result variables is
also implemented. The changes affect:
- the process, which now contains a
ClangPersistentVariables object that holds
persistent variables associated with it
- the expression parser, which now uses
the persistent variables during variable
lookup
- TaggedASTType, where I loaded some commonly
used tags into a header so that they are
interchangeable between different clients of
the class
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110777 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/ClangExpression.cpp b/source/Expression/ClangExpression.cpp
index 0e103b6..467acbd 100644
--- a/source/Expression/ClangExpression.cpp
+++ b/source/Expression/ClangExpression.cpp
@@ -239,6 +239,7 @@
m_clang_ap->getLangOpts().ObjC1 = true;
m_clang_ap->getLangOpts().ThreadsafeStatics = false;
m_clang_ap->getLangOpts().AccessControl = false; // Debuggers get universal access
+ m_clang_ap->getLangOpts().DollarIdents = true; // $ indicates a persistent variable name
// Set CodeGen options
m_clang_ap->getCodeGenOpts().EmitDeclMetadata = true;