From 88a941ba64a3824e1a6bac178034e4fce548f6cb Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Fri, 8 Oct 2021 18:48:02 +0000 Subject: [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 --- .../Python/ScriptedProcessPythonInterface.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp') diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp index ffaee26..29680da 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp @@ -72,7 +72,7 @@ bool ScriptedProcessPythonInterface::ShouldStop() { Status error; StructuredData::ObjectSP obj = Dispatch("is_alive", error); - if (!CheckStructuredDataObject(__PRETTY_FUNCTION__, obj, error)) + if (!CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, obj, error)) return {}; return obj->GetBooleanValue(); @@ -89,7 +89,7 @@ ScriptedProcessPythonInterface::GetMemoryRegionContainingAddress( "get_memory_region_containing_address", error, address); if (error.Fail()) { - return ErrorWithMessage(__PRETTY_FUNCTION__, + return ErrorWithMessage(LLVM_PRETTY_FUNCTION, error.AsCString(), error); } @@ -101,7 +101,7 @@ ScriptedProcessPythonInterface::GetThreadWithID(lldb::tid_t tid) { Status error; StructuredData::ObjectSP obj = Dispatch("get_thread_with_id", error, tid); - if (!CheckStructuredDataObject(__PRETTY_FUNCTION__, obj, error)) + if (!CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, obj, error)) return {}; StructuredData::DictionarySP dict{obj->GetAsDictionary()}; @@ -130,7 +130,7 @@ lldb::pid_t ScriptedProcessPythonInterface::GetProcessID() { Status error; StructuredData::ObjectSP obj = Dispatch("get_process_id", error); - if (!CheckStructuredDataObject(__PRETTY_FUNCTION__, obj, error)) + if (!CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, obj, error)) return LLDB_INVALID_PROCESS_ID; return obj->GetIntegerValue(LLDB_INVALID_PROCESS_ID); @@ -140,7 +140,7 @@ bool ScriptedProcessPythonInterface::IsAlive() { Status error; StructuredData::ObjectSP obj = Dispatch("is_alive", error); - if (!CheckStructuredDataObject(__PRETTY_FUNCTION__, obj, error)) + if (!CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, obj, error)) return {}; return obj->GetBooleanValue(); @@ -151,7 +151,7 @@ ScriptedProcessPythonInterface::GetScriptedThreadPluginName() { Status error; StructuredData::ObjectSP obj = Dispatch("get_scripted_thread_plugin", error); - if (!CheckStructuredDataObject(__PRETTY_FUNCTION__, obj, error)) + if (!CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, obj, error)) return {}; return obj->GetStringValue().str(); -- cgit v1.1