Commit 1cc0ba4c authored by Alexandre Ganea's avatar Alexandre Ganea
Browse files

[LLDB] Disable MSVC warning C4190: 'LLDBSwigPythonBreakpointCallbackFunction'...

[LLDB] Disable MSVC warning C4190: 'LLDBSwigPythonBreakpointCallbackFunction' has C-linkage specified, but returns UDT 'llvm::Expected<bool>' which is incompatible with C

Differential Revision: https://reviews.llvm.org/D70830
parent 8bf31e28
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -77,11 +77,23 @@ extern "C" void init_lldb(void);
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreturn-type-c-linkage"

// Disable warning C4190: 'LLDBSwigPythonBreakpointCallbackFunction' has
// C-linkage specified, but returns UDT 'llvm::Expected<bool>' which is
// incompatible with C
#if _MSC_VER
#pragma warning (push)
#pragma warning (disable : 4190)
#endif

extern "C" llvm::Expected<bool> LLDBSwigPythonBreakpointCallbackFunction(
    const char *python_function_name, const char *session_dictionary_name,
    const lldb::StackFrameSP &sb_frame,
    const lldb::BreakpointLocationSP &sb_bp_loc, StructuredDataImpl *args_impl);

#if _MSC_VER
#pragma warning (pop)
#endif

#pragma clang diagnostic pop

extern "C" bool LLDBSwigPythonWatchpointCallbackFunction(
+12 −0
Original line number Diff line number Diff line
@@ -62,6 +62,14 @@ extern "C" void init_lldb(void) {}
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreturn-type-c-linkage"

// Disable warning C4190: 'LLDBSwigPythonBreakpointCallbackFunction' has
// C-linkage specified, but returns UDT 'llvm::Expected<bool>' which is
// incompatible with C
#if _MSC_VER
#pragma warning (push)
#pragma warning (disable : 4190)
#endif

extern "C" llvm::Expected<bool> LLDBSwigPythonBreakpointCallbackFunction(
    const char *python_function_name, const char *session_dictionary_name,
    const lldb::StackFrameSP &sb_frame,
@@ -70,6 +78,10 @@ extern "C" llvm::Expected<bool> LLDBSwigPythonBreakpointCallbackFunction(
  return false;
}

#if _MSC_VER
#pragma warning (pop)
#endif

#pragma clang diagnostic pop

extern "C" bool LLDBSwigPythonWatchpointCallbackFunction(