diff options
Diffstat (limited to 'include/lldb/Expression/ClangFunction.h')
-rw-r--r-- | include/lldb/Expression/ClangFunction.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/lldb/Expression/ClangFunction.h b/include/lldb/Expression/ClangFunction.h index 61d56729f93d..c122b21be279 100644 --- a/include/lldb/Expression/ClangFunction.h +++ b/include/lldb/Expression/ClangFunction.h @@ -285,9 +285,9 @@ public: /// True if the thread plan may simply be discarded if an error occurs. /// /// @return - /// A ThreadPlan for executing the function. + /// A ThreadPlan shared pointer for executing the function. //------------------------------------------------------------------ - ThreadPlan * + lldb::ThreadPlanSP GetThreadPlanToCallFunction (ExecutionContext &exe_ctx, lldb::addr_t args_addr, const EvaluateExpressionOptions &options, @@ -411,8 +411,10 @@ private: // For ClangFunction only //------------------------------------------------------------------ - std::unique_ptr<ClangExpressionParser> m_parser; ///< The parser responsible for compiling the function. + // Note: the parser needs to be destructed before the execution unit, so + // declare the the execution unit first. std::shared_ptr<IRExecutionUnit> m_execution_unit_sp; + std::unique_ptr<ClangExpressionParser> m_parser; ///< The parser responsible for compiling the function. lldb::ModuleWP m_jit_module_wp; std::string m_name; ///< The name of this clang function - for debugging purposes. |