[Reproducers] Replace callbacks with void*
authorJonas Devlieghere <jonas@devlieghere.com>
Mon, 11 Mar 2019 17:17:51 +0000 (17:17 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Mon, 11 Mar 2019 17:17:51 +0000 (17:17 +0000)
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
lldb/source/API/SBDebugger.cpp
lldb/source/API/SBExpressionOptions.cpp

index 6c2efa5..99f9a4f 100644 (file)
@@ -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);
 
index 693b0fe..82661f4 100644 (file)
@@ -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);
index ab9c149..e8ca600 100644 (file)
@@ -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);
 }