diff options
| author | Sean Callanan <scallanan@apple.com> | 2013-04-16 23:25:35 +0000 |
|---|---|---|
| committer | Sean Callanan <scallanan@apple.com> | 2013-04-16 23:25:35 +0000 |
| commit | 14b1bae5ee36f3b5590e301c03d0362016015de0 (patch) | |
| tree | 3cf380fdcd26be996a8a7b826c1ec564418654ed /lldb/source/Expression/ClangUserExpression.cpp | |
| parent | ec924c52322a92373c418ee5b2ecf9e7c7278dc8 (diff) | |
| download | bcm5719-llvm-14b1bae5ee36f3b5590e301c03d0362016015de0.tar.gz bcm5719-llvm-14b1bae5ee36f3b5590e301c03d0362016015de0.zip | |
Flipped the big switch: LLDB now uses the new
Materializer for all expressions that need to
run in the target. This includes the following
changes:
- Removed a bunch of (de-)materialization code
from ClangExpressionDeclMap and assumed the
presence of a Materializer where we previously
had a fallback.
- Ensured that an IRMemoryMap is passed into
ClangExpressionDeclMap::Materialize().
- Fixed object ownership on LLVMContext; it is
now owned by the IRExecutionUnit, since the
Module and the ExecutionEngine both depend on
its existence.
- Fixed a few bugs in IRMemoryMap and the
Materializer that showed up during testing.
llvm-svn: 179649
Diffstat (limited to 'lldb/source/Expression/ClangUserExpression.cpp')
| -rw-r--r-- | lldb/source/Expression/ClangUserExpression.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/source/Expression/ClangUserExpression.cpp b/lldb/source/Expression/ClangUserExpression.cpp index 4ecd1890e0e..1a11b977838 100644 --- a/lldb/source/Expression/ClangUserExpression.cpp +++ b/lldb/source/Expression/ClangUserExpression.cpp @@ -29,6 +29,7 @@ #include "lldb/Expression/ClangFunction.h" #include "lldb/Expression/ClangUserExpression.h" #include "lldb/Expression/ExpressionSourceCode.h" +#include "lldb/Expression/IRExecutionUnit.h" #include "lldb/Expression/Materializer.h" #include "lldb/Host/Host.h" #include "lldb/Symbol/Block.h" @@ -551,7 +552,7 @@ ClangUserExpression::PrepareToExecuteJITExpression (Stream &error_stream, } } - if (!m_expr_decl_map->Materialize(struct_address, materialize_error)) + if (!m_expr_decl_map->Materialize(*m_execution_unit_ap, struct_address, materialize_error)) { error_stream.Printf("Couldn't materialize struct: %s\n", materialize_error.AsCString()); return false; @@ -654,7 +655,7 @@ ClangUserExpression::FinalizeJITExecution (Stream &error_stream, lldb::addr_t function_stack_bottom = function_stack_pointer - Host::GetPageSize(); - if (!m_expr_decl_map->Dematerialize(result, function_stack_pointer, function_stack_bottom, expr_error)) + if (!m_expr_decl_map->Dematerialize(result, *m_execution_unit_ap, function_stack_pointer, function_stack_bottom, expr_error)) { error_stream.Printf ("Couldn't dematerialize struct : %s\n", expr_error.AsCString("unknown error")); return false; |

