diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2024-05-03 09:25:38 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-03 09:25:38 -0700 |
| commit | 528f5ba7af2729bb7e23f0846b75e4f25af2bf8d (patch) | |
| tree | e0a5c39fc960e9329c593ce0aaeea7fd6131737d /lldb/source/Expression/FunctionCaller.cpp | |
| parent | 8d946c71712daeabf6636ff3844fa49e4638324b (diff) | |
[lldb] Create a single Severity enum in lldb-enumerations (#90917)
We have 3 different enums all expressing severity (info, warning,
error). Remove all uses with a new Severity enum in lldb-enumerations.h.
Diffstat (limited to 'lldb/source/Expression/FunctionCaller.cpp')
| -rw-r--r-- | lldb/source/Expression/FunctionCaller.cpp | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/lldb/source/Expression/FunctionCaller.cpp b/lldb/source/Expression/FunctionCaller.cpp index ffadbf9b32ec..5ac2b0681ebb 100644 --- a/lldb/source/Expression/FunctionCaller.cpp +++ b/lldb/source/Expression/FunctionCaller.cpp @@ -67,27 +67,25 @@ bool FunctionCaller::WriteFunctionWrapper( Process *process = exe_ctx.GetProcessPtr(); if (!process) { - diagnostic_manager.Printf(eDiagnosticSeverityError, "no process."); + diagnostic_manager.Printf(lldb::eSeverityError, "no process."); return false; } lldb::ProcessSP jit_process_sp(m_jit_process_wp.lock()); if (process != jit_process_sp.get()) { - diagnostic_manager.Printf(eDiagnosticSeverityError, - "process does not match the stored process."); + diagnostic_manager.Printf(lldb::eSeverityError, + "process does not match the stored process."); return false; } if (process->GetState() != lldb::eStateStopped) { - diagnostic_manager.Printf(eDiagnosticSeverityError, - "process is not stopped"); + diagnostic_manager.Printf(lldb::eSeverityError, "process is not stopped"); return false; } if (!m_compiled) { - diagnostic_manager.Printf(eDiagnosticSeverityError, - "function not compiled"); + diagnostic_manager.Printf(lldb::eSeverityError, "function not compiled"); return false; } @@ -101,7 +99,7 @@ bool FunctionCaller::WriteFunctionWrapper( can_interpret, eExecutionPolicyAlways)); if (!jit_error.Success()) { - diagnostic_manager.Printf(eDiagnosticSeverityError, + diagnostic_manager.Printf(lldb::eSeverityError, "Error in PrepareForExecution: %s.", jit_error.AsCString()); return false; @@ -144,7 +142,7 @@ bool FunctionCaller::WriteFunctionArguments( // All the information to reconstruct the struct is provided by the // StructExtractor. if (!m_struct_valid) { - diagnostic_manager.PutString(eDiagnosticSeverityError, + diagnostic_manager.PutString(lldb::eSeverityError, "Argument information was not correctly " "parsed, so the function cannot be called."); return false; @@ -192,7 +190,7 @@ bool FunctionCaller::WriteFunctionArguments( size_t num_args = arg_values.GetSize(); if (num_args != m_arg_values.GetSize()) { diagnostic_manager.Printf( - eDiagnosticSeverityError, + lldb::eSeverityError, "Wrong number of arguments - was: %" PRIu64 " should be: %" PRIu64 "", (uint64_t)num_args, (uint64_t)m_arg_values.GetSize()); return false; @@ -231,11 +229,11 @@ bool FunctionCaller::InsertFunction(ExecutionContext &exe_ctx, // the caller, we need to be stopped. Process *process = exe_ctx.GetProcessPtr(); if (!process) { - diagnostic_manager.PutString(eDiagnosticSeverityError, "no process"); + diagnostic_manager.PutString(lldb::eSeverityError, "no process"); return false; } if (process->GetState() != lldb::eStateStopped) { - diagnostic_manager.PutString(eDiagnosticSeverityError, "process running"); + diagnostic_manager.PutString(lldb::eSeverityError, "process running"); return false; } if (CompileFunction(exe_ctx.GetThreadSP(), diagnostic_manager) != 0) @@ -267,8 +265,7 @@ lldb::ThreadPlanSP FunctionCaller::GetThreadPlanToCallFunction( Thread *thread = exe_ctx.GetThreadPtr(); if (thread == nullptr) { diagnostic_manager.PutString( - eDiagnosticSeverityError, - "Can't call a function without a valid thread."); + lldb::eSeverityError, "Can't call a function without a valid thread."); return nullptr; } |
