1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
5 * This file is not intended to be easily readable and contains a number of
6 * coding conventions designed to improve portability and efficiency. Do not make
7 * changes to this file unless you know what you are doing--modify the SWIG
8 * interface file instead.
9 * ----------------------------------------------------------------------------- */
13 template<typename T
> class SwigValueWrapper
{
16 SwigValueWrapper() : tt(0) { }
17 SwigValueWrapper(const SwigValueWrapper
<T
>& rhs
) : tt(new T(*rhs
.tt
)) { }
18 SwigValueWrapper(const T
& t
) : tt(new T(t
)) { }
19 ~SwigValueWrapper() { delete tt
; }
20 SwigValueWrapper
& operator=(const T
& t
) { delete tt
; tt
= new T(t
); return *this; }
21 operator T
&() const { return *tt
; }
22 T
*operator&() { return tt
; }
24 SwigValueWrapper
& operator=(const SwigValueWrapper
<T
>& rhs
);
27 template <typename T
> T
SwigValueInit() {
32 /* -----------------------------------------------------------------------------
33 * This section contains generic SWIG labels for method/variable
34 * declarations/attributes, and other compiler dependent labels.
35 * ----------------------------------------------------------------------------- */
37 /* template workaround for compilers that cannot correctly implement the C++ standard */
38 #ifndef SWIGTEMPLATEDISAMBIGUATOR
39 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
40 # define SWIGTEMPLATEDISAMBIGUATOR template
41 # elif defined(__HP_aCC)
42 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
43 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
44 # define SWIGTEMPLATEDISAMBIGUATOR template
46 # define SWIGTEMPLATEDISAMBIGUATOR
50 /* inline attribute */
52 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
53 # define SWIGINLINE inline
59 /* attribute recognised by some compilers to avoid 'unused' warnings */
61 # if defined(__GNUC__)
62 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
63 # define SWIGUNUSED __attribute__ ((__unused__))
68 # define SWIGUNUSED __attribute__ ((__unused__))
74 #ifndef SWIGUNUSEDPARM
76 # define SWIGUNUSEDPARM(p)
78 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
82 /* internal SWIG method */
84 # define SWIGINTERN static SWIGUNUSED
87 /* internal inline SWIG method */
88 #ifndef SWIGINTERNINLINE
89 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
92 /* exporting methods */
93 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
94 # ifndef GCC_HASCLASSVISIBILITY
95 # define GCC_HASCLASSVISIBILITY
100 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
101 # if defined(STATIC_LINKED)
104 # define SWIGEXPORT __declspec(dllexport)
107 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
108 # define SWIGEXPORT __attribute__ ((visibility("default")))
115 /* calling conventions for Windows */
117 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
118 # define SWIGSTDCALL __stdcall
124 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
125 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
126 # define _CRT_SECURE_NO_DEPRECATE
129 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
130 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
131 # define _SCL_SECURE_NO_DEPRECATE
139 #if defined(_WIN32) || defined(__CYGWIN32__)
140 # define DllExport __declspec( dllexport )
141 # define SWIGSTDCALL __stdcall
155 /* Support for throwing Ada exceptions from C/C++ */
160 SWIG_AdaOutOfMemoryException
,
161 SWIG_AdaIndexOutOfRangeException
,
162 SWIG_AdaDivideByZeroException
,
163 SWIG_AdaArgumentOutOfRangeException
,
164 SWIG_AdaNullReferenceException
165 } SWIG_AdaExceptionCodes
;
168 typedef void (SWIGSTDCALL
* SWIG_AdaExceptionCallback_t
)(const char *);
173 SWIG_AdaExceptionCodes code
;
174 SWIG_AdaExceptionCallback_t callback
;
176 SWIG_AdaExceptions_t
;
181 SWIG_ada_exceptions
[] =
183 { SWIG_AdaException
, NULL
},
184 { SWIG_AdaOutOfMemoryException
, NULL
},
185 { SWIG_AdaIndexOutOfRangeException
, NULL
},
186 { SWIG_AdaDivideByZeroException
, NULL
},
187 { SWIG_AdaArgumentOutOfRangeException
, NULL
},
188 { SWIG_AdaNullReferenceException
, NULL
}
194 SWIG_AdaThrowException (SWIG_AdaExceptionCodes code
, const char *msg
)
196 SWIG_AdaExceptionCallback_t callback
= SWIG_ada_exceptions
[SWIG_AdaException
].callback
;
197 if (code
>=0 && (size_t)code
< sizeof(SWIG_ada_exceptions
)/sizeof(SWIG_AdaExceptions_t
)) {
198 callback
= SWIG_ada_exceptions
[code
].callback
;
209 DllExport
void SWIGSTDCALL
SWIGRegisterExceptionCallbacks_LLVM_execution_Engine (SWIG_AdaExceptionCallback_t systemException
,
210 SWIG_AdaExceptionCallback_t outOfMemory
,
211 SWIG_AdaExceptionCallback_t indexOutOfRange
,
212 SWIG_AdaExceptionCallback_t divideByZero
,
213 SWIG_AdaExceptionCallback_t argumentOutOfRange
,
214 SWIG_AdaExceptionCallback_t nullReference
)
216 SWIG_ada_exceptions
[SWIG_AdaException
].callback
= systemException
;
217 SWIG_ada_exceptions
[SWIG_AdaOutOfMemoryException
].callback
= outOfMemory
;
218 SWIG_ada_exceptions
[SWIG_AdaIndexOutOfRangeException
].callback
= indexOutOfRange
;
219 SWIG_ada_exceptions
[SWIG_AdaDivideByZeroException
].callback
= divideByZero
;
220 SWIG_ada_exceptions
[SWIG_AdaArgumentOutOfRangeException
].callback
= argumentOutOfRange
;
221 SWIG_ada_exceptions
[SWIG_AdaNullReferenceException
].callback
= nullReference
;
225 /* Callback for returning strings to Ada without leaking memory */
227 typedef char * (SWIGSTDCALL
* SWIG_AdaStringHelperCallback
)(const char *);
228 static SWIG_AdaStringHelperCallback SWIG_ada_string_callback
= NULL
;
232 /* probably obsolete ...
236 DllExport void SWIGSTDCALL SWIGRegisterStringCallback_LLVM_execution_Engine(SWIG_AdaStringHelperCallback callback) {
237 SWIG_ada_string_callback = callback;
243 /* Contract support */
245 #define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_AdaThrowException(SWIG_AdaArgumentOutOfRangeException, msg); return nullreturn; } else
248 #define protected public
249 #define private public
251 #include "llvm-c/ExecutionEngine.h"
263 DllExport
void SWIGSTDCALL
Ada_LLVMLinkInJIT (
273 DllExport
void SWIGSTDCALL
Ada_LLVMLinkInInterpreter (
276 LLVMLinkInInterpreter();
283 DllExport
void * SWIGSTDCALL
Ada_LLVMCreateGenericValueOfInt (
287 unsigned long long jarg2
294 LLVMTypeRef arg1
= (LLVMTypeRef
) 0 ;
295 unsigned long long arg2
;
297 LLVMGenericValueRef result
;
299 arg1
= (LLVMTypeRef
)jarg1
;
302 arg2
= (unsigned long long) jarg2
;
309 result
= (LLVMGenericValueRef
)LLVMCreateGenericValueOfInt(arg1
,arg2
,arg3
);
310 jresult
= (void *) result
;
320 DllExport
void * SWIGSTDCALL
Ada_LLVMCreateGenericValueOfPointer (
325 void *arg1
= (void *) 0 ;
326 LLVMGenericValueRef result
;
328 arg1
= (void *)jarg1
;
330 result
= (LLVMGenericValueRef
)LLVMCreateGenericValueOfPointer(arg1
);
331 jresult
= (void *) result
;
341 DllExport
void * SWIGSTDCALL
Ada_LLVMCreateGenericValueOfFloat (
349 LLVMTypeRef arg1
= (LLVMTypeRef
) 0 ;
351 LLVMGenericValueRef result
;
353 arg1
= (LLVMTypeRef
)jarg1
;
356 arg2
= (double) jarg2
;
359 result
= (LLVMGenericValueRef
)LLVMCreateGenericValueOfFloat(arg1
,arg2
);
360 jresult
= (void *) result
;
370 DllExport
unsigned int SWIGSTDCALL
Ada_LLVMGenericValueIntWidth (
374 unsigned int jresult
;
375 LLVMGenericValueRef arg1
= (LLVMGenericValueRef
) 0 ;
378 arg1
= (LLVMGenericValueRef
)jarg1
;
380 result
= (unsigned int)LLVMGenericValueIntWidth(arg1
);
391 DllExport
unsigned long long SWIGSTDCALL
Ada_LLVMGenericValueToInt (
398 unsigned long long jresult
;
399 LLVMGenericValueRef arg1
= (LLVMGenericValueRef
) 0 ;
401 unsigned long long result
;
403 arg1
= (LLVMGenericValueRef
)jarg1
;
409 result
= (unsigned long long)LLVMGenericValueToInt(arg1
,arg2
);
420 DllExport
void* SWIGSTDCALL
Ada_LLVMGenericValueToPointer (
425 LLVMGenericValueRef arg1
= (LLVMGenericValueRef
) 0 ;
428 arg1
= (LLVMGenericValueRef
)jarg1
;
430 result
= (void *)LLVMGenericValueToPointer(arg1
);
431 jresult
= (void *) result
;
441 DllExport
double SWIGSTDCALL
Ada_LLVMGenericValueToFloat (
449 LLVMTypeRef arg1
= (LLVMTypeRef
) 0 ;
450 LLVMGenericValueRef arg2
= (LLVMGenericValueRef
) 0 ;
453 arg1
= (LLVMTypeRef
)jarg1
;
455 arg2
= (LLVMGenericValueRef
)jarg2
;
457 result
= (double)LLVMGenericValueToFloat(arg1
,arg2
);
468 DllExport
void SWIGSTDCALL
Ada_LLVMDisposeGenericValue (
472 LLVMGenericValueRef arg1
= (LLVMGenericValueRef
) 0 ;
474 arg1
= (LLVMGenericValueRef
)jarg1
;
476 LLVMDisposeGenericValue(arg1
);
483 DllExport
int SWIGSTDCALL
Ada_LLVMCreateExecutionEngine (
494 LLVMExecutionEngineRef
*arg1
= (LLVMExecutionEngineRef
*) 0 ;
495 LLVMModuleProviderRef arg2
= (LLVMModuleProviderRef
) 0 ;
496 char **arg3
= (char **) 0 ;
499 arg1
= (LLVMExecutionEngineRef
*)jarg1
;
501 arg2
= (LLVMModuleProviderRef
)jarg2
;
503 arg3
= (char **)jarg3
;
505 result
= (int)LLVMCreateExecutionEngine(arg1
,arg2
,arg3
);
516 DllExport
int SWIGSTDCALL
Ada_LLVMCreateInterpreter (
527 LLVMExecutionEngineRef
*arg1
= (LLVMExecutionEngineRef
*) 0 ;
528 LLVMModuleProviderRef arg2
= (LLVMModuleProviderRef
) 0 ;
529 char **arg3
= (char **) 0 ;
532 arg1
= (LLVMExecutionEngineRef
*)jarg1
;
534 arg2
= (LLVMModuleProviderRef
)jarg2
;
536 arg3
= (char **)jarg3
;
538 result
= (int)LLVMCreateInterpreter(arg1
,arg2
,arg3
);
549 DllExport
int SWIGSTDCALL
Ada_LLVMCreateJITCompiler (
563 LLVMExecutionEngineRef
*arg1
= (LLVMExecutionEngineRef
*) 0 ;
564 LLVMModuleProviderRef arg2
= (LLVMModuleProviderRef
) 0 ;
566 char **arg4
= (char **) 0 ;
569 arg1
= (LLVMExecutionEngineRef
*)jarg1
;
571 arg2
= (LLVMModuleProviderRef
)jarg2
;
574 arg3
= (unsigned int) jarg3
;
577 arg4
= (char **)jarg4
;
579 result
= (int)LLVMCreateJITCompiler(arg1
,arg2
,arg3
,arg4
);
590 DllExport
void SWIGSTDCALL
Ada_LLVMDisposeExecutionEngine (
594 LLVMExecutionEngineRef arg1
= (LLVMExecutionEngineRef
) 0 ;
596 arg1
= (LLVMExecutionEngineRef
)jarg1
;
598 LLVMDisposeExecutionEngine(arg1
);
605 DllExport
void SWIGSTDCALL
Ada_LLVMRunStaticConstructors (
609 LLVMExecutionEngineRef arg1
= (LLVMExecutionEngineRef
) 0 ;
611 arg1
= (LLVMExecutionEngineRef
)jarg1
;
613 LLVMRunStaticConstructors(arg1
);
620 DllExport
void SWIGSTDCALL
Ada_LLVMRunStaticDestructors (
624 LLVMExecutionEngineRef arg1
= (LLVMExecutionEngineRef
) 0 ;
626 arg1
= (LLVMExecutionEngineRef
)jarg1
;
628 LLVMRunStaticDestructors(arg1
);
635 DllExport
int SWIGSTDCALL
Ada_LLVMRunFunctionAsMain (
652 LLVMExecutionEngineRef arg1
= (LLVMExecutionEngineRef
) 0 ;
653 LLVMValueRef arg2
= (LLVMValueRef
) 0 ;
655 char **arg4
= (char **) 0 ;
656 char **arg5
= (char **) 0 ;
659 arg1
= (LLVMExecutionEngineRef
)jarg1
;
661 arg2
= (LLVMValueRef
)jarg2
;
664 arg3
= (unsigned int) jarg3
;
667 arg4
= (char **)jarg4
;
669 arg5
= (char **)jarg5
;
671 result
= (int)LLVMRunFunctionAsMain(arg1
,arg2
,arg3
,(char const *const *)arg4
,(char const *const *)arg5
);
682 DllExport
void * SWIGSTDCALL
Ada_LLVMRunFunction (
696 LLVMExecutionEngineRef arg1
= (LLVMExecutionEngineRef
) 0 ;
697 LLVMValueRef arg2
= (LLVMValueRef
) 0 ;
699 LLVMGenericValueRef
*arg4
= (LLVMGenericValueRef
*) 0 ;
700 LLVMGenericValueRef result
;
702 arg1
= (LLVMExecutionEngineRef
)jarg1
;
704 arg2
= (LLVMValueRef
)jarg2
;
707 arg3
= (unsigned int) jarg3
;
710 arg4
= (LLVMGenericValueRef
*)jarg4
;
712 result
= (LLVMGenericValueRef
)LLVMRunFunction(arg1
,arg2
,arg3
,arg4
);
713 jresult
= (void *) result
;
723 DllExport
void SWIGSTDCALL
Ada_LLVMFreeMachineCodeForFunction (
730 LLVMExecutionEngineRef arg1
= (LLVMExecutionEngineRef
) 0 ;
731 LLVMValueRef arg2
= (LLVMValueRef
) 0 ;
733 arg1
= (LLVMExecutionEngineRef
)jarg1
;
735 arg2
= (LLVMValueRef
)jarg2
;
737 LLVMFreeMachineCodeForFunction(arg1
,arg2
);
744 DllExport
void SWIGSTDCALL
Ada_LLVMAddModuleProvider (
751 LLVMExecutionEngineRef arg1
= (LLVMExecutionEngineRef
) 0 ;
752 LLVMModuleProviderRef arg2
= (LLVMModuleProviderRef
) 0 ;
754 arg1
= (LLVMExecutionEngineRef
)jarg1
;
756 arg2
= (LLVMModuleProviderRef
)jarg2
;
758 LLVMAddModuleProvider(arg1
,arg2
);
765 DllExport
int SWIGSTDCALL
Ada_LLVMRemoveModuleProvider (
779 LLVMExecutionEngineRef arg1
= (LLVMExecutionEngineRef
) 0 ;
780 LLVMModuleProviderRef arg2
= (LLVMModuleProviderRef
) 0 ;
781 LLVMModuleRef
*arg3
= (LLVMModuleRef
*) 0 ;
782 char **arg4
= (char **) 0 ;
785 arg1
= (LLVMExecutionEngineRef
)jarg1
;
787 arg2
= (LLVMModuleProviderRef
)jarg2
;
789 arg3
= (LLVMModuleRef
*)jarg3
;
791 arg4
= (char **)jarg4
;
793 result
= (int)LLVMRemoveModuleProvider(arg1
,arg2
,arg3
,arg4
);
804 DllExport
int SWIGSTDCALL
Ada_LLVMFindFunction (
815 LLVMExecutionEngineRef arg1
= (LLVMExecutionEngineRef
) 0 ;
816 char *arg2
= (char *) 0 ;
817 LLVMValueRef
*arg3
= (LLVMValueRef
*) 0 ;
820 arg1
= (LLVMExecutionEngineRef
)jarg1
;
824 arg3
= (LLVMValueRef
*)jarg3
;
826 result
= (int)LLVMFindFunction(arg1
,(char const *)arg2
,arg3
);
837 DllExport LLVMTargetDataRef SWIGSTDCALL
Ada_LLVMGetExecutionEngineTargetData (
841 LLVMTargetDataRef jresult
;
842 LLVMExecutionEngineRef arg1
= (LLVMExecutionEngineRef
) 0 ;
843 LLVMTargetDataRef result
;
845 arg1
= (LLVMExecutionEngineRef
)jarg1
;
847 result
= LLVMGetExecutionEngineTargetData(arg1
);
850 //jresult = new LLVMTargetDataRef ((LLVMTargetDataRef &) result);
861 DllExport
void SWIGSTDCALL
Ada_LLVMAddGlobalMapping (
871 LLVMExecutionEngineRef arg1
= (LLVMExecutionEngineRef
) 0 ;
872 LLVMValueRef arg2
= (LLVMValueRef
) 0 ;
873 void *arg3
= (void *) 0 ;
875 arg1
= (LLVMExecutionEngineRef
)jarg1
;
877 arg2
= (LLVMValueRef
)jarg2
;
879 arg3
= (void *)jarg3
;
881 LLVMAddGlobalMapping(arg1
,arg2
,arg3
);
888 DllExport
void* SWIGSTDCALL
Ada_LLVMGetPointerToGlobal (
896 LLVMExecutionEngineRef arg1
= (LLVMExecutionEngineRef
) 0 ;
897 LLVMValueRef arg2
= (LLVMValueRef
) 0 ;
900 arg1
= (LLVMExecutionEngineRef
)jarg1
;
902 arg2
= (LLVMValueRef
)jarg2
;
904 result
= (void *)LLVMGetPointerToGlobal(arg1
,arg2
);
905 jresult
= (void *) result
;