From eeb15653c61f4969a9f4e2343b6f58ae04c8ca3c Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Tue, 10 Dec 2013 23:16:40 +0000 Subject: [PATCH] Fix the test suite after the changes made in revision 196616 exposed issues in the test suite. We must make sure that all ValueObject objects always contain a valid target. llvm-svn: 196983 --- lldb/source/Core/ValueObject.cpp | 3 ++- lldb/source/Expression/ClangUserExpression.cpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp index 1f312c49eaa5..4eea9634b4fc 100644 --- a/lldb/source/Core/ValueObject.cpp +++ b/lldb/source/Core/ValueObject.cpp @@ -3516,7 +3516,8 @@ ValueObject::CreateConstantValue (const ConstString &name) if (!valobj_sp) { - valobj_sp = ValueObjectConstResult::Create (NULL, m_error); + ExecutionContext exe_ctx (GetExecutionContextRef()); + valobj_sp = ValueObjectConstResult::Create (exe_ctx.GetBestExecutionContextScope(), m_error); } return valobj_sp; } diff --git a/lldb/source/Expression/ClangUserExpression.cpp b/lldb/source/Expression/ClangUserExpression.cpp index d9ecd41be97a..6b0eee8cf363 100644 --- a/lldb/source/Expression/ClangUserExpression.cpp +++ b/lldb/source/Expression/ClangUserExpression.cpp @@ -1024,7 +1024,9 @@ ClangUserExpression::Evaluate (ExecutionContext &exe_ctx, } if (result_valobj_sp.get() == NULL) - result_valobj_sp = ValueObjectConstResult::Create (NULL, error); + { + result_valobj_sp = ValueObjectConstResult::Create (exe_ctx.GetBestExecutionContextScope(), error); + } return execution_results; }