summaryrefslogtreecommitdiffstats
path: root/lldb/include/lldb/Expression/ClangExpressionParser.h
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/include/lldb/Expression/ClangExpressionParser.h')
-rw-r--r--lldb/include/lldb/Expression/ClangExpressionParser.h59
1 files changed, 5 insertions, 54 deletions
diff --git a/lldb/include/lldb/Expression/ClangExpressionParser.h b/lldb/include/lldb/Expression/ClangExpressionParser.h
index c3323b88e13..57172c5e3ab 100644
--- a/lldb/include/lldb/Expression/ClangExpressionParser.h
+++ b/lldb/include/lldb/Expression/ClangExpressionParser.h
@@ -22,7 +22,7 @@
namespace lldb_private
{
-class RecordingMemoryManager;
+class IRExecutionUnit;
//----------------------------------------------------------------------
/// @class ClangExpressionParser ClangExpressionParser.h "lldb/Expression/ClangExpressionParser.h"
@@ -76,10 +76,6 @@ public:
/// Ready an already-parsed expression for execution, possibly
/// evaluating it statically.
///
- /// @param[out] func_allocation_addr
- /// The address which can be used to deallocate the code for this
- /// JIT'ed function
- ///
/// @param[out] func_addr
/// The address to which the function has been written.
///
@@ -91,9 +87,6 @@ public:
/// @param[in] exe_ctx
/// The execution context to write the function into.
///
- /// @param[in] data_allocator
- /// If non-NULL, the static data allocator to use for literal strings.
- ///
/// @param[out] evaluated_statically
/// Set to true if the expression could be interpreted statically;
/// untouched otherwise.
@@ -113,11 +106,9 @@ public:
/// Test with Success().
//------------------------------------------------------------------
Error
- PrepareForExecution (lldb::addr_t &func_allocation_addr,
- lldb::addr_t &func_addr,
+ PrepareForExecution (lldb::addr_t &func_addr,
lldb::addr_t &func_end,
ExecutionContext &exe_ctx,
- IRForTarget::StaticDataAllocator *data_allocator,
bool &evaluated_statically,
lldb::ClangExpressionVariableSP &const_result,
lldb_private::ExecutionPolicy execution_policy);
@@ -137,49 +128,9 @@ public:
//------------------------------------------------------------------
Error
DisassembleFunction (Stream &stream,
- ExecutionContext &exe_ctx,
- RecordingMemoryManager *jit_memory_manager);
+ ExecutionContext &exe_ctx);
private:
- //----------------------------------------------------------------------
- /// @class JittedFunction ClangExpressionParser.h "lldb/Expression/ClangExpressionParser.h"
- /// @brief Encapsulates a single function that has been generated by the JIT.
- ///
- /// Functions that have been generated by the JIT are first resident in the
- /// local process, and then placed in the target process. JittedFunction
- /// represents a function possibly resident in both.
- //----------------------------------------------------------------------
- struct JittedFunction {
- std::string m_name; ///< The function's name
- lldb::addr_t m_local_addr; ///< The address of the function in LLDB's memory
- lldb::addr_t m_remote_addr; ///< The address of the function in the target's memory
-
- //------------------------------------------------------------------
- /// Constructor
- ///
- /// Initializes class variabes.
- ///
- /// @param[in] name
- /// The name of the function.
- ///
- /// @param[in] local_addr
- /// The address of the function in LLDB, or LLDB_INVALID_ADDRESS if
- /// it is not present in LLDB's memory.
- ///
- /// @param[in] remote_addr
- /// The address of the function in the target, or LLDB_INVALID_ADDRESS
- /// if it is not present in the target's memory.
- //------------------------------------------------------------------
- JittedFunction (const char *name,
- lldb::addr_t local_addr = LLDB_INVALID_ADDRESS,
- lldb::addr_t remote_addr = LLDB_INVALID_ADDRESS) :
- m_name (name),
- m_local_addr (local_addr),
- m_remote_addr (remote_addr)
- {
- }
- };
-
ClangExpression &m_expr; ///< The expression to be parsed
std::auto_ptr<llvm::LLVMContext> m_llvm_context; ///< The LLVM context to generate IR into
@@ -188,8 +139,8 @@ private:
std::auto_ptr<clang::Builtin::Context> m_builtin_context; ///< Context for Clang built-ins
std::auto_ptr<clang::SelectorTable> m_selector_table; ///< Selector table for Objective-C methods
std::auto_ptr<clang::ASTContext> m_ast_context; ///< The AST context used to hold types and names for the parser
- std::auto_ptr<clang::CodeGenerator> m_code_generator; ///< [owned by the Execution Engine] The Clang object that generates IR
- std::vector<JittedFunction> m_jitted_functions; ///< A vector of all functions that have been JITted into machine code (just one, if ParseExpression() was called)
+ std::auto_ptr<clang::CodeGenerator> m_code_generator; ///< The Clang object that generates IR
+ std::auto_ptr<IRExecutionUnit> m_execution_unit; ///< The container for the finished Module
};
}
OpenPOWER on IntegriCloud