summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/ClangExpressionParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Expression/ClangExpressionParser.cpp')
-rw-r--r--lldb/source/Expression/ClangExpressionParser.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/lldb/source/Expression/ClangExpressionParser.cpp b/lldb/source/Expression/ClangExpressionParser.cpp
index 0d693ce0aeb..51654626fcd 100644
--- a/lldb/source/Expression/ClangExpressionParser.cpp
+++ b/lldb/source/Expression/ClangExpressionParser.cpp
@@ -456,7 +456,8 @@ ClangExpressionParser::MakeJIT (lldb::addr_t &func_allocation_addr,
lldb::addr_t &func_addr,
lldb::addr_t &func_end,
ExecutionContext &exe_ctx,
- lldb::ClangExpressionVariableSP *const_result)
+ lldb::ClangExpressionVariableSP &const_result,
+ bool jit_only_if_needed)
{
func_allocation_addr = LLDB_INVALID_ADDRESS;
func_addr = LLDB_INVALID_ADDRESS;
@@ -512,6 +513,12 @@ ClangExpressionParser::MakeJIT (lldb::addr_t &func_allocation_addr,
return err;
}
+ if (jit_only_if_needed && const_result.get())
+ {
+ err.Clear();
+ return err;
+ }
+
if (m_expr.NeedsValidation() && exe_ctx.process->GetDynamicCheckers())
{
IRDynamicChecks ir_dynamic_checks(*exe_ctx.process->GetDynamicCheckers(), function_name.c_str());
OpenPOWER on IntegriCloud