[Lldb-commits] [PATCH] D17745: Fix bug with function resolution when using IR Interpreter
Sean Callanan via lldb-commits
lldb-commits at lists.llvm.org
Mon Feb 29 17:49:20 PST 2016
spyffe accepted this revision.
spyffe added a comment.
This revision is now accepted and ready to land.
Aside from one minor object ownership issue this is good to go. Change the `IRExecutionUnitSP` to an `IRExecutionUnit&` and you have my blessing!
================
Comment at: source/Expression/IRInterpreter.cpp:106
@@ -103,3 +105,3 @@
DataLayout &m_target_data;
- lldb_private::IRMemoryMap &m_memory_map;
+ lldb::IRExecutionUnitSP m_execution_unit_sp;
const BasicBlock *m_bb;
----------------
As noted below, this can just be an `IRExecutionUnit&`.
================
Comment at: source/Expression/IRInterpreter.cpp:689
@@ -674,3 +688,3 @@
llvm::ArrayRef<lldb::addr_t> args,
- lldb_private::IRMemoryMap &memory_map,
+ lldb::IRExecutionUnitSP execution_unit_sp,
lldb_private::Error &error,
----------------
Given that the caller of `Interpret` has an `execution_unit_sp`, and `Interpret` does not create any objects that live longer than the `Interpret` invocation (specifically, the `InterpreterStackFrame` is stack-allocated) I believe we should not need to take the shared pointer. An `IRExecutionUnit&` should suffice.
http://reviews.llvm.org/D17745
More information about the lldb-commits
mailing list