From 90819cdb1b611bc11cefeb6ad03a121979a9e1b9 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Mon, 11 Mar 2019 17:17:51 +0000 Subject: [PATCH] [Reproducers] Replace callbacks with void* Callbacks in the LLDB_RECORD_DUMMY macros were causing build failures with the Xcode project. This patch replaces the function pointers with void pointers so they can be logged. llvm-svn: 355842 --- lldb/source/API/SBCommunication.cpp | 2 +- lldb/source/API/SBDebugger.cpp | 19 ++++++++----------- lldb/source/API/SBExpressionOptions.cpp | 2 +- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/lldb/source/API/SBCommunication.cpp b/lldb/source/API/SBCommunication.cpp index 6c2efa5..99f9a4f 100644 --- a/lldb/source/API/SBCommunication.cpp +++ b/lldb/source/API/SBCommunication.cpp @@ -157,7 +157,7 @@ bool SBCommunication::ReadThreadIsRunning() { bool SBCommunication::SetReadThreadBytesReceivedCallback( ReadThreadBytesReceived callback, void *callback_baton) { - LLDB_RECORD_DUMMY(bool, SBCommunication, SetReadThreadBytesReceivedCallback, + LLDB_RECORD_DUMMY(bool, SBCommunication, void *, (lldb::SBCommunication::ReadThreadBytesReceived, void *), callback, callback_baton); diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp index 693b0fe..82661f4 100644 --- a/lldb/source/API/SBDebugger.cpp +++ b/lldb/source/API/SBDebugger.cpp @@ -141,13 +141,11 @@ SBError SBInputReader::Initialize( unsigned long), void *a, lldb::InputReaderGranularity b, char const *c, char const *d, bool e) { - LLDB_RECORD_DUMMY( - lldb::SBError, SBInputReader, Initialize, - (lldb::SBDebugger &, - unsigned long (*)(void *, lldb::SBInputReader *, lldb::InputReaderAction, - const char *, unsigned long), - void *, lldb::InputReaderGranularity, const char *, const char *, bool), - sb_debugger, callback, a, b, c, d, e); + LLDB_RECORD_DUMMY(lldb::SBError, SBInputReader, Initialize, + (lldb::SBDebugger &, void *, void *, + lldb::InputReaderGranularity, const char *, const char *, + bool), + sb_debugger, callback, a, b, c, d, e); return SBError(); } @@ -239,8 +237,7 @@ SBDebugger SBDebugger::Create(bool source_init_files, { LLDB_RECORD_DUMMY(lldb::SBDebugger, SBDebugger, Create, - (bool, lldb::LogOutputCallback, void *), source_init_files, - callback, baton); + (bool, void *, void *), source_init_files, callback, baton); SBDebugger debugger; @@ -1536,8 +1533,8 @@ bool SBDebugger::EnableLog(const char *channel, const char **categories) { void SBDebugger::SetLoggingCallback(lldb::LogOutputCallback log_callback, void *baton) { - LLDB_RECORD_DUMMY(void, SBDebugger, SetLoggingCallback, - (lldb::LogOutputCallback, void *), log_callback, baton); + LLDB_RECORD_DUMMY(void, SBDebugger, SetLoggingCallback, (void *, void *), + log_callback, baton); if (m_opaque_sp) { return m_opaque_sp->SetLoggingCallback(log_callback, baton); diff --git a/lldb/source/API/SBExpressionOptions.cpp b/lldb/source/API/SBExpressionOptions.cpp index ab9c149..e8ca600 100644 --- a/lldb/source/API/SBExpressionOptions.cpp +++ b/lldb/source/API/SBExpressionOptions.cpp @@ -180,7 +180,7 @@ void SBExpressionOptions::SetLanguage(lldb::LanguageType language) { void SBExpressionOptions::SetCancelCallback( lldb::ExpressionCancelCallback callback, void *baton) { LLDB_RECORD_DUMMY(void, SBExpressionOptions, SetCancelCallback, - (lldb::ExpressionCancelCallback, void *), callback, baton); + (void *, void *), callback, baton); m_opaque_up->SetCancelCallback(callback, baton); } -- 2.7.4