[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
This commit is contained in:
Alexandre Ganea 2019-12-03 09:53:26 -05:00
parent 8bf31e28d7
commit 1cc0ba4cbd
2 changed files with 24 additions and 0 deletions

View File

@ -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(

View File

@ -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(