diff options
Diffstat (limited to 'lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp')
| -rw-r--r-- | lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp index 1437d7b58293..78b8bf11220a 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp @@ -49,6 +49,7 @@ #include "lldb/Target/ThreadPlan.h" #include "lldb/Target/ThreadPlanCallUserExpression.h" #include "lldb/Utility/ConstString.h" +#include "lldb/Utility/LLDBLog.h" #include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" @@ -89,7 +90,7 @@ ClangUserExpression::ClangUserExpression( ClangUserExpression::~ClangUserExpression() = default; void ClangUserExpression::ScanContext(ExecutionContext &exe_ctx, Status &err) { - Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); + Log *log = GetLog(LLDBLog::Expressions); LLDB_LOGF(log, "ClangUserExpression::ScanContext()"); @@ -456,14 +457,14 @@ static bool SupportsCxxModuleImport(lldb::LanguageType language) { /// Utility method that puts a message into the expression log and /// returns an invalid module configuration. static CppModuleConfiguration LogConfigError(const std::string &msg) { - Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); + Log *log = GetLog(LLDBLog::Expressions); LLDB_LOG(log, "[C++ module config] {0}", msg); return CppModuleConfiguration(); } CppModuleConfiguration GetModuleConfig(lldb::LanguageType language, ExecutionContext &exe_ctx) { - Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); + Log *log = GetLog(LLDBLog::Expressions); // Don't do anything if this is not a C++ module configuration. if (!SupportsCxxModuleImport(language)) @@ -621,7 +622,7 @@ bool ClangUserExpression::TryParse( } void ClangUserExpression::SetupCppModuleImports(ExecutionContext &exe_ctx) { - Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); + Log *log = GetLog(LLDBLog::Expressions); CppModuleConfiguration module_config = GetModuleConfig(m_language, exe_ctx); m_imported_cpp_modules = module_config.GetImportedModules(); @@ -647,7 +648,7 @@ bool ClangUserExpression::Parse(DiagnosticManager &diagnostic_manager, lldb_private::ExecutionPolicy execution_policy, bool keep_result_in_memory, bool generate_debug_info) { - Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); + Log *log = GetLog(LLDBLog::Expressions); if (!PrepareForParsing(diagnostic_manager, exe_ctx, /*for_completion*/ false)) return false; @@ -806,7 +807,7 @@ static void AbsPosToLineColumnPos(size_t abs_pos, llvm::StringRef code, bool ClangUserExpression::Complete(ExecutionContext &exe_ctx, CompletionRequest &request, unsigned complete_pos) { - Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); + Log *log = GetLog(LLDBLog::Expressions); // We don't want any visible feedback when completing an expression. Mostly // because the results we get from an incomplete invocation are probably not @@ -857,7 +858,7 @@ bool ClangUserExpression::Complete(ExecutionContext &exe_ctx, // The line and column of the user expression inside the transformed source // code. unsigned user_expr_line, user_expr_column; - if (m_user_expression_start_pos.hasValue()) + if (m_user_expression_start_pos) AbsPosToLineColumnPos(*m_user_expression_start_pos, m_transformed_text, user_expr_line, user_expr_column); else |
