diff options
author | Sean Callanan <scallanan@apple.com> | 2011-05-07 01:06:41 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2011-05-07 01:06:41 +0000 |
commit | 63697e5025f65c60953fd0ca72203d60715924e9 (patch) | |
tree | ae6dd0d19ee39c1e43329de0b20b98fc6f756f2a /lldb/source/Expression/ClangExpressionParser.cpp | |
parent | 95496b18569913774c7d1d8f27cc5917f4fa64c0 (diff) | |
download | bcm5719-llvm-63697e5025f65c60953fd0ca72203d60715924e9.tar.gz bcm5719-llvm-63697e5025f65c60953fd0ca72203d60715924e9.zip |
Made expressions that are just casts of pointer
variables be evaluated statically.
Also fixed a bug that caused the results of
statically-evaluated expressions to be materialized
improperly.
This bug also removes some duplicate code.
llvm-svn: 131042
Diffstat (limited to 'lldb/source/Expression/ClangExpressionParser.cpp')
-rw-r--r-- | lldb/source/Expression/ClangExpressionParser.cpp | 9 |
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()); |