llvm_bitreader_wrap.cxx [plain text]
#ifdef __cplusplus
template<typename T> class SwigValueWrapper {
T *tt;
public:
SwigValueWrapper() : tt(0) { }
SwigValueWrapper(const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { }
SwigValueWrapper(const T& t) : tt(new T(t)) { }
~SwigValueWrapper() { delete tt; }
SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; }
operator T&() const { return *tt; }
T *operator&() { return tt; }
private:
SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
};
template <typename T> T SwigValueInit() {
return T();
}
#endif
#ifndef SWIGTEMPLATEDISAMBIGUATOR
# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
# define SWIGTEMPLATEDISAMBIGUATOR template
# elif defined(__HP_aCC)
# define SWIGTEMPLATEDISAMBIGUATOR template
# else
# define SWIGTEMPLATEDISAMBIGUATOR
# endif
#endif
#ifndef SWIGINLINE
# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
# define SWIGINLINE inline
# else
# define SWIGINLINE
# endif
#endif
#ifndef SWIGUNUSED
# if defined(__GNUC__)
# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
# define SWIGUNUSED __attribute__ ((__unused__))
# else
# define SWIGUNUSED
# endif
# elif defined(__ICC)
# define SWIGUNUSED __attribute__ ((__unused__))
# else
# define SWIGUNUSED
# endif
#endif
#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
# define SWIGUNUSEDPARM(p)
# else
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
# endif
#endif
#ifndef SWIGINTERN
# define SWIGINTERN static SWIGUNUSED
#endif
#ifndef SWIGINTERNINLINE
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif
#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
# ifndef GCC_HASCLASSVISIBILITY
# define GCC_HASCLASSVISIBILITY
# endif
#endif
#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
# if defined(STATIC_LINKED)
# define SWIGEXPORT
# else
# define SWIGEXPORT __declspec(dllexport)
# endif
# else
# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
# define SWIGEXPORT __attribute__ ((visibility("default")))
# else
# define SWIGEXPORT
# endif
# endif
#endif
#ifndef SWIGSTDCALL
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
# define SWIGSTDCALL __stdcall
# else
# define SWIGSTDCALL
# endif
#endif
#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE
#endif
#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
# define _SCL_SECURE_NO_DEPRECATE
#endif
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#if defined(_WIN32) || defined(__CYGWIN32__)
# define DllExport __declspec( dllexport )
# define SWIGSTDCALL __stdcall
#else
# define DllExport
# define SWIGSTDCALL
#endif
#ifdef __cplusplus
# include <new>
#endif
typedef enum
{
SWIG_AdaException,
SWIG_AdaOutOfMemoryException,
SWIG_AdaIndexOutOfRangeException,
SWIG_AdaDivideByZeroException,
SWIG_AdaArgumentOutOfRangeException,
SWIG_AdaNullReferenceException
} SWIG_AdaExceptionCodes;
typedef void (SWIGSTDCALL* SWIG_AdaExceptionCallback_t)(const char *);
typedef struct
{
SWIG_AdaExceptionCodes code;
SWIG_AdaExceptionCallback_t callback;
}
SWIG_AdaExceptions_t;
static
SWIG_AdaExceptions_t
SWIG_ada_exceptions[] =
{
{ SWIG_AdaException, NULL },
{ SWIG_AdaOutOfMemoryException, NULL },
{ SWIG_AdaIndexOutOfRangeException, NULL },
{ SWIG_AdaDivideByZeroException, NULL },
{ SWIG_AdaArgumentOutOfRangeException, NULL },
{ SWIG_AdaNullReferenceException, NULL }
};
static
void
SWIG_AdaThrowException (SWIG_AdaExceptionCodes code, const char *msg)
{
SWIG_AdaExceptionCallback_t callback = SWIG_ada_exceptions[SWIG_AdaException].callback;
if (code >=0 && (size_t)code < sizeof(SWIG_ada_exceptions)/sizeof(SWIG_AdaExceptions_t)) {
callback = SWIG_ada_exceptions[code].callback;
}
callback(msg);
}
#ifdef __cplusplus
extern "C"
#endif
DllExport void SWIGSTDCALL SWIGRegisterExceptionCallbacks_LLVM_bit_Reader (SWIG_AdaExceptionCallback_t systemException,
SWIG_AdaExceptionCallback_t outOfMemory,
SWIG_AdaExceptionCallback_t indexOutOfRange,
SWIG_AdaExceptionCallback_t divideByZero,
SWIG_AdaExceptionCallback_t argumentOutOfRange,
SWIG_AdaExceptionCallback_t nullReference)
{
SWIG_ada_exceptions [SWIG_AdaException].callback = systemException;
SWIG_ada_exceptions [SWIG_AdaOutOfMemoryException].callback = outOfMemory;
SWIG_ada_exceptions [SWIG_AdaIndexOutOfRangeException].callback = indexOutOfRange;
SWIG_ada_exceptions [SWIG_AdaDivideByZeroException].callback = divideByZero;
SWIG_ada_exceptions [SWIG_AdaArgumentOutOfRangeException].callback = argumentOutOfRange;
SWIG_ada_exceptions [SWIG_AdaNullReferenceException].callback = nullReference;
}
typedef char * (SWIGSTDCALL* SWIG_AdaStringHelperCallback)(const char *);
static SWIG_AdaStringHelperCallback SWIG_ada_string_callback = NULL;
#define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_AdaThrowException(SWIG_AdaArgumentOutOfRangeException, msg); return nullreturn; } else
#define protected public
#define private public
#include "llvm-c/BitReader.h"
#undef protected
#undef private
#ifdef __cplusplus
extern "C" {
#endif
DllExport int SWIGSTDCALL Ada_LLVMParseBitcode (
void * jarg1
,
void * jarg2
,
void * jarg3
)
{
int jresult ;
LLVMMemoryBufferRef arg1 = (LLVMMemoryBufferRef) 0 ;
LLVMModuleRef *arg2 = (LLVMModuleRef *) 0 ;
char **arg3 = (char **) 0 ;
int result;
arg1 = (LLVMMemoryBufferRef)jarg1;
arg2 = (LLVMModuleRef *)jarg2;
arg3 = (char **)jarg3;
result = (int)LLVMParseBitcode(arg1,arg2,arg3);
jresult = result;
return jresult;
}
DllExport int SWIGSTDCALL Ada_LLVMParseBitcodeInContext (
void * jarg1
,
void * jarg2
,
void * jarg3
,
void * jarg4
)
{
int jresult ;
LLVMMemoryBufferRef arg1 = (LLVMMemoryBufferRef) 0 ;
LLVMContextRef arg2 = (LLVMContextRef) 0 ;
LLVMModuleRef *arg3 = (LLVMModuleRef *) 0 ;
char **arg4 = (char **) 0 ;
int result;
arg1 = (LLVMMemoryBufferRef)jarg1;
arg2 = (LLVMContextRef)jarg2;
arg3 = (LLVMModuleRef *)jarg3;
arg4 = (char **)jarg4;
result = (int)LLVMParseBitcodeInContext(arg1,arg2,arg3,arg4);
jresult = result;
return jresult;
}
DllExport int SWIGSTDCALL Ada_LLVMGetBitcodeModuleProvider (
void * jarg1
,
void * jarg2
,
void * jarg3
)
{
int jresult ;
LLVMMemoryBufferRef arg1 = (LLVMMemoryBufferRef) 0 ;
LLVMModuleProviderRef *arg2 = (LLVMModuleProviderRef *) 0 ;
char **arg3 = (char **) 0 ;
int result;
arg1 = (LLVMMemoryBufferRef)jarg1;
arg2 = (LLVMModuleProviderRef *)jarg2;
arg3 = (char **)jarg3;
result = (int)LLVMGetBitcodeModuleProvider(arg1,arg2,arg3);
jresult = result;
return jresult;
}
DllExport int SWIGSTDCALL Ada_LLVMGetBitcodeModuleProviderInContext (
void * jarg1
,
void * jarg2
,
void * jarg3
,
void * jarg4
)
{
int jresult ;
LLVMMemoryBufferRef arg1 = (LLVMMemoryBufferRef) 0 ;
LLVMContextRef arg2 = (LLVMContextRef) 0 ;
LLVMModuleProviderRef *arg3 = (LLVMModuleProviderRef *) 0 ;
char **arg4 = (char **) 0 ;
int result;
arg1 = (LLVMMemoryBufferRef)jarg1;
arg2 = (LLVMContextRef)jarg2;
arg3 = (LLVMModuleProviderRef *)jarg3;
arg4 = (char **)jarg4;
result = (int)LLVMGetBitcodeModuleProviderInContext(arg1,arg2,arg3,arg4);
jresult = result;
return jresult;
}
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif