summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/ClangUserExpression.cpp
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2011-08-01 18:18:33 +0000
committerSean Callanan <scallanan@apple.com>2011-08-01 18:18:33 +0000
commitb995119900bfebff7898a68659b7410bc71db1d3 (patch)
tree094413039d99a97509223e6be2228aa9e0a836ae /lldb/source/Expression/ClangUserExpression.cpp
parentdf425dbf04b6bc118d9813ddd99b7ea1e90ba7d9 (diff)
downloadbcm5719-llvm-b995119900bfebff7898a68659b7410bc71db1d3.tar.gz
bcm5719-llvm-b995119900bfebff7898a68659b7410bc71db1d3.zip
Added checking to make sure that the target has a
scratch AST context before attempting to parse. llvm-svn: 136631
Diffstat (limited to 'lldb/source/Expression/ClangUserExpression.cpp')
-rw-r--r--lldb/source/Expression/ClangUserExpression.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lldb/source/Expression/ClangUserExpression.cpp b/lldb/source/Expression/ClangUserExpression.cpp
index d8d65bc379f..9bc41889445 100644
--- a/lldb/source/Expression/ClangUserExpression.cpp
+++ b/lldb/source/Expression/ClangUserExpression.cpp
@@ -241,7 +241,11 @@ ClangUserExpression::Parse (Stream &error_stream,
m_expr_decl_map.reset(new ClangExpressionDeclMap(keep_result_in_memory));
- m_expr_decl_map->WillParse(exe_ctx);
+ if (!m_expr_decl_map->WillParse(exe_ctx))
+ {
+ error_stream.PutCString ("error: current process state is unsuitable for expression parsing\n");
+ return false;
+ }
ClangExpressionParser parser(exe_ctx.process, *this);
OpenPOWER on IntegriCloud