ports/devel/llvm11/files/patch-swig
Po-Chuan Hsieh 64a65d814b
devel/llvm11: Use swig40 instead of swig
Some issues for swig 4.1.1 has been fixed in patch-swig. However, it still does
not build successfully, Therefore, use swig40 instead of swig for now.

PR:             270720
2023-04-19 05:39:17 +08:00

90 lines
3.9 KiB
Text

--- tools/lldb/bindings/CMakeLists.txt.orig 2020-12-18 19:57:38 UTC
+++ tools/lldb/bindings/CMakeLists.txt
@@ -26,8 +26,6 @@ set(SWIG_COMMON_FLAGS
-features autodoc
-I${LLDB_SOURCE_DIR}/include
-I${CMAKE_CURRENT_SOURCE_DIR}
- -D__STDC_LIMIT_MACROS
- -D__STDC_CONSTANT_MACROS
${DARWIN_EXTRAS}
-outdir ${CMAKE_CURRENT_BINARY_DIR}
)
--- tools/lldb/bindings/interface/SBAddress.i.orig 2020-12-18 19:57:38 UTC
+++ tools/lldb/bindings/interface/SBAddress.i
@@ -17,9 +17,10 @@ libraries, bundles, frameworks) being loaded at differ
addresses than the addresses found in the object file that
represents them on disk. There are currently two types of addresses
for a section:
- o file addresses
- o load addresses
+* file addresses
+* load addresses
+
File addresses represents the virtual addresses that are in the 'on
disk' object files. These virtual addresses are converted to be
relative to unique sections scoped to the object file so that
@@ -108,18 +109,17 @@ class SBAddress (public)
An address might refer to code or data from an existing module, or it
might refer to something on the stack or heap. The following functions
will only return valid values if the address has been resolved to a code
- or data address using 'void SBAddress::SetLoadAddress(...)' or
- 'lldb::SBAddress SBTarget::ResolveLoadAddress (...)'.") GetSymbolContext;
+ or data address using :py:class:`SBAddress.SetLoadAddress' or
+ :py:class:`SBTarget.ResolveLoadAddress`.") GetSymbolContext;
lldb::SBSymbolContext
GetSymbolContext (uint32_t resolve_scope);
%feature("docstring", "
GetModule() and the following grab individual objects for a given address and
are less efficient if you want more than one symbol related objects.
- Use one of the following when you want multiple debug symbol related
- objects for an address:
- lldb::SBSymbolContext SBAddress::GetSymbolContext (uint32_t resolve_scope);
- lldb::SBSymbolContext SBTarget::ResolveSymbolContextForAddress (const SBAddress &addr, uint32_t resolve_scope);
+ Use :py:class:`SBAddress.GetSymbolContext` or
+ :py:class:`SBTarget.ResolveSymbolContextForAddress` when you want multiple
+ debug symbol related objects for an address.
One or more bits from the SymbolContextItem enumerations can be logically
OR'ed together to more efficiently retrieve multiple symbol objects.") GetModule;
lldb::SBModule
--- tools/lldb/bindings/interface/SBValueList.i.orig 2020-12-18 19:57:38 UTC
+++ tools/lldb/bindings/interface/SBValueList.i
@@ -102,7 +102,6 @@ class SBValueList (public)
GetFirstValueByName (const char* name) const;
%extend {
- %nothreadallow;
std::string lldb::SBValueList::__str__ (){
lldb::SBStream description;
const size_t n = $self->GetSize();
@@ -121,7 +120,6 @@ class SBValueList (public)
--desc_len;
return std::string(desc, desc_len);
}
- %clearnothreadallow;
}
#ifdef SWIGPYTHON
--- tools/lldb/bindings/interfaces.swig.orig 2020-12-18 19:57:38 UTC
+++ tools/lldb/bindings/interfaces.swig
@@ -1,8 +1,5 @@
/* Various liblldb typedefs that SWIG needs to know about. */
#define __extension__ /* Undefine GCC keyword to make Swig happy when processing glibc's stdint.h. */
-/* The ISO C99 standard specifies that in C++ implementations limit macros such
- as INT32_MAX should only be defined if __STDC_LIMIT_MACROS is. */
-#define __STDC_LIMIT_MACROS
%include "stdint.i"
%include "lldb/lldb-defines.h"
--- tools/lldb/bindings/python/python-typemaps.swig.orig 2020-12-18 19:57:38 UTC
+++ tools/lldb/bindings/python/python-typemaps.swig
@@ -433,7 +433,7 @@ bool SetNumberFromPyObject<double>(double &number, PyO
%typemap(out) lldb::FileSP {
$result = nullptr;
- lldb::FileSP &sp = $1;
+ const lldb::FileSP &sp = $1;
if (sp) {
PythonFile pyfile = unwrapOrSetPythonException(PythonFile::FromFile(*sp));
if (!pyfile.IsValid())