ClangUserExpression ctor should not crash if given a null expr_prefix char*.

llvm-svn: 117700
This commit is contained in:
Johnny Chen
2010-10-29 20:19:44 +00:00
parent fe4b52a066
commit dabefd0120

View File

@@ -38,7 +38,7 @@ using namespace lldb_private;
ClangUserExpression::ClangUserExpression (const char *expr,
const char *expr_prefix) :
m_expr_text(expr),
m_expr_prefix(expr_prefix),
m_expr_prefix(expr_prefix ? expr_prefix : ""),
m_transformed_text(),
m_jit_addr(LLDB_INVALID_ADDRESS),
m_cplusplus(false),
@@ -483,4 +483,4 @@ ClangUserExpression::Evaluate (ExecutionContext &exe_ctx,
result_valobj_sp.reset (new ValueObjectConstResult (error));
return result_valobj_sp;
}
}