diff options
| author | Sean Callanan <scallanan@apple.com> | 2011-08-01 18:18:33 +0000 |
|---|---|---|
| committer | Sean Callanan <scallanan@apple.com> | 2011-08-01 18:18:33 +0000 |
| commit | b995119900bfebff7898a68659b7410bc71db1d3 (patch) | |
| tree | 094413039d99a97509223e6be2228aa9e0a836ae /lldb/source/Expression/ClangUtilityFunction.cpp | |
| parent | df425dbf04b6bc118d9813ddd99b7ea1e90ba7d9 (diff) | |
| download | bcm5719-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/ClangUtilityFunction.cpp')
| -rw-r--r-- | lldb/source/Expression/ClangUtilityFunction.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lldb/source/Expression/ClangUtilityFunction.cpp b/lldb/source/Expression/ClangUtilityFunction.cpp index aec30880a57..72c6888d795 100644 --- a/lldb/source/Expression/ClangUtilityFunction.cpp +++ b/lldb/source/Expression/ClangUtilityFunction.cpp @@ -103,7 +103,11 @@ ClangUtilityFunction::Install (Stream &error_stream, m_data_allocator.reset(new ProcessDataAllocator(*exe_ctx.process)); - 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.GetBestExecutionContextScope(), *this); |

