From 2235f32bbdddf52d1e3a1119c747a0861143616d Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Wed, 11 Aug 2010 03:57:18 +0000 Subject: 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 llvm-svn: 110777 --- lldb/source/Commands/CommandObjectExpression.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lldb/source/Commands/CommandObjectExpression.cpp') diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp index 404dc2a2606..7d83b2c722b 100644 --- a/lldb/source/Commands/CommandObjectExpression.cpp +++ b/lldb/source/Commands/CommandObjectExpression.cpp @@ -19,6 +19,7 @@ #include "lldb/Expression/ClangExpression.h" #include "lldb/Expression/ClangExpressionDeclMap.h" #include "lldb/Expression/ClangExpressionVariable.h" +#include "lldb/Expression/ClangPersistentVariables.h" #include "lldb/Expression/ClangFunction.h" #include "lldb/Expression/DWARFExpression.h" #include "lldb/Host/Host.h" @@ -217,8 +218,7 @@ CommandObjectExpression::EvaluateExpression (const char *expr, bool bare, Stream return false; } - ClangPersistentVariables persistent_vars; /* TODO store this somewhere sensible */ - ClangExpressionDeclMap expr_decl_map (&m_exe_ctx, persistent_vars); + ClangExpressionDeclMap expr_decl_map (&m_exe_ctx); ClangExpression clang_expr (target_triple.AsCString (), &expr_decl_map); ////////////////////////// -- cgit v1.2.3