pass machinemoduleinfo down into getSymbolForDwarfGlobalReference,
[llvm/avr.git] / bindings / ada / target / llvm_target_wrap.cxx
blob16aca8a4379a8329834cf7967bb7a60586a0de79
1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 1.3.36
4 *
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 * ----------------------------------------------------------------------------- */
12 #ifdef __cplusplus
13 template<typename T> class SwigValueWrapper {
14 T *tt;
15 public:
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; }
23 private:
24 SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
27 template <typename T> T SwigValueInit() {
28 return T();
30 #endif
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
45 # else
46 # define SWIGTEMPLATEDISAMBIGUATOR
47 # endif
48 #endif
50 /* inline attribute */
51 #ifndef SWIGINLINE
52 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
53 # define SWIGINLINE inline
54 # else
55 # define SWIGINLINE
56 # endif
57 #endif
59 /* attribute recognised by some compilers to avoid 'unused' warnings */
60 #ifndef SWIGUNUSED
61 # if defined(__GNUC__)
62 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
63 # define SWIGUNUSED __attribute__ ((__unused__))
64 # else
65 # define SWIGUNUSED
66 # endif
67 # elif defined(__ICC)
68 # define SWIGUNUSED __attribute__ ((__unused__))
69 # else
70 # define SWIGUNUSED
71 # endif
72 #endif
74 #ifndef SWIGUNUSEDPARM
75 # ifdef __cplusplus
76 # define SWIGUNUSEDPARM(p)
77 # else
78 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
79 # endif
80 #endif
82 /* internal SWIG method */
83 #ifndef SWIGINTERN
84 # define SWIGINTERN static SWIGUNUSED
85 #endif
87 /* internal inline SWIG method */
88 #ifndef SWIGINTERNINLINE
89 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
90 #endif
92 /* exporting methods */
93 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
94 # ifndef GCC_HASCLASSVISIBILITY
95 # define GCC_HASCLASSVISIBILITY
96 # endif
97 #endif
99 #ifndef SWIGEXPORT
100 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
101 # if defined(STATIC_LINKED)
102 # define SWIGEXPORT
103 # else
104 # define SWIGEXPORT __declspec(dllexport)
105 # endif
106 # else
107 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
108 # define SWIGEXPORT __attribute__ ((visibility("default")))
109 # else
110 # define SWIGEXPORT
111 # endif
112 # endif
113 #endif
115 /* calling conventions for Windows */
116 #ifndef SWIGSTDCALL
117 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
118 # define SWIGSTDCALL __stdcall
119 # else
120 # define SWIGSTDCALL
121 # endif
122 #endif
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
127 #endif
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
132 #endif
136 #include <stdlib.h>
137 #include <string.h>
138 #include <stdio.h>
139 #if defined(_WIN32) || defined(__CYGWIN32__)
140 # define DllExport __declspec( dllexport )
141 # define SWIGSTDCALL __stdcall
142 #else
143 # define DllExport
144 # define SWIGSTDCALL
145 #endif
148 #ifdef __cplusplus
149 # include <new>
150 #endif
155 /* Support for throwing Ada exceptions from C/C++ */
157 typedef enum
159 SWIG_AdaException,
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 *);
171 typedef struct
173 SWIG_AdaExceptionCodes code;
174 SWIG_AdaExceptionCallback_t callback;
176 SWIG_AdaExceptions_t;
179 static
180 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 }
192 static
193 void
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;
200 callback(msg);
205 #ifdef __cplusplus
206 extern "C"
207 #endif
209 DllExport void SWIGSTDCALL SWIGRegisterExceptionCallbacks_LLVM_Target (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 ...
233 #ifdef __cplusplus
234 extern "C"
235 #endif
236 DllExport void SWIGSTDCALL SWIGRegisterStringCallback_LLVM_Target(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/Target.h"
255 // struct LLVMCtxt;
258 #undef protected
259 #undef private
260 #ifdef __cplusplus
261 extern "C" {
262 #endif
263 DllExport void SWIGSTDCALL Ada_LLVMInitializeAllTargets (
266 LLVMInitializeAllTargets();
273 DllExport int SWIGSTDCALL Ada_LLVMInitializeNativeTarget (
276 int jresult ;
277 int result;
279 result = (int)LLVMInitializeNativeTarget();
280 jresult = result;
284 return jresult;
290 DllExport void * SWIGSTDCALL Ada_LLVMCreateTargetData (
291 char * jarg1
294 void * jresult ;
295 char *arg1 = (char *) 0 ;
296 LLVMTargetDataRef result;
298 arg1 = jarg1;
300 result = (LLVMTargetDataRef)LLVMCreateTargetData((char const *)arg1);
301 jresult = (void *) result;
305 return jresult;
311 DllExport void SWIGSTDCALL Ada_LLVMAddTargetData (
312 void * jarg1
315 void * jarg2
318 LLVMTargetDataRef arg1 = (LLVMTargetDataRef) 0 ;
319 LLVMPassManagerRef arg2 = (LLVMPassManagerRef) 0 ;
321 arg1 = (LLVMTargetDataRef)jarg1;
323 arg2 = (LLVMPassManagerRef)jarg2;
325 LLVMAddTargetData(arg1,arg2);
332 DllExport char * SWIGSTDCALL Ada_LLVMCopyStringRepOfTargetData (
333 void * jarg1
336 char * jresult ;
337 LLVMTargetDataRef arg1 = (LLVMTargetDataRef) 0 ;
338 char *result = 0 ;
340 arg1 = (LLVMTargetDataRef)jarg1;
342 result = (char *)LLVMCopyStringRepOfTargetData(arg1);
343 jresult = result;
347 return jresult;
353 DllExport int SWIGSTDCALL Ada_LLVMByteOrder (
354 void * jarg1
357 int jresult ;
358 LLVMTargetDataRef arg1 = (LLVMTargetDataRef) 0 ;
359 LLVMByteOrdering result;
361 arg1 = (LLVMTargetDataRef)jarg1;
363 result = (LLVMByteOrdering)LLVMByteOrder(arg1);
364 jresult = result;
368 return jresult;
374 DllExport unsigned int SWIGSTDCALL Ada_LLVMPointerSize (
375 void * jarg1
378 unsigned int jresult ;
379 LLVMTargetDataRef arg1 = (LLVMTargetDataRef) 0 ;
380 unsigned int result;
382 arg1 = (LLVMTargetDataRef)jarg1;
384 result = (unsigned int)LLVMPointerSize(arg1);
385 jresult = result;
389 return jresult;
395 DllExport void * SWIGSTDCALL Ada_LLVMIntPtrType (
396 void * jarg1
399 void * jresult ;
400 LLVMTargetDataRef arg1 = (LLVMTargetDataRef) 0 ;
401 LLVMTypeRef result;
403 arg1 = (LLVMTargetDataRef)jarg1;
405 result = (LLVMTypeRef)LLVMIntPtrType(arg1);
406 jresult = (void *) result;
410 return jresult;
416 DllExport unsigned long long SWIGSTDCALL Ada_LLVMSizeOfTypeInBits (
417 void * jarg1
420 void * jarg2
423 unsigned long long jresult ;
424 LLVMTargetDataRef arg1 = (LLVMTargetDataRef) 0 ;
425 LLVMTypeRef arg2 = (LLVMTypeRef) 0 ;
426 unsigned long long result;
428 arg1 = (LLVMTargetDataRef)jarg1;
430 arg2 = (LLVMTypeRef)jarg2;
432 result = (unsigned long long)LLVMSizeOfTypeInBits(arg1,arg2);
433 jresult = result;
437 return jresult;
443 DllExport unsigned long long SWIGSTDCALL Ada_LLVMStoreSizeOfType (
444 void * jarg1
447 void * jarg2
450 unsigned long long jresult ;
451 LLVMTargetDataRef arg1 = (LLVMTargetDataRef) 0 ;
452 LLVMTypeRef arg2 = (LLVMTypeRef) 0 ;
453 unsigned long long result;
455 arg1 = (LLVMTargetDataRef)jarg1;
457 arg2 = (LLVMTypeRef)jarg2;
459 result = (unsigned long long)LLVMStoreSizeOfType(arg1,arg2);
460 jresult = result;
464 return jresult;
470 DllExport unsigned long long SWIGSTDCALL Ada_LLVMABISizeOfType (
471 void * jarg1
474 void * jarg2
477 unsigned long long jresult ;
478 LLVMTargetDataRef arg1 = (LLVMTargetDataRef) 0 ;
479 LLVMTypeRef arg2 = (LLVMTypeRef) 0 ;
480 unsigned long long result;
482 arg1 = (LLVMTargetDataRef)jarg1;
484 arg2 = (LLVMTypeRef)jarg2;
486 result = (unsigned long long)LLVMABISizeOfType(arg1,arg2);
487 jresult = result;
491 return jresult;
497 DllExport unsigned int SWIGSTDCALL Ada_LLVMABIAlignmentOfType (
498 void * jarg1
501 void * jarg2
504 unsigned int jresult ;
505 LLVMTargetDataRef arg1 = (LLVMTargetDataRef) 0 ;
506 LLVMTypeRef arg2 = (LLVMTypeRef) 0 ;
507 unsigned int result;
509 arg1 = (LLVMTargetDataRef)jarg1;
511 arg2 = (LLVMTypeRef)jarg2;
513 result = (unsigned int)LLVMABIAlignmentOfType(arg1,arg2);
514 jresult = result;
518 return jresult;
524 DllExport unsigned int SWIGSTDCALL Ada_LLVMCallFrameAlignmentOfType (
525 void * jarg1
528 void * jarg2
531 unsigned int jresult ;
532 LLVMTargetDataRef arg1 = (LLVMTargetDataRef) 0 ;
533 LLVMTypeRef arg2 = (LLVMTypeRef) 0 ;
534 unsigned int result;
536 arg1 = (LLVMTargetDataRef)jarg1;
538 arg2 = (LLVMTypeRef)jarg2;
540 result = (unsigned int)LLVMCallFrameAlignmentOfType(arg1,arg2);
541 jresult = result;
545 return jresult;
551 DllExport unsigned int SWIGSTDCALL Ada_LLVMPreferredAlignmentOfType (
552 void * jarg1
555 void * jarg2
558 unsigned int jresult ;
559 LLVMTargetDataRef arg1 = (LLVMTargetDataRef) 0 ;
560 LLVMTypeRef arg2 = (LLVMTypeRef) 0 ;
561 unsigned int result;
563 arg1 = (LLVMTargetDataRef)jarg1;
565 arg2 = (LLVMTypeRef)jarg2;
567 result = (unsigned int)LLVMPreferredAlignmentOfType(arg1,arg2);
568 jresult = result;
572 return jresult;
578 DllExport unsigned int SWIGSTDCALL Ada_LLVMPreferredAlignmentOfGlobal (
579 void * jarg1
582 void * jarg2
585 unsigned int jresult ;
586 LLVMTargetDataRef arg1 = (LLVMTargetDataRef) 0 ;
587 LLVMValueRef arg2 = (LLVMValueRef) 0 ;
588 unsigned int result;
590 arg1 = (LLVMTargetDataRef)jarg1;
592 arg2 = (LLVMValueRef)jarg2;
594 result = (unsigned int)LLVMPreferredAlignmentOfGlobal(arg1,arg2);
595 jresult = result;
599 return jresult;
605 DllExport unsigned int SWIGSTDCALL Ada_LLVMElementAtOffset (
606 void * jarg1
609 void * jarg2
612 unsigned long long jarg3
615 unsigned int jresult ;
616 LLVMTargetDataRef arg1 = (LLVMTargetDataRef) 0 ;
617 LLVMTypeRef arg2 = (LLVMTypeRef) 0 ;
618 unsigned long long arg3 ;
619 unsigned int result;
621 arg1 = (LLVMTargetDataRef)jarg1;
623 arg2 = (LLVMTypeRef)jarg2;
626 arg3 = (unsigned long long) jarg3;
629 result = (unsigned int)LLVMElementAtOffset(arg1,arg2,arg3);
630 jresult = result;
634 return jresult;
640 DllExport unsigned long long SWIGSTDCALL Ada_LLVMOffsetOfElement (
641 void * jarg1
644 void * jarg2
647 unsigned int jarg3
650 unsigned long long jresult ;
651 LLVMTargetDataRef arg1 = (LLVMTargetDataRef) 0 ;
652 LLVMTypeRef arg2 = (LLVMTypeRef) 0 ;
653 unsigned int arg3 ;
654 unsigned long long result;
656 arg1 = (LLVMTargetDataRef)jarg1;
658 arg2 = (LLVMTypeRef)jarg2;
661 arg3 = (unsigned int) jarg3;
664 result = (unsigned long long)LLVMOffsetOfElement(arg1,arg2,arg3);
665 jresult = result;
669 return jresult;
675 DllExport void SWIGSTDCALL Ada_LLVMInvalidateStructLayout (
676 void * jarg1
679 void * jarg2
682 LLVMTargetDataRef arg1 = (LLVMTargetDataRef) 0 ;
683 LLVMTypeRef arg2 = (LLVMTypeRef) 0 ;
685 arg1 = (LLVMTargetDataRef)jarg1;
687 arg2 = (LLVMTypeRef)jarg2;
689 LLVMInvalidateStructLayout(arg1,arg2);
696 DllExport void SWIGSTDCALL Ada_LLVMDisposeTargetData (
697 void * jarg1
700 LLVMTargetDataRef arg1 = (LLVMTargetDataRef) 0 ;
702 arg1 = (LLVMTargetDataRef)jarg1;
704 LLVMDisposeTargetData(arg1);
711 #ifdef __cplusplus
713 #endif
714 #ifdef __cplusplus
715 extern "C" {
716 #endif
717 #ifdef __cplusplus
719 #endif