git: 2e7b90a28f69 - stable/13 - Merge llvm-project release/16.x llvmorg-16.0.6-0-g7cbf1a259152
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 23 Jul 2023 18:27:12 UTC
The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=2e7b90a28f695ee74a8eeb7cccb0fcf281184407 commit 2e7b90a28f695ee74a8eeb7cccb0fcf281184407 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2023-06-22 17:47:54 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2023-07-23 17:38:11 +0000 Merge llvm-project release/16.x llvmorg-16.0.6-0-g7cbf1a259152 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-16.0.6-0-g7cbf1a259152 (aka 16.0.6 release). PR: 271047 MFC after: 1 month (cherry picked from commit e048f78b21438144bab781f2ba9ee33a2aae6772) --- contrib/llvm-project/libcxx/include/__config | 2 +- lib/clang/freebsd_cc_version.h | 2 - lib/clang/include/Plugins/Plugins.def | 1 - lib/clang/include/VCSVersion.inc | 8 +- lib/clang/include/clang/Basic/Version.inc | 8 +- lib/clang/include/clang/Config/config.h | 1 - lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Host/Config.h | 1 - lib/clang/include/lldb/Version/Version.inc | 6 +- lib/clang/include/llvm/Config/AsmParsers.def | 2 - lib/clang/include/llvm/Config/AsmPrinters.def | 2 - lib/clang/include/llvm/Config/Disassemblers.def | 2 - lib/clang/include/llvm/Config/TargetMCAs.def | 2 - lib/clang/include/llvm/Config/Targets.def | 2 - lib/clang/include/llvm/Config/abi-breaking.h | 1 - lib/clang/include/llvm/Config/config.h | 5 +- lib/clang/include/llvm/Config/llvm-config.h | 5 +- lib/clang/include/llvm/Support/Extension.def | 1 - lib/clang/include/llvm/Support/VCSRevision.h | 3 +- lib/clang/liblldb/LLDBWrapLua.cpp | 82074 +++++++++++----------- lib/clang/llvm.pre.mk | 1 - 21 files changed, 41074 insertions(+), 41057 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__config b/contrib/llvm-project/libcxx/include/__config index d7ba71906e26..10815388389a 100644 --- a/contrib/llvm-project/libcxx/include/__config +++ b/contrib/llvm-project/libcxx/include/__config @@ -38,7 +38,7 @@ // _LIBCPP_VERSION represents the version of libc++, which matches the version of LLVM. // Given a LLVM release LLVM XX.YY.ZZ (e.g. LLVM 16.0.1 == 16.00.01), _LIBCPP_VERSION is // defined to XXYYZZ. -# define _LIBCPP_VERSION 160005 +# define _LIBCPP_VERSION 160006 # define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y # define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y) diff --git a/lib/clang/freebsd_cc_version.h b/lib/clang/freebsd_cc_version.h index 37777d586b6d..e0441ae866f5 100644 --- a/lib/clang/freebsd_cc_version.h +++ b/lib/clang/freebsd_cc_version.h @@ -1,3 +1 @@ -/* $FreeBSD$ */ - #define FREEBSD_CC_VERSION 1300012 diff --git a/lib/clang/include/Plugins/Plugins.def b/lib/clang/include/Plugins/Plugins.def index 55ff6eae7c07..a1224b71fc75 100644 --- a/lib/clang/include/Plugins/Plugins.def +++ b/lib/clang/include/Plugins/Plugins.def @@ -1,4 +1,3 @@ -// $FreeBSD$ /*===- lldb/source/Plugin/Plugins.def ---------------------------*- C++ -*-===*\ |* *| |* Part of the LLVM Project, under the Apache License v2.0 with LLVM *| diff --git a/lib/clang/include/VCSVersion.inc b/lib/clang/include/VCSVersion.inc index 1daa9c25ab45..598871260c01 100644 --- a/lib/clang/include/VCSVersion.inc +++ b/lib/clang/include/VCSVersion.inc @@ -1,10 +1,8 @@ -// $FreeBSD$ - -#define LLVM_REVISION "llvmorg-16.0.5-0-g185b81e034ba" +#define LLVM_REVISION "llvmorg-16.0.6-0-g7cbf1a259152" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define CLANG_REVISION "llvmorg-16.0.5-0-g185b81e034ba" +#define CLANG_REVISION "llvmorg-16.0.6-0-g7cbf1a259152" #define CLANG_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define LLDB_REVISION "llvmorg-16.0.5-0-g185b81e034ba" +#define LLDB_REVISION "llvmorg-16.0.6-0-g7cbf1a259152" #define LLDB_REPOSITORY "https://github.com/llvm/llvm-project.git" diff --git a/lib/clang/include/clang/Basic/Version.inc b/lib/clang/include/clang/Basic/Version.inc index e99bc8fb4f95..d5aa1ce51f33 100644 --- a/lib/clang/include/clang/Basic/Version.inc +++ b/lib/clang/include/clang/Basic/Version.inc @@ -1,10 +1,8 @@ -/* $FreeBSD$ */ - -#define CLANG_VERSION 16.0.5 -#define CLANG_VERSION_STRING "16.0.5" +#define CLANG_VERSION 16.0.6 +#define CLANG_VERSION_STRING "16.0.6" #define CLANG_VERSION_MAJOR 16 #define CLANG_VERSION_MAJOR_STRING "16" #define CLANG_VERSION_MINOR 0 -#define CLANG_VERSION_PATCHLEVEL 5 +#define CLANG_VERSION_PATCHLEVEL 6 #define CLANG_VENDOR "FreeBSD " diff --git a/lib/clang/include/clang/Config/config.h b/lib/clang/include/clang/Config/config.h index 0cd1e12a4108..b2c85aa23d19 100644 --- a/lib/clang/include/clang/Config/config.h +++ b/lib/clang/include/clang/Config/config.h @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /* This generated file is for internal use. Do not include it from headers. */ #ifdef CLANG_CONFIG_H diff --git a/lib/clang/include/lld/Common/Version.inc b/lib/clang/include/lld/Common/Version.inc index f6061c3e6784..20810f686dad 100644 --- a/lib/clang/include/lld/Common/Version.inc +++ b/lib/clang/include/lld/Common/Version.inc @@ -1,4 +1,4 @@ // Local identifier in __FreeBSD_version style #define LLD_FREEBSD_VERSION 1400006 -#define LLD_VERSION_STRING "16.0.5 (FreeBSD llvmorg-16.0.5-0-g185b81e034ba-" __XSTRING(LLD_FREEBSD_VERSION) ")" +#define LLD_VERSION_STRING "16.0.6 (FreeBSD llvmorg-16.0.6-0-g7cbf1a259152-" __XSTRING(LLD_FREEBSD_VERSION) ")" diff --git a/lib/clang/include/lldb/Host/Config.h b/lib/clang/include/lldb/Host/Config.h index 0e855b6b09c6..8f6bdf58790e 100644 --- a/lib/clang/include/lldb/Host/Config.h +++ b/lib/clang/include/lldb/Host/Config.h @@ -1,4 +1,3 @@ -// $FreeBSD$ //===-- Config.h -----------------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/lib/clang/include/lldb/Version/Version.inc b/lib/clang/include/lldb/Version/Version.inc index 982e4714b182..99f8a8e09dea 100644 --- a/lib/clang/include/lldb/Version/Version.inc +++ b/lib/clang/include/lldb/Version/Version.inc @@ -1,6 +1,6 @@ -#define LLDB_VERSION 16.0.5 -#define LLDB_VERSION_STRING "16.0.5" +#define LLDB_VERSION 16.0.6 +#define LLDB_VERSION_STRING "16.0.6" #define LLDB_VERSION_MAJOR 16 #define LLDB_VERSION_MINOR 0 -#define LLDB_VERSION_PATCH 5 +#define LLDB_VERSION_PATCH 6 /* #undef LLDB_FULL_VERSION_STRING */ diff --git a/lib/clang/include/llvm/Config/AsmParsers.def b/lib/clang/include/llvm/Config/AsmParsers.def index d0924c0914f3..e37ea136a87b 100644 --- a/lib/clang/include/llvm/Config/AsmParsers.def +++ b/lib/clang/include/llvm/Config/AsmParsers.def @@ -1,5 +1,3 @@ -/* $FreeBSD$ */ - #ifndef LLVM_ASM_PARSER # error Please define the macro LLVM_ASM_PARSER(TargetName) #endif diff --git a/lib/clang/include/llvm/Config/AsmPrinters.def b/lib/clang/include/llvm/Config/AsmPrinters.def index 2a335aa93b42..819a52bc29e2 100644 --- a/lib/clang/include/llvm/Config/AsmPrinters.def +++ b/lib/clang/include/llvm/Config/AsmPrinters.def @@ -1,5 +1,3 @@ -/* $FreeBSD$ */ - #ifndef LLVM_ASM_PRINTER # error Please define the macro LLVM_ASM_PRINTER(TargetName) #endif diff --git a/lib/clang/include/llvm/Config/Disassemblers.def b/lib/clang/include/llvm/Config/Disassemblers.def index 756ff37b4bf8..90ab73d82294 100644 --- a/lib/clang/include/llvm/Config/Disassemblers.def +++ b/lib/clang/include/llvm/Config/Disassemblers.def @@ -1,5 +1,3 @@ -/* $FreeBSD$ */ - #ifndef LLVM_DISASSEMBLER # error Please define the macro LLVM_DISASSEMBLER(TargetName) #endif diff --git a/lib/clang/include/llvm/Config/TargetMCAs.def b/lib/clang/include/llvm/Config/TargetMCAs.def index be6edaf3dd69..e7d4e60c0098 100644 --- a/lib/clang/include/llvm/Config/TargetMCAs.def +++ b/lib/clang/include/llvm/Config/TargetMCAs.def @@ -1,5 +1,3 @@ -/* $FreeBSD$ */ - #ifndef LLVM_TARGETMCA # error Please define the macro LLVM_TARGETMCA(TargetName) #endif diff --git a/lib/clang/include/llvm/Config/Targets.def b/lib/clang/include/llvm/Config/Targets.def index b6cb6fee9dce..a9a64ccd4202 100644 --- a/lib/clang/include/llvm/Config/Targets.def +++ b/lib/clang/include/llvm/Config/Targets.def @@ -1,5 +1,3 @@ -/* $FreeBSD$ */ - #ifndef LLVM_TARGET # error Please define the macro LLVM_TARGET(TargetName) #endif diff --git a/lib/clang/include/llvm/Config/abi-breaking.h b/lib/clang/include/llvm/Config/abi-breaking.h index 1254d6218db3..eb90be1fe37b 100644 --- a/lib/clang/include/llvm/Config/abi-breaking.h +++ b/lib/clang/include/llvm/Config/abi-breaking.h @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*===------- llvm/Config/abi-breaking.h - llvm configuration -------*- C -*-===*/ /* */ /* Part of the LLVM Project, under the Apache License v2.0 with LLVM */ diff --git a/lib/clang/include/llvm/Config/config.h b/lib/clang/include/llvm/Config/config.h index d97252910e45..78af3cbddcd1 100644 --- a/lib/clang/include/llvm/Config/config.h +++ b/lib/clang/include/llvm/Config/config.h @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ #ifndef CONFIG_H #define CONFIG_H @@ -348,10 +347,10 @@ #define PACKAGE_NAME "LLVM" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "LLVM 16.0.5" +#define PACKAGE_STRING "LLVM 16.0.6" /* Define to the version of this package. */ -#define PACKAGE_VERSION "16.0.5" +#define PACKAGE_VERSION "16.0.6" /* Define to the vendor of this package. */ /* #undef PACKAGE_VENDOR */ diff --git a/lib/clang/include/llvm/Config/llvm-config.h b/lib/clang/include/llvm/Config/llvm-config.h index 82d246c949f0..cdf493029a3a 100644 --- a/lib/clang/include/llvm/Config/llvm-config.h +++ b/lib/clang/include/llvm/Config/llvm-config.h @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*===------- llvm/Config/llvm-config.h - llvm configuration -------*- C -*-===*/ /* */ /* Part of the LLVM Project, under the Apache License v2.0 with LLVM */ @@ -74,10 +73,10 @@ #define LLVM_VERSION_MINOR 0 /* Patch version of the LLVM API */ -#define LLVM_VERSION_PATCH 5 +#define LLVM_VERSION_PATCH 6 /* LLVM version string */ -#define LLVM_VERSION_STRING "16.0.5" +#define LLVM_VERSION_STRING "16.0.6" /* Whether LLVM records statistics for use with GetStatistics(), * PrintStatistics() or PrintStatisticsJSON() diff --git a/lib/clang/include/llvm/Support/Extension.def b/lib/clang/include/llvm/Support/Extension.def index 07fb3782b6c3..afb3240cecc2 100644 --- a/lib/clang/include/llvm/Support/Extension.def +++ b/lib/clang/include/llvm/Support/Extension.def @@ -1,3 +1,2 @@ -// $FreeBSD$ //extension handlers #undef HANDLE_EXTENSION diff --git a/lib/clang/include/llvm/Support/VCSRevision.h b/lib/clang/include/llvm/Support/VCSRevision.h index 95353f30f7ec..02b970068e71 100644 --- a/lib/clang/include/llvm/Support/VCSRevision.h +++ b/lib/clang/include/llvm/Support/VCSRevision.h @@ -1,3 +1,2 @@ -/* $FreeBSD$ */ -#define LLVM_REVISION "llvmorg-16.0.5-0-g185b81e034ba" +#define LLVM_REVISION "llvmorg-16.0.6-0-g7cbf1a259152" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" diff --git a/lib/clang/liblldb/LLDBWrapLua.cpp b/lib/clang/liblldb/LLDBWrapLua.cpp index ed5bec8c61da..73bd6373845b 100644 --- a/lib/clang/liblldb/LLDBWrapLua.cpp +++ b/lib/clang/liblldb/LLDBWrapLua.cpp @@ -1,45 +1,17 @@ /* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.2 + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.1.1 * - * This file is not intended to be easily readable and contains a number of - * coding conventions designed to improve portability and efficiency. Do not make - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. + * Do not make changes to this file unless you know what you are doing - modify + * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#ifndef SWIGLUA +#define SWIG_VERSION 0x040101 #define SWIGLUA -#endif - #define SWIG_LUA_TARGET SWIG_LUA_FLAVOR_LUA #define SWIG_LUA_MODULE_GLOBAL - -#ifdef __cplusplus -/* SwigValueWrapper is described in swig.swg */ -template<typename T> class SwigValueWrapper { - struct SwigMovePointer { - T *ptr; - SwigMovePointer(T *p) : ptr(p) { } - ~SwigMovePointer() { delete ptr; } - SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } - } pointer; - SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs); - SwigValueWrapper(const SwigValueWrapper<T>& rhs); -public: - SwigValueWrapper() : pointer(0) { } - SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } - operator T&() const { return *pointer.ptr; } - T *operator&() { return pointer.ptr; } -}; - -template <typename T> T SwigValueInit() { - return T(); -} -#endif - /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -210,6 +182,8 @@ template <typename T> T SwigValueInit() { #define SWIG_POINTER_DISOWN 0x1 #define SWIG_CAST_NEW_MEMORY 0x2 #define SWIG_POINTER_NO_NULL 0x4 +#define SWIG_POINTER_CLEAR 0x8 +#define SWIG_POINTER_RELEASE (SWIG_POINTER_CLEAR | SWIG_POINTER_DISOWN) /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 @@ -281,7 +255,7 @@ template <typename T> T SwigValueInit() { SWIG errors code. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code - allows to return the 'cast rank', for example, if you have this + allows returning the 'cast rank', for example, if you have this int food(double) int fooi(int); @@ -295,7 +269,13 @@ template <typename T> T SwigValueInit() { */ #define SWIG_OK (0) +/* Runtime errors are < 0 */ #define SWIG_ERROR (-1) +/* Errors in range -1 to -99 are in swigerrors.swg (errors for all languages including those not using the runtime) */ +/* Errors in range -100 to -199 are language specific errors defined in *errors.swg */ +/* Errors < -200 are generic runtime specific errors */ +#define SWIG_ERROR_RELEASE_NOT_OWNED (-200) + #define SWIG_IsOK(r) (r >= 0) #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) @@ -310,7 +290,7 @@ template <typename T> T SwigValueInit() { #define SWIG_OLDOBJ (SWIG_OK) #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) -/* Check, add and del mask methods */ +/* Check, add and del object mask methods */ #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) @@ -456,7 +436,7 @@ SWIG_TypeCheck(const char *c, swig_type_info *ty) { Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { +SWIG_TypeCheckStruct(const swig_type_info *from, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { @@ -516,9 +496,9 @@ SWIG_TypeName(const swig_type_info *ty) { SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type) { /* The "str" field contains the equivalent pretty names of the - type, separated by vertical-bar characters. We choose - to print the last name, as it is often (?) the most - specific. */ + type, separated by vertical-bar characters. Choose the last + name. It should be the most specific; a fully resolved name + but not necessarily with default template parameters expanded. */ if (!type) return NULL; if (type->str != NULL) { const char *last_name = type->str; @@ -738,7 +718,7 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { } #endif -/* Errors in SWIG */ +/* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */ #define SWIG_UnknownError -1 #define SWIG_IOError -2 #define SWIG_RuntimeError -3 @@ -754,7 +734,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #define SWIG_NullReferenceError -13 - /* ----------------------------------------------------------------------------- * luarun.swg * @@ -1064,7 +1043,7 @@ typedef struct { /* Contract support */ #define SWIG_contract_assert(expr, msg) \ - if (!(expr)) { SWIG_Lua_pusherrstring(L, (char *) msg); goto fail; } else + do { if (!(expr)) { SWIG_Lua_pusherrstring(L, (char *) msg); goto fail; } } while (0) /* helper #defines */ @@ -1583,7 +1562,7 @@ SWIGINTERN int SWIG_Lua_class_do_get_item(lua_State *L, swig_type_info *type, i /* NEW: looks for the __getitem() fn this is a user provided get fn */ SWIG_Lua_get_table(L,"__getitem"); /* find the __getitem fn */ - if (lua_iscfunction(L,-1)) /* if its there */ + if (lua_iscfunction(L,-1)) /* if it's there */ { /* found it so call the fn & return its value */ lua_pushvalue(L,substack_start+1); /* the userdata */ lua_pushvalue(L,substack_start+2); /* the parameter */ @@ -1640,7 +1619,7 @@ SWIGINTERN int SWIG_Lua_class_do_get(lua_State *L, swig_type_info *type, int SW lua_pushvalue(L,substack_start+2); /* key */ lua_rawget(L,-2); /* look for the fn */ lua_remove(L,-2); /* stack tidy, remove .fn table */ - if (lua_isfunction(L,-1)) /* note: if its a C function or lua function */ + if (lua_isfunction(L,-1)) /* note: if it's a C function or lua function */ { /* found it so return the fn & let lua call it */ lua_remove(L,-2); /* stack tidy, remove metatable */ if(ret) @@ -1723,7 +1702,7 @@ SWIGINTERN int SWIG_Lua_class_do_set(lua_State *L, swig_type_info *type, int fi /* NEW: looks for the __setitem() fn this is a user provided set fn */ SWIG_Lua_get_table(L,"__setitem"); /* find the fn */ - if (lua_iscfunction(L,-1)) /* if its there */ + if (lua_iscfunction(L,-1)) /* if it's there */ { /* found it so call the fn & return its value */ lua_pushvalue(L,substack_start+1); /* the userdata */ lua_pushvalue(L,substack_start+2); /* the parameter */ @@ -2100,15 +2079,15 @@ SWIGINTERN void SWIG_Lua_add_class_instance_details(lua_State *L, swig_lua_clas SWIGRUNTIME int SWIG_Lua_resolve_metamethod(lua_State *L); /*forward declaration*/ /* The real function that resolves a metamethod. - * Function searches given class and all it's bases(recursively) for first instance of something that is - * not equal to SWIG_Lua_resolve_metatmethod. (Almost always this 'something' is actual metamethod implementation + * Function searches given class and all its bases (recursively) for first instance of something that is + * not equal to SWIG_Lua_resolve_metamethod. (Almost always this 'something' is actual metamethod implementation * and it is a SWIG-generated C function.). It returns value on the top of the L and there is no garbage below the * answer. * Returns 1 if found, 0 otherwise. * clss is class which metatable we will search for method * metamethod_name_idx is index in L where metamethod name (as string) lies - * skip_check allows to skip searching metamethod in givel clss and immideatelly go to searching in bases. skip_check - * is not caried to subsequent recursive calls - false is always passed. It is set to true only at first call from + * skip_check allows skipping searching metamethod in the given class and immediately going to searching in bases. skip_check + * is not carried to subsequent recursive calls - false is always passed. It is set to true only at first call from * SWIG_Lua_resolve_metamethod * */ SWIGINTERN int SWIG_Lua_do_resolve_metamethod(lua_State *L, const swig_lua_class *clss, int metamethod_name_idx, @@ -2254,7 +2233,7 @@ SWIGINTERN void SWIG_Lua_add_class_user_metamethods(lua_State *L, swig_lua_class } } - lua_pop(L,1); /* remove inheritable metatmethods table */ + lua_pop(L,1); /* remove inheritable metamethods table */ /* Special handling for __tostring method */ lua_pushstring(L, "__tostring"); @@ -2514,6 +2493,7 @@ SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L,void *ptr,swig_type_info *t (if possible) */ SWIGRUNTIME int SWIG_Lua_ConvertPtr(lua_State *L,int index,void **ptr,swig_type_info *type,int flags) { + int ret = SWIG_ERROR; swig_lua_userdata *usr; swig_cast_info *cast; /* special case: lua nil => NULL pointer */ @@ -2530,30 +2510,41 @@ SWIGRUNTIME int SWIG_Lua_ConvertPtr(lua_State *L,int index,void **ptr,swig_type usr=(swig_lua_userdata*)lua_touserdata(L,index); /* get data */ if (usr) { + if (((flags & SWIG_POINTER_RELEASE) == SWIG_POINTER_RELEASE) && !usr->own) + { + return SWIG_ERROR_RELEASE_NOT_OWNED; + } if (flags & SWIG_POINTER_DISOWN) /* must disown the object */ { - usr->own=0; + usr->own = 0; } if (!type) /* special cast void*, no casting fn */ { *ptr=usr->ptr; - return SWIG_OK; /* ok */ + ret = SWIG_OK; } - cast=SWIG_TypeCheckStruct(usr->type,type); /* performs normal type checking */ - if (cast) + else { - int newmemory = 0; - *ptr=SWIG_TypeCast(cast,usr->ptr,&newmemory); - assert(!newmemory); /* newmemory handling not yet implemented */ - return SWIG_OK; /* ok */ + cast=SWIG_TypeCheck(usr->type->name,type); /* performs normal type checking */ + if (cast) + { + int newmemory = 0; + *ptr=SWIG_TypeCast(cast,usr->ptr,&newmemory); + assert(!newmemory); /* newmemory handling not yet implemented */ + ret = SWIG_OK; + } + } + if ((ret == SWIG_OK) && (flags & SWIG_POINTER_CLEAR)) + { + usr->ptr = 0; } } - return SWIG_ERROR; /* error */ + return ret; } SWIGRUNTIME void* SWIG_Lua_MustGetPtr(lua_State *L,int index,swig_type_info *type,int flags, int argnum,const char *func_name){ - void *result; + void *result = 0; if (!SWIG_IsOK(SWIG_ConvertPtr(L,index,&result,type,flags))){ luaL_error (L,"Error in %s, expected a %s at argument number %d\n", func_name,(type && type->str)?type->str:"void*",argnum); @@ -2946,6 +2937,54 @@ static swig_module_info swig_module = {swig_types, 236, 0, 0, 0, 0}; #define SWIG_LUACODE luaopen_lldb_luacode +#ifdef __cplusplus +#include <utility> +/* SwigValueWrapper is described in swig.swg */ +template<typename T> class SwigValueWrapper { + struct SwigSmartPointer { + T *ptr; + SwigSmartPointer(T *p) : ptr(p) { } + ~SwigSmartPointer() { delete ptr; } + SwigSmartPointer& operator=(SwigSmartPointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } + void reset(T *p) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = p; } + } pointer; + SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs); + SwigValueWrapper(const SwigValueWrapper<T>& rhs); +public: + SwigValueWrapper() : pointer(0) { } + SwigValueWrapper& operator=(const T& t) { SwigSmartPointer tmp(new T(t)); pointer = tmp; return *this; } +#if __cplusplus >=201103L + SwigValueWrapper& operator=(T&& t) { SwigSmartPointer tmp(new T(std::move(t))); pointer = tmp; return *this; } + operator T&&() const { return std::move(*pointer.ptr); } +#else + operator T&() const { return *pointer.ptr; } +#endif + T *operator&() const { return pointer.ptr; } + static void reset(SwigValueWrapper& t, T *p) { t.pointer.reset(p); } +}; + +/* + * SwigValueInit() is a generic initialisation solution as the following approach: + * + * T c_result = T(); + * + * doesn't compile for all types for example: + * + * unsigned int c_result = unsigned int(); + */ +template <typename T> T SwigValueInit() { + return T(); +} + +#if __cplusplus >=201103L +# define SWIG_STD_MOVE(OBJ) std::move(OBJ) +#else +# define SWIG_STD_MOVE(OBJ) OBJ +#endif + +#endif + + namespace swig { typedef struct{} LANGUAGE_OBJ; } @@ -3747,39 +3786,39 @@ static int LLDBSwigLuaCloseFileHandle(lua_State * L) { extern "C" { #endif static int _wrap_new_string__SWIG_0(lua_State* L) { - int SWIG_arg = 0; - std::string *result = 0 ; - - SWIG_check_num_args("std::string::string",0,0) - result = (std::string *)new std::string(); - SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__string,1); SWIG_arg++; - return SWIG_arg; - - if(0) SWIG_fail; - -fail: + { + int SWIG_arg = 0; + std::string *result = 0 ; + + SWIG_check_num_args("std::string::string",0,0) + result = (std::string *)new std::string(); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__string,1); SWIG_arg++; + return SWIG_arg; + + fail: SWIGUNUSED; + } lua_error(L); - return SWIG_arg; + return 0; } static int _wrap_new_string__SWIG_1(lua_State* L) { - int SWIG_arg = 0; - char *arg1 = (char *) 0 ; - std::string *result = 0 ; - - SWIG_check_num_args("std::string::string",1,1) - if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("std::string::string",1,"char const *"); - arg1 = (char *)lua_tostring(L, 1); - result = (std::string *)new std::string((char const *)arg1); - SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__string,1); SWIG_arg++; - return SWIG_arg; - - if(0) SWIG_fail; - -fail: + { + int SWIG_arg = 0; + char *arg1 = (char *) 0 ; + std::string *result = 0 ; + + SWIG_check_num_args("std::string::string",1,1) + if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("std::string::string",1,"char const *"); + arg1 = (char *)lua_tostring(L, 1); + result = (std::string *)new std::string((char const *)arg1); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__string,1); SWIG_arg++; + return SWIG_arg; + + fail: SWIGUNUSED; + } lua_error(L); - return SWIG_arg; + return 0; } @@ -3794,7 +3833,7 @@ static int _wrap_new_string(lua_State* L) { return _wrap_new_string__SWIG_0(L); } if (argc == 1) { - int _v; + int _v = 0; { _v = SWIG_lua_isnilstring(L,argv[0]); } @@ -3812,148 +3851,148 @@ static int _wrap_new_string(lua_State* L) { static int _wrap_string_size(lua_State* L) { - int SWIG_arg = 0; - std::string *arg1 = (std::string *) 0 ; - unsigned int result; - - SWIG_check_num_args("std::string::size",1,1) - if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::size",1,"std::string const *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){ - SWIG_fail_ptr("string_size",1,SWIGTYPE_p_std__string); + { + int SWIG_arg = 0; + std::string *arg1 = (std::string *) 0 ; + unsigned int result; + + SWIG_check_num_args("std::string::size",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::size",1,"std::string const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){ + SWIG_fail_ptr("string_size",1,SWIGTYPE_p_std__string); + } + + result = (unsigned int)((std::string const *)arg1)->size(); + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + fail: SWIGUNUSED; } - - result = (unsigned int)((std::string const *)arg1)->size(); - lua_pushnumber(L, (lua_Number) result); SWIG_arg++; - return SWIG_arg; - - if(0) SWIG_fail; - -fail: lua_error(L); - return SWIG_arg; + return 0; } static int _wrap_string_length(lua_State* L) { - int SWIG_arg = 0; - std::string *arg1 = (std::string *) 0 ; - unsigned int result; - - SWIG_check_num_args("std::string::length",1,1) - if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::length",1,"std::string const *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){ - SWIG_fail_ptr("string_length",1,SWIGTYPE_p_std__string); + { + int SWIG_arg = 0; + std::string *arg1 = (std::string *) 0 ; + unsigned int result; + + SWIG_check_num_args("std::string::length",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::length",1,"std::string const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){ + SWIG_fail_ptr("string_length",1,SWIGTYPE_p_std__string); + } + + result = (unsigned int)((std::string const *)arg1)->length(); + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + fail: SWIGUNUSED; } - - result = (unsigned int)((std::string const *)arg1)->length(); - lua_pushnumber(L, (lua_Number) result); SWIG_arg++; - return SWIG_arg; - - if(0) SWIG_fail; - -fail: lua_error(L); - return SWIG_arg; + return 0; } static int _wrap_string_empty(lua_State* L) { - int SWIG_arg = 0; - std::string *arg1 = (std::string *) 0 ; - bool result; - - SWIG_check_num_args("std::string::empty",1,1) - if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::empty",1,"std::string const *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){ - SWIG_fail_ptr("string_empty",1,SWIGTYPE_p_std__string); + { + int SWIG_arg = 0; + std::string *arg1 = (std::string *) 0 ; + bool result; + + SWIG_check_num_args("std::string::empty",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::empty",1,"std::string const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){ + SWIG_fail_ptr("string_empty",1,SWIGTYPE_p_std__string); + } + + result = (bool)((std::string const *)arg1)->empty(); + lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; + return SWIG_arg; + + fail: SWIGUNUSED; } - - result = (bool)((std::string const *)arg1)->empty(); - lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; - return SWIG_arg; - - if(0) SWIG_fail; - -fail: lua_error(L); - return SWIG_arg; + return 0; } static int _wrap_string_c_str(lua_State* L) { - int SWIG_arg = 0; - std::string *arg1 = (std::string *) 0 ; - char *result = 0 ; - - SWIG_check_num_args("std::string::c_str",1,1) - if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::c_str",1,"std::string const *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){ - SWIG_fail_ptr("string_c_str",1,SWIGTYPE_p_std__string); + { + int SWIG_arg = 0; + std::string *arg1 = (std::string *) 0 ; + char *result = 0 ; + + SWIG_check_num_args("std::string::c_str",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::c_str",1,"std::string const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){ + SWIG_fail_ptr("string_c_str",1,SWIGTYPE_p_std__string); + } + + result = (char *)((std::string const *)arg1)->c_str(); + lua_pushstring(L,(const char *)result); SWIG_arg++; + return SWIG_arg; + + fail: SWIGUNUSED; } - - result = (char *)((std::string const *)arg1)->c_str(); - lua_pushstring(L,(const char *)result); SWIG_arg++; - return SWIG_arg; - - if(0) SWIG_fail; - -fail: lua_error(L); - return SWIG_arg; + return 0; } static int _wrap_string_data(lua_State* L) { - int SWIG_arg = 0; - std::string *arg1 = (std::string *) 0 ; - char *result = 0 ; - - SWIG_check_num_args("std::string::data",1,1) - if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::data",1,"std::string const *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){ - SWIG_fail_ptr("string_data",1,SWIGTYPE_p_std__string); + { + int SWIG_arg = 0; + std::string *arg1 = (std::string *) 0 ; + char *result = 0 ; + + SWIG_check_num_args("std::string::data",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::data",1,"std::string const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){ + SWIG_fail_ptr("string_data",1,SWIGTYPE_p_std__string); + } + + result = (char *)((std::string const *)arg1)->data(); + lua_pushstring(L,(const char *)result); SWIG_arg++; + return SWIG_arg; + + fail: SWIGUNUSED; } - - result = (char *)((std::string const *)arg1)->data(); - lua_pushstring(L,(const char *)result); SWIG_arg++; - return SWIG_arg; - - if(0) SWIG_fail; - -fail: lua_error(L); - return SWIG_arg; + return 0; } static int _wrap_string_assign(lua_State* L) { - int SWIG_arg = 0; - std::string *arg1 = (std::string *) 0 ; - char *arg2 = (char *) 0 ; - - SWIG_check_num_args("std::string::assign",2,2) - if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::assign",1,"std::string *"); - if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("std::string::assign",2,"char const *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){ - SWIG_fail_ptr("string_assign",1,SWIGTYPE_p_std__string); + { + int SWIG_arg = 0; + std::string *arg1 = (std::string *) 0 ; + char *arg2 = (char *) 0 ; + + SWIG_check_num_args("std::string::assign",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::assign",1,"std::string *"); + if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("std::string::assign",2,"char const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){ + SWIG_fail_ptr("string_assign",1,SWIGTYPE_p_std__string); + } + + arg2 = (char *)lua_tostring(L, 2); + (arg1)->assign((char const *)arg2); + + return SWIG_arg; + + fail: SWIGUNUSED; } - - arg2 = (char *)lua_tostring(L, 2); - (arg1)->assign((char const *)arg2); - - return SWIG_arg; - - if(0) SWIG_fail; - -fail: lua_error(L); - return SWIG_arg; + return 0; } @@ -4011,99 +4050,99 @@ static const char *swig_string_base_names[] = {0}; static swig_lua_class _wrap_class_string = { "string", "string", &SWIGTYPE_p_std__string,_proxy__wrap_new_string, swig_delete_string, swig_string_methods, swig_string_attributes, &swig_string_Sf_SwigStatic, swig_string_meta, swig_string_bases, swig_string_base_names }; static int _wrap_new_SBAddress__SWIG_0(lua_State* L) { - int SWIG_arg = 0; - lldb::SBAddress *result = 0 ; - - SWIG_check_num_args("lldb::SBAddress::SBAddress",0,0) - result = (lldb::SBAddress *)new lldb::SBAddress(); - SWIG_NewPointerObj(L,result,SWIGTYPE_p_lldb__SBAddress,1); SWIG_arg++; - return SWIG_arg; - - if(0) SWIG_fail; - -fail: + { + int SWIG_arg = 0; + lldb::SBAddress *result = 0 ; + + SWIG_check_num_args("lldb::SBAddress::SBAddress",0,0) + result = (lldb::SBAddress *)new lldb::SBAddress(); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_lldb__SBAddress,1); SWIG_arg++; + return SWIG_arg; + + fail: SWIGUNUSED; + } lua_error(L); - return SWIG_arg; + return 0; } static int _wrap_new_SBAddress__SWIG_1(lua_State* L) { - int SWIG_arg = 0; - lldb::SBAddress *arg1 = 0 ; - lldb::SBAddress *result = 0 ; - - SWIG_check_num_args("lldb::SBAddress::SBAddress",1,1) - if(!lua_isuserdata(L,1)) SWIG_fail_arg("lldb::SBAddress::SBAddress",1,"lldb::SBAddress const &"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_lldb__SBAddress,0))){ - SWIG_fail_ptr("new_SBAddress",1,SWIGTYPE_p_lldb__SBAddress); + { + int SWIG_arg = 0; + lldb::SBAddress *arg1 = 0 ; + lldb::SBAddress *result = 0 ; + + SWIG_check_num_args("lldb::SBAddress::SBAddress",1,1) + if(!lua_isuserdata(L,1)) SWIG_fail_arg("lldb::SBAddress::SBAddress",1,"lldb::SBAddress const &"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_lldb__SBAddress,0))){ + SWIG_fail_ptr("new_SBAddress",1,SWIGTYPE_p_lldb__SBAddress); + } + + result = (lldb::SBAddress *)new lldb::SBAddress((lldb::SBAddress const &)*arg1); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_lldb__SBAddress,1); SWIG_arg++; + return SWIG_arg; + + fail: SWIGUNUSED; } - - result = (lldb::SBAddress *)new lldb::SBAddress((lldb::SBAddress const &)*arg1); - SWIG_NewPointerObj(L,result,SWIGTYPE_p_lldb__SBAddress,1); SWIG_arg++; - return SWIG_arg; - - if(0) SWIG_fail; *** 96857 LINES SKIPPED ***