[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
This commit is contained in:
Jonas Devlieghere 2019-03-11 17:17:51 +00:00
parent f05b42e960
commit 90819cdb1b
3 changed files with 10 additions and 13 deletions

View 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);

View 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);

View 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);
}