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_link_time_Optimizer (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_link_time_Optimizer(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/lto.h"
252 #include "llvm-c/LinkTimeOptimizer.h"
264 DllExport char * SWIGSTDCALL Ada_lto_get_version (
270 result = (char *)lto_get_version();
281 DllExport char * SWIGSTDCALL Ada_lto_get_error_message (
287 result = (char *)lto_get_error_message();
298 DllExport unsigned int SWIGSTDCALL Ada_lto_module_is_object_file (
302 unsigned int jresult ;
303 char *arg1 = (char *) 0 ;
308 result = (bool)lto_module_is_object_file((char const *)arg1);
319 DllExport unsigned int SWIGSTDCALL Ada_lto_module_is_object_file_for_target (
326 unsigned int jresult ;
327 char *arg1 = (char *) 0 ;
328 char *arg2 = (char *) 0 ;
335 result = (bool)lto_module_is_object_file_for_target((char const *)arg1,(char const *)arg2);
346 DllExport unsigned int SWIGSTDCALL Ada_lto_module_is_object_file_in_memory (
353 unsigned int jresult ;
354 void *arg1 = (void *) 0 ;
358 arg1 = (void *)jarg1;
361 arg2 = (size_t) jarg2;
364 result = (bool)lto_module_is_object_file_in_memory((void const *)arg1,arg2);
375 DllExport unsigned int SWIGSTDCALL Ada_lto_module_is_object_file_in_memory_for_target (
385 unsigned int jresult ;
386 void *arg1 = (void *) 0 ;
388 char *arg3 = (char *) 0 ;
391 arg1 = (void *)jarg1;
394 arg2 = (size_t) jarg2;
399 result = (bool)lto_module_is_object_file_in_memory_for_target((void const *)arg1,arg2,(char const *)arg3);
410 DllExport void * SWIGSTDCALL Ada_lto_module_create (
415 char *arg1 = (char *) 0 ;
420 result = (lto_module_t)lto_module_create((char const *)arg1);
421 jresult = (void *) result;
431 DllExport void * SWIGSTDCALL Ada_lto_module_create_from_memory (
439 void *arg1 = (void *) 0 ;
443 arg1 = (void *)jarg1;
446 arg2 = (size_t) jarg2;
449 result = (lto_module_t)lto_module_create_from_memory((void const *)arg1,arg2);
450 jresult = (void *) result;
460 DllExport void SWIGSTDCALL Ada_lto_module_dispose (
464 lto_module_t arg1 = (lto_module_t) 0 ;
466 arg1 = (lto_module_t)jarg1;
468 lto_module_dispose(arg1);
475 DllExport char * SWIGSTDCALL Ada_lto_module_get_target_triple (
480 lto_module_t arg1 = (lto_module_t) 0 ;
483 arg1 = (lto_module_t)jarg1;
485 result = (char *)lto_module_get_target_triple(arg1);
496 DllExport unsigned int SWIGSTDCALL Ada_lto_module_get_num_symbols (
500 unsigned int jresult ;
501 lto_module_t arg1 = (lto_module_t) 0 ;
504 arg1 = (lto_module_t)jarg1;
506 result = (unsigned int)lto_module_get_num_symbols(arg1);
517 DllExport char * SWIGSTDCALL Ada_lto_module_get_symbol_name (
525 lto_module_t arg1 = (lto_module_t) 0 ;
529 arg1 = (lto_module_t)jarg1;
532 arg2 = (unsigned int) jarg2;
535 result = (char *)lto_module_get_symbol_name(arg1,arg2);
546 DllExport int SWIGSTDCALL Ada_lto_module_get_symbol_attribute (
554 lto_module_t arg1 = (lto_module_t) 0 ;
556 lto_symbol_attributes result;
558 arg1 = (lto_module_t)jarg1;
561 arg2 = (unsigned int) jarg2;
564 result = (lto_symbol_attributes)lto_module_get_symbol_attribute(arg1,arg2);
575 DllExport void * SWIGSTDCALL Ada_lto_codegen_create (
579 lto_code_gen_t result;
581 result = (lto_code_gen_t)lto_codegen_create();
582 jresult = (void *) result;
592 DllExport void SWIGSTDCALL Ada_lto_codegen_dispose (
596 lto_code_gen_t arg1 = (lto_code_gen_t) 0 ;
598 arg1 = (lto_code_gen_t)jarg1;
600 lto_codegen_dispose(arg1);
607 DllExport unsigned int SWIGSTDCALL Ada_lto_codegen_add_module (
614 unsigned int jresult ;
615 lto_code_gen_t arg1 = (lto_code_gen_t) 0 ;
616 lto_module_t arg2 = (lto_module_t) 0 ;
619 arg1 = (lto_code_gen_t)jarg1;
621 arg2 = (lto_module_t)jarg2;
623 result = (bool)lto_codegen_add_module(arg1,arg2);
634 DllExport unsigned int SWIGSTDCALL Ada_lto_codegen_set_debug_model (
641 unsigned int jresult ;
642 lto_code_gen_t arg1 = (lto_code_gen_t) 0 ;
643 lto_debug_model arg2 ;
646 arg1 = (lto_code_gen_t)jarg1;
648 arg2 = (lto_debug_model) jarg2;
650 result = (bool)lto_codegen_set_debug_model(arg1,arg2);
661 DllExport unsigned int SWIGSTDCALL Ada_lto_codegen_set_pic_model (
668 unsigned int jresult ;
669 lto_code_gen_t arg1 = (lto_code_gen_t) 0 ;
670 lto_codegen_model arg2 ;
673 arg1 = (lto_code_gen_t)jarg1;
675 arg2 = (lto_codegen_model) jarg2;
677 result = (bool)lto_codegen_set_pic_model(arg1,arg2);
688 DllExport void SWIGSTDCALL Ada_lto_codegen_set_gcc_path (
695 lto_code_gen_t arg1 = (lto_code_gen_t) 0 ;
696 char *arg2 = (char *) 0 ;
698 arg1 = (lto_code_gen_t)jarg1;
702 lto_codegen_set_gcc_path(arg1,(char const *)arg2);
709 DllExport void SWIGSTDCALL Ada_lto_codegen_set_assembler_path (
716 lto_code_gen_t arg1 = (lto_code_gen_t) 0 ;
717 char *arg2 = (char *) 0 ;
719 arg1 = (lto_code_gen_t)jarg1;
723 lto_codegen_set_assembler_path(arg1,(char const *)arg2);
730 DllExport void SWIGSTDCALL Ada_lto_codegen_add_must_preserve_symbol (
737 lto_code_gen_t arg1 = (lto_code_gen_t) 0 ;
738 char *arg2 = (char *) 0 ;
740 arg1 = (lto_code_gen_t)jarg1;
744 lto_codegen_add_must_preserve_symbol(arg1,(char const *)arg2);
751 DllExport unsigned int SWIGSTDCALL Ada_lto_codegen_write_merged_modules (
758 unsigned int jresult ;
759 lto_code_gen_t arg1 = (lto_code_gen_t) 0 ;
760 char *arg2 = (char *) 0 ;
763 arg1 = (lto_code_gen_t)jarg1;
767 result = (bool)lto_codegen_write_merged_modules(arg1,(char const *)arg2);
778 DllExport void* SWIGSTDCALL Ada_lto_codegen_compile (
786 lto_code_gen_t arg1 = (lto_code_gen_t) 0 ;
787 size_t *arg2 = (size_t *) 0 ;
790 arg1 = (lto_code_gen_t)jarg1;
793 arg2 = (size_t *) jarg2;
796 result = (void *)lto_codegen_compile(arg1,arg2);
797 jresult = (void *) result;
807 DllExport void SWIGSTDCALL Ada_lto_codegen_debug_options (
814 lto_code_gen_t arg1 = (lto_code_gen_t) 0 ;
815 char *arg2 = (char *) 0 ;
817 arg1 = (lto_code_gen_t)jarg1;
821 lto_codegen_debug_options(arg1,(char const *)arg2);
828 DllExport void* SWIGSTDCALL Ada_llvm_create_optimizer (
834 result = (llvm_lto_t)llvm_create_optimizer();
835 jresult = (void *) result;
845 DllExport void SWIGSTDCALL Ada_llvm_destroy_optimizer (
849 llvm_lto_t arg1 = (llvm_lto_t) 0 ;
851 arg1 = (llvm_lto_t)jarg1;
853 llvm_destroy_optimizer(arg1);
860 DllExport int SWIGSTDCALL Ada_llvm_read_object_file (
868 llvm_lto_t arg1 = (llvm_lto_t) 0 ;
869 char *arg2 = (char *) 0 ;
870 llvm_lto_status_t result;
872 arg1 = (llvm_lto_t)jarg1;
876 result = (llvm_lto_status_t)llvm_read_object_file(arg1,(char const *)arg2);
887 DllExport int SWIGSTDCALL Ada_llvm_optimize_modules (
895 llvm_lto_t arg1 = (llvm_lto_t) 0 ;
896 char *arg2 = (char *) 0 ;
897 llvm_lto_status_t result;
899 arg1 = (llvm_lto_t)jarg1;
903 result = (llvm_lto_status_t)llvm_optimize_modules(arg1,(char const *)arg2);