blob: a58e62d93601beeb61051b2cf31caf526144ea42 [file] [log] [blame]
Logan Chiene75a8cc2012-02-24 12:26:43 +08001// Generated with ../tools/gen_art_module_cc.sh
2
3
4#pragma GCC diagnostic ignored "-Wframe-larger-than="
5// TODO: Remove this pragma after llc can generate makeLLVMModuleContents()
6// with smaller frame size.
7
8#include <llvm/DerivedTypes.h>
9#include <llvm/Function.h>
10#include <llvm/Module.h>
11#include <llvm/Type.h>
12
13#include <vector>
14
15using namespace llvm;
16
17namespace art {
18namespace compiler_llvm {
19
Logan Chien42e0e152012-01-13 15:42:36 +080020
21// Generated by llvm2cpp - DO NOT MODIFY!
22
23
24Module* makeLLVMModuleContents(Module *mod) {
25
26mod->setModuleIdentifier("art_module.ll");
27
28// Type Definitions
29std::vector<Type*>FuncTy_0_args;
30StructType *StructTy_JavaObject = mod->getTypeByName("JavaObject");
31if (!StructTy_JavaObject) {
32StructTy_JavaObject = StructType::create(mod->getContext(), "JavaObject");
33}
34std::vector<Type*>StructTy_JavaObject_fields;
35if (StructTy_JavaObject->isOpaque()) {
36StructTy_JavaObject->setBody(StructTy_JavaObject_fields, /*isPacked=*/false);
37}
38
39PointerType* PointerTy_1 = PointerType::get(StructTy_JavaObject, 0);
40
41FuncTy_0_args.push_back(PointerTy_1);
Logan Chien3f71e702012-02-17 18:45:27 +080042StructType *StructTy_ArtFrame = mod->getTypeByName("ArtFrame");
43if (!StructTy_ArtFrame) {
44StructTy_ArtFrame = StructType::create(mod->getContext(), "ArtFrame");
45}
46std::vector<Type*>StructTy_ArtFrame_fields;
47PointerType* PointerTy_2 = PointerType::get(StructTy_ArtFrame, 0);
48
49StructTy_ArtFrame_fields.push_back(PointerTy_2);
50StructTy_ArtFrame_fields.push_back(PointerTy_1);
51StructTy_ArtFrame_fields.push_back(IntegerType::get(mod->getContext(), 32));
52StructTy_ArtFrame_fields.push_back(IntegerType::get(mod->getContext(), 32));
53if (StructTy_ArtFrame->isOpaque()) {
54StructTy_ArtFrame->setBody(StructTy_ArtFrame_fields, /*isPacked=*/false);
55}
56
57
58FuncTy_0_args.push_back(PointerTy_2);
Logan Chien42e0e152012-01-13 15:42:36 +080059FunctionType* FuncTy_0 = FunctionType::get(
60 /*Result=*/Type::getVoidTy(mod->getContext()),
61 /*Params=*/FuncTy_0_args,
62 /*isVarArg=*/false);
63
Logan Chien42e0e152012-01-13 15:42:36 +080064std::vector<Type*>FuncTy_3_args;
65FunctionType* FuncTy_3 = FunctionType::get(
Logan Chien3f71e702012-02-17 18:45:27 +080066 /*Result=*/PointerTy_1,
Logan Chien42e0e152012-01-13 15:42:36 +080067 /*Params=*/FuncTy_3_args,
68 /*isVarArg=*/false);
69
70std::vector<Type*>FuncTy_4_args;
Logan Chien3f71e702012-02-17 18:45:27 +080071FuncTy_4_args.push_back(PointerTy_1);
Logan Chien42e0e152012-01-13 15:42:36 +080072FunctionType* FuncTy_4 = FunctionType::get(
Logan Chien3f71e702012-02-17 18:45:27 +080073 /*Result=*/Type::getVoidTy(mod->getContext()),
Logan Chien42e0e152012-01-13 15:42:36 +080074 /*Params=*/FuncTy_4_args,
75 /*isVarArg=*/false);
76
77std::vector<Type*>FuncTy_5_args;
Logan Chien42e0e152012-01-13 15:42:36 +080078FunctionType* FuncTy_5 = FunctionType::get(
79 /*Result=*/Type::getVoidTy(mod->getContext()),
80 /*Params=*/FuncTy_5_args,
81 /*isVarArg=*/false);
82
83std::vector<Type*>FuncTy_6_args;
Logan Chien3f71e702012-02-17 18:45:27 +080084FuncTy_6_args.push_back(PointerTy_2);
Logan Chien42e0e152012-01-13 15:42:36 +080085FunctionType* FuncTy_6 = FunctionType::get(
86 /*Result=*/Type::getVoidTy(mod->getContext()),
87 /*Params=*/FuncTy_6_args,
88 /*isVarArg=*/false);
89
90std::vector<Type*>FuncTy_7_args;
Logan Chien42e0e152012-01-13 15:42:36 +080091FunctionType* FuncTy_7 = FunctionType::get(
Logan Chien3f71e702012-02-17 18:45:27 +080092 /*Result=*/IntegerType::get(mod->getContext(), 1),
Logan Chien42e0e152012-01-13 15:42:36 +080093 /*Params=*/FuncTy_7_args,
94 /*isVarArg=*/false);
95
96std::vector<Type*>FuncTy_8_args;
97FuncTy_8_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien3f71e702012-02-17 18:45:27 +080098FuncTy_8_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien42e0e152012-01-13 15:42:36 +080099FunctionType* FuncTy_8 = FunctionType::get(
Logan Chien3f71e702012-02-17 18:45:27 +0800100 /*Result=*/Type::getVoidTy(mod->getContext()),
Logan Chien42e0e152012-01-13 15:42:36 +0800101 /*Params=*/FuncTy_8_args,
102 /*isVarArg=*/false);
103
104std::vector<Type*>FuncTy_9_args;
105FuncTy_9_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien42e0e152012-01-13 15:42:36 +0800106FunctionType* FuncTy_9 = FunctionType::get(
Logan Chien3f71e702012-02-17 18:45:27 +0800107 /*Result=*/Type::getVoidTy(mod->getContext()),
Logan Chien42e0e152012-01-13 15:42:36 +0800108 /*Params=*/FuncTy_9_args,
109 /*isVarArg=*/false);
110
111std::vector<Type*>FuncTy_10_args;
Logan Chien42e0e152012-01-13 15:42:36 +0800112FuncTy_10_args.push_back(PointerTy_1);
Logan Chien3f71e702012-02-17 18:45:27 +0800113FuncTy_10_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien42e0e152012-01-13 15:42:36 +0800114FunctionType* FuncTy_10 = FunctionType::get(
Logan Chien3f71e702012-02-17 18:45:27 +0800115 /*Result=*/IntegerType::get(mod->getContext(), 32),
Logan Chien42e0e152012-01-13 15:42:36 +0800116 /*Params=*/FuncTy_10_args,
117 /*isVarArg=*/false);
118
119std::vector<Type*>FuncTy_11_args;
Logan Chien42e0e152012-01-13 15:42:36 +0800120FuncTy_11_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien3f71e702012-02-17 18:45:27 +0800121FuncTy_11_args.push_back(PointerTy_1);
Logan Chien42e0e152012-01-13 15:42:36 +0800122FunctionType* FuncTy_11 = FunctionType::get(
123 /*Result=*/PointerTy_1,
124 /*Params=*/FuncTy_11_args,
125 /*isVarArg=*/false);
126
127std::vector<Type*>FuncTy_12_args;
Logan Chien3f71e702012-02-17 18:45:27 +0800128FuncTy_12_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien42e0e152012-01-13 15:42:36 +0800129FuncTy_12_args.push_back(PointerTy_1);
130FuncTy_12_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien42e0e152012-01-13 15:42:36 +0800131FunctionType* FuncTy_12 = FunctionType::get(
132 /*Result=*/PointerTy_1,
133 /*Params=*/FuncTy_12_args,
134 /*isVarArg=*/false);
135
136std::vector<Type*>FuncTy_13_args;
137FuncTy_13_args.push_back(IntegerType::get(mod->getContext(), 32));
138FuncTy_13_args.push_back(PointerTy_1);
Logan Chien42e0e152012-01-13 15:42:36 +0800139FunctionType* FuncTy_13 = FunctionType::get(
Logan Chien3f71e702012-02-17 18:45:27 +0800140 /*Result=*/Type::getVoidTy(mod->getContext()),
Logan Chien42e0e152012-01-13 15:42:36 +0800141 /*Params=*/FuncTy_13_args,
142 /*isVarArg=*/false);
143
144std::vector<Type*>FuncTy_14_args;
Logan Chien42e0e152012-01-13 15:42:36 +0800145FuncTy_14_args.push_back(PointerTy_1);
Logan Chien3f71e702012-02-17 18:45:27 +0800146FuncTy_14_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien42e0e152012-01-13 15:42:36 +0800147FunctionType* FuncTy_14 = FunctionType::get(
Logan Chien3f71e702012-02-17 18:45:27 +0800148 /*Result=*/PointerTy_1,
Logan Chien42e0e152012-01-13 15:42:36 +0800149 /*Params=*/FuncTy_14_args,
150 /*isVarArg=*/false);
151
152std::vector<Type*>FuncTy_15_args;
Logan Chiena6b2ca62012-03-06 15:50:54 +0800153FuncTy_15_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien3f71e702012-02-17 18:45:27 +0800154FuncTy_15_args.push_back(PointerTy_1);
Logan Chien42e0e152012-01-13 15:42:36 +0800155FuncTy_15_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien42e0e152012-01-13 15:42:36 +0800156FunctionType* FuncTy_15 = FunctionType::get(
Logan Chiena6b2ca62012-03-06 15:50:54 +0800157 /*Result=*/IntegerType::get(mod->getContext(), 32),
Logan Chien42e0e152012-01-13 15:42:36 +0800158 /*Params=*/FuncTy_15_args,
159 /*isVarArg=*/false);
160
161std::vector<Type*>FuncTy_16_args;
162FuncTy_16_args.push_back(IntegerType::get(mod->getContext(), 32));
163FuncTy_16_args.push_back(PointerTy_1);
Logan Chiena6b2ca62012-03-06 15:50:54 +0800164FuncTy_16_args.push_back(IntegerType::get(mod->getContext(), 64));
Logan Chien42e0e152012-01-13 15:42:36 +0800165FunctionType* FuncTy_16 = FunctionType::get(
166 /*Result=*/IntegerType::get(mod->getContext(), 32),
167 /*Params=*/FuncTy_16_args,
168 /*isVarArg=*/false);
169
170std::vector<Type*>FuncTy_17_args;
171FuncTy_17_args.push_back(IntegerType::get(mod->getContext(), 32));
172FuncTy_17_args.push_back(PointerTy_1);
Logan Chiena6b2ca62012-03-06 15:50:54 +0800173FuncTy_17_args.push_back(PointerTy_1);
Logan Chien42e0e152012-01-13 15:42:36 +0800174FunctionType* FuncTy_17 = FunctionType::get(
Logan Chien3f71e702012-02-17 18:45:27 +0800175 /*Result=*/IntegerType::get(mod->getContext(), 32),
Logan Chien42e0e152012-01-13 15:42:36 +0800176 /*Params=*/FuncTy_17_args,
177 /*isVarArg=*/false);
178
179std::vector<Type*>FuncTy_18_args;
Logan Chien3f71e702012-02-17 18:45:27 +0800180FuncTy_18_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien42e0e152012-01-13 15:42:36 +0800181FuncTy_18_args.push_back(PointerTy_1);
Logan Chien42e0e152012-01-13 15:42:36 +0800182FunctionType* FuncTy_18 = FunctionType::get(
183 /*Result=*/IntegerType::get(mod->getContext(), 32),
184 /*Params=*/FuncTy_18_args,
185 /*isVarArg=*/false);
186
187std::vector<Type*>FuncTy_19_args;
Logan Chien3f71e702012-02-17 18:45:27 +0800188FuncTy_19_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien42e0e152012-01-13 15:42:36 +0800189FuncTy_19_args.push_back(PointerTy_1);
190FunctionType* FuncTy_19 = FunctionType::get(
Logan Chiena6b2ca62012-03-06 15:50:54 +0800191 /*Result=*/IntegerType::get(mod->getContext(), 64),
Logan Chien42e0e152012-01-13 15:42:36 +0800192 /*Params=*/FuncTy_19_args,
193 /*isVarArg=*/false);
194
Logan Chien3f71e702012-02-17 18:45:27 +0800195std::vector<Type*>FuncTy_20_args;
Logan Chiena6b2ca62012-03-06 15:50:54 +0800196FuncTy_20_args.push_back(PointerTy_1);
Logan Chien3f71e702012-02-17 18:45:27 +0800197FuncTy_20_args.push_back(PointerTy_1);
198FunctionType* FuncTy_20 = FunctionType::get(
Logan Chiena6b2ca62012-03-06 15:50:54 +0800199 /*Result=*/IntegerType::get(mod->getContext(), 32),
Logan Chien3f71e702012-02-17 18:45:27 +0800200 /*Params=*/FuncTy_20_args,
201 /*isVarArg=*/false);
202
203std::vector<Type*>FuncTy_21_args;
204FuncTy_21_args.push_back(PointerTy_1);
205FuncTy_21_args.push_back(PointerTy_1);
206FunctionType* FuncTy_21 = FunctionType::get(
Logan Chien3f71e702012-02-17 18:45:27 +0800207 /*Result=*/Type::getVoidTy(mod->getContext()),
Logan Chiena6b2ca62012-03-06 15:50:54 +0800208 /*Params=*/FuncTy_21_args,
Logan Chien3f71e702012-02-17 18:45:27 +0800209 /*isVarArg=*/false);
210
Logan Chien42e0e152012-01-13 15:42:36 +0800211
212// Function Declarations
213
214Function* func___art_type_list = mod->getFunction("__art_type_list");
215if (!func___art_type_list) {
216func___art_type_list = Function::Create(
217 /*Type=*/FuncTy_0,
218 /*Linkage=*/GlobalValue::ExternalLinkage,
219 /*Name=*/"__art_type_list", mod); // (external, no body)
220func___art_type_list->setCallingConv(CallingConv::C);
221}
222AttrListPtr func___art_type_list_PAL;
223func___art_type_list->setAttributes(func___art_type_list_PAL);
224
225Function* func_art_get_current_thread_from_code = mod->getFunction("art_get_current_thread_from_code");
226if (!func_art_get_current_thread_from_code) {
227func_art_get_current_thread_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800228 /*Type=*/FuncTy_3,
Logan Chien42e0e152012-01-13 15:42:36 +0800229 /*Linkage=*/GlobalValue::ExternalLinkage,
230 /*Name=*/"art_get_current_thread_from_code", mod); // (external, no body)
231func_art_get_current_thread_from_code->setCallingConv(CallingConv::C);
232}
233AttrListPtr func_art_get_current_thread_from_code_PAL;
234func_art_get_current_thread_from_code->setAttributes(func_art_get_current_thread_from_code_PAL);
235
236Function* func_art_set_current_thread_from_code = mod->getFunction("art_set_current_thread_from_code");
237if (!func_art_set_current_thread_from_code) {
238func_art_set_current_thread_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800239 /*Type=*/FuncTy_4,
Logan Chien42e0e152012-01-13 15:42:36 +0800240 /*Linkage=*/GlobalValue::ExternalLinkage,
241 /*Name=*/"art_set_current_thread_from_code", mod); // (external, no body)
242func_art_set_current_thread_from_code->setCallingConv(CallingConv::C);
243}
244AttrListPtr func_art_set_current_thread_from_code_PAL;
245func_art_set_current_thread_from_code->setAttributes(func_art_set_current_thread_from_code_PAL);
246
247Function* func_art_lock_object_from_code = mod->getFunction("art_lock_object_from_code");
248if (!func_art_lock_object_from_code) {
249func_art_lock_object_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800250 /*Type=*/FuncTy_4,
Logan Chien42e0e152012-01-13 15:42:36 +0800251 /*Linkage=*/GlobalValue::ExternalLinkage,
252 /*Name=*/"art_lock_object_from_code", mod); // (external, no body)
253func_art_lock_object_from_code->setCallingConv(CallingConv::C);
254}
255AttrListPtr func_art_lock_object_from_code_PAL;
256func_art_lock_object_from_code->setAttributes(func_art_lock_object_from_code_PAL);
257
258Function* func_art_unlock_object_from_code = mod->getFunction("art_unlock_object_from_code");
259if (!func_art_unlock_object_from_code) {
260func_art_unlock_object_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800261 /*Type=*/FuncTy_4,
Logan Chien42e0e152012-01-13 15:42:36 +0800262 /*Linkage=*/GlobalValue::ExternalLinkage,
263 /*Name=*/"art_unlock_object_from_code", mod); // (external, no body)
264func_art_unlock_object_from_code->setCallingConv(CallingConv::C);
265}
266AttrListPtr func_art_unlock_object_from_code_PAL;
267func_art_unlock_object_from_code->setAttributes(func_art_unlock_object_from_code_PAL);
268
269Function* func_art_test_suspend_from_code = mod->getFunction("art_test_suspend_from_code");
270if (!func_art_test_suspend_from_code) {
271func_art_test_suspend_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800272 /*Type=*/FuncTy_5,
Logan Chien42e0e152012-01-13 15:42:36 +0800273 /*Linkage=*/GlobalValue::ExternalLinkage,
274 /*Name=*/"art_test_suspend_from_code", mod); // (external, no body)
275func_art_test_suspend_from_code->setCallingConv(CallingConv::C);
276}
277AttrListPtr func_art_test_suspend_from_code_PAL;
278func_art_test_suspend_from_code->setAttributes(func_art_test_suspend_from_code_PAL);
279
Logan Chien3f71e702012-02-17 18:45:27 +0800280Function* func_art_push_shadow_frame_from_code = mod->getFunction("art_push_shadow_frame_from_code");
281if (!func_art_push_shadow_frame_from_code) {
282func_art_push_shadow_frame_from_code = Function::Create(
283 /*Type=*/FuncTy_6,
284 /*Linkage=*/GlobalValue::ExternalLinkage,
285 /*Name=*/"art_push_shadow_frame_from_code", mod); // (external, no body)
286func_art_push_shadow_frame_from_code->setCallingConv(CallingConv::C);
287}
288AttrListPtr func_art_push_shadow_frame_from_code_PAL;
289func_art_push_shadow_frame_from_code->setAttributes(func_art_push_shadow_frame_from_code_PAL);
290
291Function* func_art_pop_shadow_frame_from_code = mod->getFunction("art_pop_shadow_frame_from_code");
292if (!func_art_pop_shadow_frame_from_code) {
293func_art_pop_shadow_frame_from_code = Function::Create(
294 /*Type=*/FuncTy_5,
295 /*Linkage=*/GlobalValue::ExternalLinkage,
296 /*Name=*/"art_pop_shadow_frame_from_code", mod); // (external, no body)
297func_art_pop_shadow_frame_from_code->setCallingConv(CallingConv::C);
298}
299AttrListPtr func_art_pop_shadow_frame_from_code_PAL;
300func_art_pop_shadow_frame_from_code->setAttributes(func_art_pop_shadow_frame_from_code_PAL);
301
Logan Chien42e0e152012-01-13 15:42:36 +0800302Function* func_art_is_exception_pending_from_code = mod->getFunction("art_is_exception_pending_from_code");
303if (!func_art_is_exception_pending_from_code) {
304func_art_is_exception_pending_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800305 /*Type=*/FuncTy_7,
Logan Chien42e0e152012-01-13 15:42:36 +0800306 /*Linkage=*/GlobalValue::ExternalLinkage,
307 /*Name=*/"art_is_exception_pending_from_code", mod); // (external, no body)
308func_art_is_exception_pending_from_code->setCallingConv(CallingConv::C);
309}
310AttrListPtr func_art_is_exception_pending_from_code_PAL;
311func_art_is_exception_pending_from_code->setAttributes(func_art_is_exception_pending_from_code_PAL);
312
313Function* func_art_throw_div_zero_from_code = mod->getFunction("art_throw_div_zero_from_code");
314if (!func_art_throw_div_zero_from_code) {
315func_art_throw_div_zero_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800316 /*Type=*/FuncTy_5,
Logan Chien42e0e152012-01-13 15:42:36 +0800317 /*Linkage=*/GlobalValue::ExternalLinkage,
318 /*Name=*/"art_throw_div_zero_from_code", mod); // (external, no body)
319func_art_throw_div_zero_from_code->setCallingConv(CallingConv::C);
320}
321AttrListPtr func_art_throw_div_zero_from_code_PAL;
322func_art_throw_div_zero_from_code->setAttributes(func_art_throw_div_zero_from_code_PAL);
323
324Function* func_art_throw_array_bounds_from_code = mod->getFunction("art_throw_array_bounds_from_code");
325if (!func_art_throw_array_bounds_from_code) {
326func_art_throw_array_bounds_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800327 /*Type=*/FuncTy_8,
Logan Chien42e0e152012-01-13 15:42:36 +0800328 /*Linkage=*/GlobalValue::ExternalLinkage,
329 /*Name=*/"art_throw_array_bounds_from_code", mod); // (external, no body)
330func_art_throw_array_bounds_from_code->setCallingConv(CallingConv::C);
331}
332AttrListPtr func_art_throw_array_bounds_from_code_PAL;
333func_art_throw_array_bounds_from_code->setAttributes(func_art_throw_array_bounds_from_code_PAL);
334
335Function* func_art_throw_no_such_method_from_code = mod->getFunction("art_throw_no_such_method_from_code");
336if (!func_art_throw_no_such_method_from_code) {
337func_art_throw_no_such_method_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800338 /*Type=*/FuncTy_9,
Logan Chien42e0e152012-01-13 15:42:36 +0800339 /*Linkage=*/GlobalValue::ExternalLinkage,
340 /*Name=*/"art_throw_no_such_method_from_code", mod); // (external, no body)
341func_art_throw_no_such_method_from_code->setCallingConv(CallingConv::C);
342}
343AttrListPtr func_art_throw_no_such_method_from_code_PAL;
344func_art_throw_no_such_method_from_code->setAttributes(func_art_throw_no_such_method_from_code_PAL);
345
346Function* func_art_throw_null_pointer_exception_from_code = mod->getFunction("art_throw_null_pointer_exception_from_code");
347if (!func_art_throw_null_pointer_exception_from_code) {
348func_art_throw_null_pointer_exception_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800349 /*Type=*/FuncTy_5,
Logan Chien42e0e152012-01-13 15:42:36 +0800350 /*Linkage=*/GlobalValue::ExternalLinkage,
351 /*Name=*/"art_throw_null_pointer_exception_from_code", mod); // (external, no body)
352func_art_throw_null_pointer_exception_from_code->setCallingConv(CallingConv::C);
353}
354AttrListPtr func_art_throw_null_pointer_exception_from_code_PAL;
355func_art_throw_null_pointer_exception_from_code->setAttributes(func_art_throw_null_pointer_exception_from_code_PAL);
356
357Function* func_art_throw_stack_overflow_from_code = mod->getFunction("art_throw_stack_overflow_from_code");
358if (!func_art_throw_stack_overflow_from_code) {
359func_art_throw_stack_overflow_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800360 /*Type=*/FuncTy_4,
Logan Chien42e0e152012-01-13 15:42:36 +0800361 /*Linkage=*/GlobalValue::ExternalLinkage,
362 /*Name=*/"art_throw_stack_overflow_from_code", mod); // (external, no body)
363func_art_throw_stack_overflow_from_code->setCallingConv(CallingConv::C);
364}
365AttrListPtr func_art_throw_stack_overflow_from_code_PAL;
366func_art_throw_stack_overflow_from_code->setAttributes(func_art_throw_stack_overflow_from_code_PAL);
367
368Function* func_art_throw_exception_from_code = mod->getFunction("art_throw_exception_from_code");
369if (!func_art_throw_exception_from_code) {
370func_art_throw_exception_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800371 /*Type=*/FuncTy_4,
Logan Chien42e0e152012-01-13 15:42:36 +0800372 /*Linkage=*/GlobalValue::ExternalLinkage,
373 /*Name=*/"art_throw_exception_from_code", mod); // (external, no body)
374func_art_throw_exception_from_code->setCallingConv(CallingConv::C);
375}
376AttrListPtr func_art_throw_exception_from_code_PAL;
377func_art_throw_exception_from_code->setAttributes(func_art_throw_exception_from_code_PAL);
378
379Function* func_art_find_catch_block_from_code = mod->getFunction("art_find_catch_block_from_code");
380if (!func_art_find_catch_block_from_code) {
381func_art_find_catch_block_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800382 /*Type=*/FuncTy_10,
Logan Chien42e0e152012-01-13 15:42:36 +0800383 /*Linkage=*/GlobalValue::ExternalLinkage,
384 /*Name=*/"art_find_catch_block_from_code", mod); // (external, no body)
385func_art_find_catch_block_from_code->setCallingConv(CallingConv::C);
386}
387AttrListPtr func_art_find_catch_block_from_code_PAL;
388func_art_find_catch_block_from_code->setAttributes(func_art_find_catch_block_from_code_PAL);
389
390Function* func_art_alloc_object_from_code = mod->getFunction("art_alloc_object_from_code");
391if (!func_art_alloc_object_from_code) {
392func_art_alloc_object_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800393 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800394 /*Linkage=*/GlobalValue::ExternalLinkage,
395 /*Name=*/"art_alloc_object_from_code", mod); // (external, no body)
396func_art_alloc_object_from_code->setCallingConv(CallingConv::C);
397}
398AttrListPtr func_art_alloc_object_from_code_PAL;
399func_art_alloc_object_from_code->setAttributes(func_art_alloc_object_from_code_PAL);
400
401Function* func_art_alloc_object_from_code_with_access_check = mod->getFunction("art_alloc_object_from_code_with_access_check");
402if (!func_art_alloc_object_from_code_with_access_check) {
403func_art_alloc_object_from_code_with_access_check = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800404 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800405 /*Linkage=*/GlobalValue::ExternalLinkage,
406 /*Name=*/"art_alloc_object_from_code_with_access_check", mod); // (external, no body)
407func_art_alloc_object_from_code_with_access_check->setCallingConv(CallingConv::C);
408}
409AttrListPtr func_art_alloc_object_from_code_with_access_check_PAL;
410func_art_alloc_object_from_code_with_access_check->setAttributes(func_art_alloc_object_from_code_with_access_check_PAL);
411
412Function* func_art_alloc_array_from_code = mod->getFunction("art_alloc_array_from_code");
413if (!func_art_alloc_array_from_code) {
414func_art_alloc_array_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800415 /*Type=*/FuncTy_12,
Logan Chien42e0e152012-01-13 15:42:36 +0800416 /*Linkage=*/GlobalValue::ExternalLinkage,
417 /*Name=*/"art_alloc_array_from_code", mod); // (external, no body)
418func_art_alloc_array_from_code->setCallingConv(CallingConv::C);
419}
420AttrListPtr func_art_alloc_array_from_code_PAL;
421func_art_alloc_array_from_code->setAttributes(func_art_alloc_array_from_code_PAL);
422
423Function* func_art_alloc_array_from_code_with_access_check = mod->getFunction("art_alloc_array_from_code_with_access_check");
424if (!func_art_alloc_array_from_code_with_access_check) {
425func_art_alloc_array_from_code_with_access_check = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800426 /*Type=*/FuncTy_12,
Logan Chien42e0e152012-01-13 15:42:36 +0800427 /*Linkage=*/GlobalValue::ExternalLinkage,
428 /*Name=*/"art_alloc_array_from_code_with_access_check", mod); // (external, no body)
429func_art_alloc_array_from_code_with_access_check->setCallingConv(CallingConv::C);
430}
431AttrListPtr func_art_alloc_array_from_code_with_access_check_PAL;
432func_art_alloc_array_from_code_with_access_check->setAttributes(func_art_alloc_array_from_code_with_access_check_PAL);
433
434Function* func_art_check_and_alloc_array_from_code = mod->getFunction("art_check_and_alloc_array_from_code");
435if (!func_art_check_and_alloc_array_from_code) {
436func_art_check_and_alloc_array_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800437 /*Type=*/FuncTy_12,
Logan Chien42e0e152012-01-13 15:42:36 +0800438 /*Linkage=*/GlobalValue::ExternalLinkage,
439 /*Name=*/"art_check_and_alloc_array_from_code", mod); // (external, no body)
440func_art_check_and_alloc_array_from_code->setCallingConv(CallingConv::C);
441}
442AttrListPtr func_art_check_and_alloc_array_from_code_PAL;
443func_art_check_and_alloc_array_from_code->setAttributes(func_art_check_and_alloc_array_from_code_PAL);
444
445Function* func_art_check_and_alloc_array_from_code_with_access_check = mod->getFunction("art_check_and_alloc_array_from_code_with_access_check");
446if (!func_art_check_and_alloc_array_from_code_with_access_check) {
447func_art_check_and_alloc_array_from_code_with_access_check = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800448 /*Type=*/FuncTy_12,
Logan Chien42e0e152012-01-13 15:42:36 +0800449 /*Linkage=*/GlobalValue::ExternalLinkage,
450 /*Name=*/"art_check_and_alloc_array_from_code_with_access_check", mod); // (external, no body)
451func_art_check_and_alloc_array_from_code_with_access_check->setCallingConv(CallingConv::C);
452}
453AttrListPtr func_art_check_and_alloc_array_from_code_with_access_check_PAL;
454func_art_check_and_alloc_array_from_code_with_access_check->setAttributes(func_art_check_and_alloc_array_from_code_with_access_check_PAL);
455
Logan Chien42e0e152012-01-13 15:42:36 +0800456Function* func_art_find_instance_field_from_code = mod->getFunction("art_find_instance_field_from_code");
457if (!func_art_find_instance_field_from_code) {
458func_art_find_instance_field_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800459 /*Type=*/FuncTy_13,
Logan Chien42e0e152012-01-13 15:42:36 +0800460 /*Linkage=*/GlobalValue::ExternalLinkage,
461 /*Name=*/"art_find_instance_field_from_code", mod); // (external, no body)
462func_art_find_instance_field_from_code->setCallingConv(CallingConv::C);
463}
464AttrListPtr func_art_find_instance_field_from_code_PAL;
465func_art_find_instance_field_from_code->setAttributes(func_art_find_instance_field_from_code_PAL);
466
467Function* func_art_find_static_field_from_code = mod->getFunction("art_find_static_field_from_code");
468if (!func_art_find_static_field_from_code) {
469func_art_find_static_field_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800470 /*Type=*/FuncTy_13,
Logan Chien42e0e152012-01-13 15:42:36 +0800471 /*Linkage=*/GlobalValue::ExternalLinkage,
472 /*Name=*/"art_find_static_field_from_code", mod); // (external, no body)
473func_art_find_static_field_from_code->setCallingConv(CallingConv::C);
474}
475AttrListPtr func_art_find_static_field_from_code_PAL;
476func_art_find_static_field_from_code->setAttributes(func_art_find_static_field_from_code_PAL);
477
478Function* func_art_find_interface_method_from_code = mod->getFunction("art_find_interface_method_from_code");
479if (!func_art_find_interface_method_from_code) {
480func_art_find_interface_method_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800481 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800482 /*Linkage=*/GlobalValue::ExternalLinkage,
483 /*Name=*/"art_find_interface_method_from_code", mod); // (external, no body)
484func_art_find_interface_method_from_code->setCallingConv(CallingConv::C);
485}
486AttrListPtr func_art_find_interface_method_from_code_PAL;
487func_art_find_interface_method_from_code->setAttributes(func_art_find_interface_method_from_code_PAL);
488
489Function* func_art_initialize_static_storage_from_code = mod->getFunction("art_initialize_static_storage_from_code");
490if (!func_art_initialize_static_storage_from_code) {
491func_art_initialize_static_storage_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800492 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800493 /*Linkage=*/GlobalValue::ExternalLinkage,
494 /*Name=*/"art_initialize_static_storage_from_code", mod); // (external, no body)
495func_art_initialize_static_storage_from_code->setCallingConv(CallingConv::C);
496}
497AttrListPtr func_art_initialize_static_storage_from_code_PAL;
498func_art_initialize_static_storage_from_code->setAttributes(func_art_initialize_static_storage_from_code_PAL);
499
500Function* func_art_initialize_type_from_code = mod->getFunction("art_initialize_type_from_code");
501if (!func_art_initialize_type_from_code) {
502func_art_initialize_type_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800503 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800504 /*Linkage=*/GlobalValue::ExternalLinkage,
505 /*Name=*/"art_initialize_type_from_code", mod); // (external, no body)
506func_art_initialize_type_from_code->setCallingConv(CallingConv::C);
507}
508AttrListPtr func_art_initialize_type_from_code_PAL;
509func_art_initialize_type_from_code->setAttributes(func_art_initialize_type_from_code_PAL);
510
511Function* func_art_initialize_type_and_verify_access_from_code = mod->getFunction("art_initialize_type_and_verify_access_from_code");
512if (!func_art_initialize_type_and_verify_access_from_code) {
513func_art_initialize_type_and_verify_access_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800514 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800515 /*Linkage=*/GlobalValue::ExternalLinkage,
516 /*Name=*/"art_initialize_type_and_verify_access_from_code", mod); // (external, no body)
517func_art_initialize_type_and_verify_access_from_code->setCallingConv(CallingConv::C);
518}
519AttrListPtr func_art_initialize_type_and_verify_access_from_code_PAL;
520func_art_initialize_type_and_verify_access_from_code->setAttributes(func_art_initialize_type_and_verify_access_from_code_PAL);
521
522Function* func_art_resolve_string_from_code = mod->getFunction("art_resolve_string_from_code");
523if (!func_art_resolve_string_from_code) {
524func_art_resolve_string_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800525 /*Type=*/FuncTy_14,
Logan Chien42e0e152012-01-13 15:42:36 +0800526 /*Linkage=*/GlobalValue::ExternalLinkage,
527 /*Name=*/"art_resolve_string_from_code", mod); // (external, no body)
528func_art_resolve_string_from_code->setCallingConv(CallingConv::C);
529}
530AttrListPtr func_art_resolve_string_from_code_PAL;
531func_art_resolve_string_from_code->setAttributes(func_art_resolve_string_from_code_PAL);
532
Logan Chien42e0e152012-01-13 15:42:36 +0800533Function* func_art_set32_static_from_code = mod->getFunction("art_set32_static_from_code");
534if (!func_art_set32_static_from_code) {
535func_art_set32_static_from_code = Function::Create(
Logan Chiena6b2ca62012-03-06 15:50:54 +0800536 /*Type=*/FuncTy_15,
Logan Chien42e0e152012-01-13 15:42:36 +0800537 /*Linkage=*/GlobalValue::ExternalLinkage,
538 /*Name=*/"art_set32_static_from_code", mod); // (external, no body)
539func_art_set32_static_from_code->setCallingConv(CallingConv::C);
540}
541AttrListPtr func_art_set32_static_from_code_PAL;
542func_art_set32_static_from_code->setAttributes(func_art_set32_static_from_code_PAL);
543
544Function* func_art_set64_static_from_code = mod->getFunction("art_set64_static_from_code");
545if (!func_art_set64_static_from_code) {
546func_art_set64_static_from_code = Function::Create(
Logan Chiena6b2ca62012-03-06 15:50:54 +0800547 /*Type=*/FuncTy_16,
Logan Chien42e0e152012-01-13 15:42:36 +0800548 /*Linkage=*/GlobalValue::ExternalLinkage,
549 /*Name=*/"art_set64_static_from_code", mod); // (external, no body)
550func_art_set64_static_from_code->setCallingConv(CallingConv::C);
551}
552AttrListPtr func_art_set64_static_from_code_PAL;
553func_art_set64_static_from_code->setAttributes(func_art_set64_static_from_code_PAL);
554
555Function* func_art_set_obj_static_from_code = mod->getFunction("art_set_obj_static_from_code");
556if (!func_art_set_obj_static_from_code) {
557func_art_set_obj_static_from_code = Function::Create(
Logan Chiena6b2ca62012-03-06 15:50:54 +0800558 /*Type=*/FuncTy_17,
Logan Chien42e0e152012-01-13 15:42:36 +0800559 /*Linkage=*/GlobalValue::ExternalLinkage,
560 /*Name=*/"art_set_obj_static_from_code", mod); // (external, no body)
561func_art_set_obj_static_from_code->setCallingConv(CallingConv::C);
562}
563AttrListPtr func_art_set_obj_static_from_code_PAL;
564func_art_set_obj_static_from_code->setAttributes(func_art_set_obj_static_from_code_PAL);
565
566Function* func_art_get32_static_from_code = mod->getFunction("art_get32_static_from_code");
567if (!func_art_get32_static_from_code) {
568func_art_get32_static_from_code = Function::Create(
Logan Chiena6b2ca62012-03-06 15:50:54 +0800569 /*Type=*/FuncTy_18,
Logan Chien42e0e152012-01-13 15:42:36 +0800570 /*Linkage=*/GlobalValue::ExternalLinkage,
571 /*Name=*/"art_get32_static_from_code", mod); // (external, no body)
572func_art_get32_static_from_code->setCallingConv(CallingConv::C);
573}
574AttrListPtr func_art_get32_static_from_code_PAL;
575func_art_get32_static_from_code->setAttributes(func_art_get32_static_from_code_PAL);
576
577Function* func_art_get64_static_from_code = mod->getFunction("art_get64_static_from_code");
578if (!func_art_get64_static_from_code) {
579func_art_get64_static_from_code = Function::Create(
Logan Chiena6b2ca62012-03-06 15:50:54 +0800580 /*Type=*/FuncTy_19,
Logan Chien42e0e152012-01-13 15:42:36 +0800581 /*Linkage=*/GlobalValue::ExternalLinkage,
582 /*Name=*/"art_get64_static_from_code", mod); // (external, no body)
583func_art_get64_static_from_code->setCallingConv(CallingConv::C);
584}
585AttrListPtr func_art_get64_static_from_code_PAL;
586func_art_get64_static_from_code->setAttributes(func_art_get64_static_from_code_PAL);
587
588Function* func_art_get_obj_static_from_code = mod->getFunction("art_get_obj_static_from_code");
589if (!func_art_get_obj_static_from_code) {
590func_art_get_obj_static_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800591 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800592 /*Linkage=*/GlobalValue::ExternalLinkage,
593 /*Name=*/"art_get_obj_static_from_code", mod); // (external, no body)
594func_art_get_obj_static_from_code->setCallingConv(CallingConv::C);
595}
596AttrListPtr func_art_get_obj_static_from_code_PAL;
597func_art_get_obj_static_from_code->setAttributes(func_art_get_obj_static_from_code_PAL);
598
599Function* func_art_set32_instance_from_code = mod->getFunction("art_set32_instance_from_code");
600if (!func_art_set32_instance_from_code) {
601func_art_set32_instance_from_code = Function::Create(
Logan Chiena6b2ca62012-03-06 15:50:54 +0800602 /*Type=*/FuncTy_15,
Logan Chien42e0e152012-01-13 15:42:36 +0800603 /*Linkage=*/GlobalValue::ExternalLinkage,
604 /*Name=*/"art_set32_instance_from_code", mod); // (external, no body)
605func_art_set32_instance_from_code->setCallingConv(CallingConv::C);
606}
607AttrListPtr func_art_set32_instance_from_code_PAL;
608func_art_set32_instance_from_code->setAttributes(func_art_set32_instance_from_code_PAL);
609
610Function* func_art_set64_instance_from_code = mod->getFunction("art_set64_instance_from_code");
611if (!func_art_set64_instance_from_code) {
612func_art_set64_instance_from_code = Function::Create(
Logan Chiena6b2ca62012-03-06 15:50:54 +0800613 /*Type=*/FuncTy_16,
Logan Chien42e0e152012-01-13 15:42:36 +0800614 /*Linkage=*/GlobalValue::ExternalLinkage,
615 /*Name=*/"art_set64_instance_from_code", mod); // (external, no body)
616func_art_set64_instance_from_code->setCallingConv(CallingConv::C);
617}
618AttrListPtr func_art_set64_instance_from_code_PAL;
619func_art_set64_instance_from_code->setAttributes(func_art_set64_instance_from_code_PAL);
620
621Function* func_art_set_obj_instance_from_code = mod->getFunction("art_set_obj_instance_from_code");
622if (!func_art_set_obj_instance_from_code) {
623func_art_set_obj_instance_from_code = Function::Create(
Logan Chiena6b2ca62012-03-06 15:50:54 +0800624 /*Type=*/FuncTy_17,
Logan Chien42e0e152012-01-13 15:42:36 +0800625 /*Linkage=*/GlobalValue::ExternalLinkage,
626 /*Name=*/"art_set_obj_instance_from_code", mod); // (external, no body)
627func_art_set_obj_instance_from_code->setCallingConv(CallingConv::C);
628}
629AttrListPtr func_art_set_obj_instance_from_code_PAL;
630func_art_set_obj_instance_from_code->setAttributes(func_art_set_obj_instance_from_code_PAL);
631
632Function* func_art_get32_instance_from_code = mod->getFunction("art_get32_instance_from_code");
633if (!func_art_get32_instance_from_code) {
634func_art_get32_instance_from_code = Function::Create(
Logan Chiena6b2ca62012-03-06 15:50:54 +0800635 /*Type=*/FuncTy_18,
Logan Chien42e0e152012-01-13 15:42:36 +0800636 /*Linkage=*/GlobalValue::ExternalLinkage,
637 /*Name=*/"art_get32_instance_from_code", mod); // (external, no body)
638func_art_get32_instance_from_code->setCallingConv(CallingConv::C);
639}
640AttrListPtr func_art_get32_instance_from_code_PAL;
641func_art_get32_instance_from_code->setAttributes(func_art_get32_instance_from_code_PAL);
642
643Function* func_art_get64_instance_from_code = mod->getFunction("art_get64_instance_from_code");
644if (!func_art_get64_instance_from_code) {
645func_art_get64_instance_from_code = Function::Create(
Logan Chiena6b2ca62012-03-06 15:50:54 +0800646 /*Type=*/FuncTy_19,
Logan Chien42e0e152012-01-13 15:42:36 +0800647 /*Linkage=*/GlobalValue::ExternalLinkage,
648 /*Name=*/"art_get64_instance_from_code", mod); // (external, no body)
649func_art_get64_instance_from_code->setCallingConv(CallingConv::C);
650}
651AttrListPtr func_art_get64_instance_from_code_PAL;
652func_art_get64_instance_from_code->setAttributes(func_art_get64_instance_from_code_PAL);
653
654Function* func_art_get_obj_instance_from_code = mod->getFunction("art_get_obj_instance_from_code");
655if (!func_art_get_obj_instance_from_code) {
656func_art_get_obj_instance_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800657 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800658 /*Linkage=*/GlobalValue::ExternalLinkage,
659 /*Name=*/"art_get_obj_instance_from_code", mod); // (external, no body)
660func_art_get_obj_instance_from_code->setCallingConv(CallingConv::C);
661}
662AttrListPtr func_art_get_obj_instance_from_code_PAL;
663func_art_get_obj_instance_from_code->setAttributes(func_art_get_obj_instance_from_code_PAL);
664
665Function* func_art_is_assignable_from_code = mod->getFunction("art_is_assignable_from_code");
666if (!func_art_is_assignable_from_code) {
667func_art_is_assignable_from_code = Function::Create(
Logan Chiena6b2ca62012-03-06 15:50:54 +0800668 /*Type=*/FuncTy_20,
Logan Chien42e0e152012-01-13 15:42:36 +0800669 /*Linkage=*/GlobalValue::ExternalLinkage,
670 /*Name=*/"art_is_assignable_from_code", mod); // (external, no body)
671func_art_is_assignable_from_code->setCallingConv(CallingConv::C);
672}
673AttrListPtr func_art_is_assignable_from_code_PAL;
674func_art_is_assignable_from_code->setAttributes(func_art_is_assignable_from_code_PAL);
675
676Function* func_art_check_cast_from_code = mod->getFunction("art_check_cast_from_code");
677if (!func_art_check_cast_from_code) {
678func_art_check_cast_from_code = Function::Create(
Logan Chiena6b2ca62012-03-06 15:50:54 +0800679 /*Type=*/FuncTy_21,
Logan Chien42e0e152012-01-13 15:42:36 +0800680 /*Linkage=*/GlobalValue::ExternalLinkage,
681 /*Name=*/"art_check_cast_from_code", mod); // (external, no body)
682func_art_check_cast_from_code->setCallingConv(CallingConv::C);
683}
684AttrListPtr func_art_check_cast_from_code_PAL;
685func_art_check_cast_from_code->setAttributes(func_art_check_cast_from_code_PAL);
686
687// Global Variable Declarations
688
689
690// Constant Definitions
691
692// Global Variable Definitions
693
694// Function Definitions
695
696return mod;
697
698}
Logan Chiene75a8cc2012-02-24 12:26:43 +0800699
700} // namespace compiler_llvm
701} // namespace art