mirror of
https://github.com/intel/llvm.git
synced 2026-01-19 09:31:59 +08:00
Implemented a feature where the expression parser
can avoid running the code in the target if the expression's result is known and the expression has no side effects. Right now this feature is quite conservative in its guess about side effects, and it only computes integer results, but the machinery to make it more sophisticated is there. llvm-svn: 121952
This commit is contained in:
@@ -409,7 +409,8 @@ ClangExpressionParser::MakeDWARF ()
|
||||
Error
|
||||
ClangExpressionParser::MakeJIT (lldb::addr_t &func_addr,
|
||||
lldb::addr_t &func_end,
|
||||
ExecutionContext &exe_ctx)
|
||||
ExecutionContext &exe_ctx,
|
||||
lldb::ClangExpressionVariableSP *const_result)
|
||||
{
|
||||
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
|
||||
|
||||
@@ -446,6 +447,7 @@ ClangExpressionParser::MakeJIT (lldb::addr_t &func_addr,
|
||||
{
|
||||
IRForTarget ir_for_target(decl_map,
|
||||
m_expr.NeedsVariableResolution(),
|
||||
const_result,
|
||||
function_name.c_str());
|
||||
|
||||
if (!ir_for_target.runOnModule(*module))
|
||||
|
||||
Reference in New Issue
Block a user