diff options
Diffstat (limited to 'source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h')
-rw-r--r-- | source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h | 44 |
1 files changed, 38 insertions, 6 deletions
diff --git a/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h b/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h index 3c055380b839..34c0212b73a4 100644 --- a/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h +++ b/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h @@ -10,11 +10,12 @@ #ifndef liblldb_ClangExpressionParser_h_ #define liblldb_ClangExpressionParser_h_ -#include "lldb/lldb-public.h" #include "lldb/Core/ArchSpec.h" #include "lldb/Core/ClangForward.h" #include "lldb/Core/Error.h" +#include "lldb/Expression/DiagnosticManager.h" #include "lldb/Expression/ExpressionParser.h" +#include "lldb/lldb-public.h" #include <string> #include <vector> @@ -63,16 +64,19 @@ public: /// Parse a single expression and convert it to IR using Clang. Don't /// wrap the expression in anything at all. /// - /// @param[in] stream - /// The stream to print errors to. + /// @param[in] diagnostic_manager + /// The diagnostic manager to report errors to. /// /// @return /// The number of errors encountered during parsing. 0 means /// success. //------------------------------------------------------------------ unsigned - Parse (Stream &stream) override; + Parse(DiagnosticManager &diagnostic_manager) override; + bool + RewriteExpression(DiagnosticManager &diagnostic_manager) override; + //------------------------------------------------------------------ /// Ready an already-parsed expression for execution, possibly /// evaluating it statically. @@ -98,7 +102,7 @@ public: /// /// @param[out] const_result /// If the result of the expression is constant, and the - /// expression has no side effects, this is set to the result of the + /// expression has no side effects, this is set to the result of the /// expression. /// /// @param[in] execution_policy @@ -117,7 +121,35 @@ public: ExecutionContext &exe_ctx, bool &can_interpret, lldb_private::ExecutionPolicy execution_policy) override; - + + //------------------------------------------------------------------ + /// Run all static initializers for an execution unit. + /// + /// @param[in] execution_unit_sp + /// The execution unit. + /// + /// @param[in] exe_ctx + /// The execution context to use when running them. Thread can't be null. + /// + /// @return + /// The error code indicating the + //------------------------------------------------------------------ + Error + RunStaticInitializers (lldb::IRExecutionUnitSP &execution_unit_sp, + ExecutionContext &exe_ctx); + + //------------------------------------------------------------------ + /// Returns a string representing current ABI. + /// + /// @param[in] target_arch + /// The target architecture. + /// + /// @return + /// A string representing target ABI for the current architecture. + //------------------------------------------------------------------- + std::string + GetClangTargetABI (const ArchSpec &target_arch); + private: std::unique_ptr<llvm::LLVMContext> m_llvm_context; ///< The LLVM context to generate IR into std::unique_ptr<clang::FileManager> m_file_manager; ///< The Clang file manager object used by the compiler |