[lldb/Plugins] Replace platform-specific macro with LLVM_PRETTY_FUNCTION (NFC)

This patch refactors Scripted Process and Scripted Thread related
classes to use LLVM_PRETTY_FUNCTION instead of the compiler macro.

Differential Revision: https://reviews.llvm.org/D111452

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
This commit is contained in:
Med Ismail Bennani
2021-10-08 18:48:02 +00:00
parent a6891d2104
commit 88a941ba64
6 changed files with 23 additions and 25 deletions

View File

@@ -233,7 +233,7 @@ bool ScriptedProcess::IsAlive() {
size_t ScriptedProcess::DoReadMemory(lldb::addr_t addr, void *buf, size_t size,
Status &error) {
if (!m_interpreter)
return GetInterface().ErrorWithMessage<size_t>(__PRETTY_FUNCTION__,
return GetInterface().ErrorWithMessage<size_t>(LLVM_PRETTY_FUNCTION,
"No interpreter.", error);
lldb::DataExtractorSP data_extractor_sp =
@@ -247,7 +247,7 @@ size_t ScriptedProcess::DoReadMemory(lldb::addr_t addr, void *buf, size_t size,
if (!bytes_copied || bytes_copied == LLDB_INVALID_OFFSET)
return GetInterface().ErrorWithMessage<size_t>(
__PRETTY_FUNCTION__, "Failed to copy read memory to buffer.", error);
LLVM_PRETTY_FUNCTION, "Failed to copy read memory to buffer.", error);
return size;
}
@@ -304,7 +304,7 @@ bool ScriptedProcess::DoUpdateThreadList(ThreadList &old_thread_list,
if (language != eScriptLanguagePython)
return GetInterface().ErrorWithMessage<bool>(
__PRETTY_FUNCTION__,
LLVM_PRETTY_FUNCTION,
llvm::Twine("ScriptInterpreter language (" +
llvm::Twine(m_interpreter->LanguageToString(language)) +
llvm::Twine(") not supported."))
@@ -315,7 +315,7 @@ bool ScriptedProcess::DoUpdateThreadList(ThreadList &old_thread_list,
thread_sp = std::make_shared<ScriptedThread>(*this, error);
if (!thread_sp || error.Fail())
return GetInterface().ErrorWithMessage<bool>(__PRETTY_FUNCTION__,
return GetInterface().ErrorWithMessage<bool>(LLVM_PRETTY_FUNCTION,
error.AsCString(), error);
new_thread_list.AddThread(thread_sp);