blob: c06c04ad3148e9089fbdeeaacdc4c930a5fa9aec [file] [log] [blame]
Logan Chien42e0e152012-01-13 15:42:36 +08001// Generated with ./tools/gen_art_module_cc.sh
2
3// Generated by llvm2cpp - DO NOT MODIFY!
4
5
6Module* makeLLVMModuleContents(Module *mod) {
7
8mod->setModuleIdentifier("art_module.ll");
9
10// Type Definitions
11std::vector<Type*>FuncTy_0_args;
12StructType *StructTy_JavaObject = mod->getTypeByName("JavaObject");
13if (!StructTy_JavaObject) {
14StructTy_JavaObject = StructType::create(mod->getContext(), "JavaObject");
15}
16std::vector<Type*>StructTy_JavaObject_fields;
17if (StructTy_JavaObject->isOpaque()) {
18StructTy_JavaObject->setBody(StructTy_JavaObject_fields, /*isPacked=*/false);
19}
20
21PointerType* PointerTy_1 = PointerType::get(StructTy_JavaObject, 0);
22
23FuncTy_0_args.push_back(PointerTy_1);
Logan Chien3f71e702012-02-17 18:45:27 +080024StructType *StructTy_ArtFrame = mod->getTypeByName("ArtFrame");
25if (!StructTy_ArtFrame) {
26StructTy_ArtFrame = StructType::create(mod->getContext(), "ArtFrame");
27}
28std::vector<Type*>StructTy_ArtFrame_fields;
29PointerType* PointerTy_2 = PointerType::get(StructTy_ArtFrame, 0);
30
31StructTy_ArtFrame_fields.push_back(PointerTy_2);
32StructTy_ArtFrame_fields.push_back(PointerTy_1);
33StructTy_ArtFrame_fields.push_back(IntegerType::get(mod->getContext(), 32));
34StructTy_ArtFrame_fields.push_back(IntegerType::get(mod->getContext(), 32));
35if (StructTy_ArtFrame->isOpaque()) {
36StructTy_ArtFrame->setBody(StructTy_ArtFrame_fields, /*isPacked=*/false);
37}
38
39
40FuncTy_0_args.push_back(PointerTy_2);
Logan Chien42e0e152012-01-13 15:42:36 +080041FunctionType* FuncTy_0 = FunctionType::get(
42 /*Result=*/Type::getVoidTy(mod->getContext()),
43 /*Params=*/FuncTy_0_args,
44 /*isVarArg=*/false);
45
Logan Chien42e0e152012-01-13 15:42:36 +080046std::vector<Type*>FuncTy_3_args;
47FunctionType* FuncTy_3 = FunctionType::get(
Logan Chien3f71e702012-02-17 18:45:27 +080048 /*Result=*/PointerTy_1,
Logan Chien42e0e152012-01-13 15:42:36 +080049 /*Params=*/FuncTy_3_args,
50 /*isVarArg=*/false);
51
52std::vector<Type*>FuncTy_4_args;
Logan Chien3f71e702012-02-17 18:45:27 +080053FuncTy_4_args.push_back(PointerTy_1);
Logan Chien42e0e152012-01-13 15:42:36 +080054FunctionType* FuncTy_4 = FunctionType::get(
Logan Chien3f71e702012-02-17 18:45:27 +080055 /*Result=*/Type::getVoidTy(mod->getContext()),
Logan Chien42e0e152012-01-13 15:42:36 +080056 /*Params=*/FuncTy_4_args,
57 /*isVarArg=*/false);
58
59std::vector<Type*>FuncTy_5_args;
Logan Chien42e0e152012-01-13 15:42:36 +080060FunctionType* FuncTy_5 = FunctionType::get(
61 /*Result=*/Type::getVoidTy(mod->getContext()),
62 /*Params=*/FuncTy_5_args,
63 /*isVarArg=*/false);
64
65std::vector<Type*>FuncTy_6_args;
Logan Chien3f71e702012-02-17 18:45:27 +080066FuncTy_6_args.push_back(PointerTy_2);
Logan Chien42e0e152012-01-13 15:42:36 +080067FunctionType* FuncTy_6 = FunctionType::get(
68 /*Result=*/Type::getVoidTy(mod->getContext()),
69 /*Params=*/FuncTy_6_args,
70 /*isVarArg=*/false);
71
72std::vector<Type*>FuncTy_7_args;
Logan Chien42e0e152012-01-13 15:42:36 +080073FunctionType* FuncTy_7 = FunctionType::get(
Logan Chien3f71e702012-02-17 18:45:27 +080074 /*Result=*/IntegerType::get(mod->getContext(), 1),
Logan Chien42e0e152012-01-13 15:42:36 +080075 /*Params=*/FuncTy_7_args,
76 /*isVarArg=*/false);
77
78std::vector<Type*>FuncTy_8_args;
79FuncTy_8_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien3f71e702012-02-17 18:45:27 +080080FuncTy_8_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien42e0e152012-01-13 15:42:36 +080081FunctionType* FuncTy_8 = FunctionType::get(
Logan Chien3f71e702012-02-17 18:45:27 +080082 /*Result=*/Type::getVoidTy(mod->getContext()),
Logan Chien42e0e152012-01-13 15:42:36 +080083 /*Params=*/FuncTy_8_args,
84 /*isVarArg=*/false);
85
86std::vector<Type*>FuncTy_9_args;
87FuncTy_9_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien42e0e152012-01-13 15:42:36 +080088FunctionType* FuncTy_9 = FunctionType::get(
Logan Chien3f71e702012-02-17 18:45:27 +080089 /*Result=*/Type::getVoidTy(mod->getContext()),
Logan Chien42e0e152012-01-13 15:42:36 +080090 /*Params=*/FuncTy_9_args,
91 /*isVarArg=*/false);
92
93std::vector<Type*>FuncTy_10_args;
Logan Chien42e0e152012-01-13 15:42:36 +080094FuncTy_10_args.push_back(PointerTy_1);
Logan Chien3f71e702012-02-17 18:45:27 +080095FuncTy_10_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien42e0e152012-01-13 15:42:36 +080096FunctionType* FuncTy_10 = FunctionType::get(
Logan Chien3f71e702012-02-17 18:45:27 +080097 /*Result=*/IntegerType::get(mod->getContext(), 32),
Logan Chien42e0e152012-01-13 15:42:36 +080098 /*Params=*/FuncTy_10_args,
99 /*isVarArg=*/false);
100
101std::vector<Type*>FuncTy_11_args;
Logan Chien42e0e152012-01-13 15:42:36 +0800102FuncTy_11_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien3f71e702012-02-17 18:45:27 +0800103FuncTy_11_args.push_back(PointerTy_1);
Logan Chien42e0e152012-01-13 15:42:36 +0800104FunctionType* FuncTy_11 = FunctionType::get(
105 /*Result=*/PointerTy_1,
106 /*Params=*/FuncTy_11_args,
107 /*isVarArg=*/false);
108
109std::vector<Type*>FuncTy_12_args;
Logan Chien3f71e702012-02-17 18:45:27 +0800110FuncTy_12_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien42e0e152012-01-13 15:42:36 +0800111FuncTy_12_args.push_back(PointerTy_1);
112FuncTy_12_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien42e0e152012-01-13 15:42:36 +0800113FunctionType* FuncTy_12 = FunctionType::get(
114 /*Result=*/PointerTy_1,
115 /*Params=*/FuncTy_12_args,
116 /*isVarArg=*/false);
117
118std::vector<Type*>FuncTy_13_args;
119FuncTy_13_args.push_back(IntegerType::get(mod->getContext(), 32));
120FuncTy_13_args.push_back(PointerTy_1);
Logan Chien42e0e152012-01-13 15:42:36 +0800121FunctionType* FuncTy_13 = FunctionType::get(
Logan Chien3f71e702012-02-17 18:45:27 +0800122 /*Result=*/Type::getVoidTy(mod->getContext()),
Logan Chien42e0e152012-01-13 15:42:36 +0800123 /*Params=*/FuncTy_13_args,
124 /*isVarArg=*/false);
125
126std::vector<Type*>FuncTy_14_args;
Logan Chien42e0e152012-01-13 15:42:36 +0800127FuncTy_14_args.push_back(PointerTy_1);
Logan Chien3f71e702012-02-17 18:45:27 +0800128FuncTy_14_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien42e0e152012-01-13 15:42:36 +0800129FunctionType* FuncTy_14 = FunctionType::get(
Logan Chien3f71e702012-02-17 18:45:27 +0800130 /*Result=*/PointerTy_1,
Logan Chien42e0e152012-01-13 15:42:36 +0800131 /*Params=*/FuncTy_14_args,
132 /*isVarArg=*/false);
133
134std::vector<Type*>FuncTy_15_args;
Logan Chien3f71e702012-02-17 18:45:27 +0800135FuncTy_15_args.push_back(PointerTy_1);
Logan Chien42e0e152012-01-13 15:42:36 +0800136FuncTy_15_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien3f71e702012-02-17 18:45:27 +0800137FuncTy_15_args.push_back(IntegerType::get(mod->getContext(), 1));
Logan Chien42e0e152012-01-13 15:42:36 +0800138FunctionType* FuncTy_15 = FunctionType::get(
Logan Chien3f71e702012-02-17 18:45:27 +0800139 /*Result=*/PointerTy_1,
Logan Chien42e0e152012-01-13 15:42:36 +0800140 /*Params=*/FuncTy_15_args,
141 /*isVarArg=*/false);
142
143std::vector<Type*>FuncTy_16_args;
144FuncTy_16_args.push_back(IntegerType::get(mod->getContext(), 32));
145FuncTy_16_args.push_back(PointerTy_1);
Logan Chien3f71e702012-02-17 18:45:27 +0800146FuncTy_16_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien42e0e152012-01-13 15:42:36 +0800147FunctionType* FuncTy_16 = FunctionType::get(
148 /*Result=*/IntegerType::get(mod->getContext(), 32),
149 /*Params=*/FuncTy_16_args,
150 /*isVarArg=*/false);
151
152std::vector<Type*>FuncTy_17_args;
153FuncTy_17_args.push_back(IntegerType::get(mod->getContext(), 32));
154FuncTy_17_args.push_back(PointerTy_1);
Logan Chien3f71e702012-02-17 18:45:27 +0800155FuncTy_17_args.push_back(IntegerType::get(mod->getContext(), 64));
Logan Chien42e0e152012-01-13 15:42:36 +0800156FunctionType* FuncTy_17 = FunctionType::get(
Logan Chien3f71e702012-02-17 18:45:27 +0800157 /*Result=*/IntegerType::get(mod->getContext(), 32),
Logan Chien42e0e152012-01-13 15:42:36 +0800158 /*Params=*/FuncTy_17_args,
159 /*isVarArg=*/false);
160
161std::vector<Type*>FuncTy_18_args;
Logan Chien3f71e702012-02-17 18:45:27 +0800162FuncTy_18_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien42e0e152012-01-13 15:42:36 +0800163FuncTy_18_args.push_back(PointerTy_1);
164FuncTy_18_args.push_back(PointerTy_1);
165FunctionType* FuncTy_18 = FunctionType::get(
166 /*Result=*/IntegerType::get(mod->getContext(), 32),
167 /*Params=*/FuncTy_18_args,
168 /*isVarArg=*/false);
169
170std::vector<Type*>FuncTy_19_args;
Logan Chien3f71e702012-02-17 18:45:27 +0800171FuncTy_19_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien42e0e152012-01-13 15:42:36 +0800172FuncTy_19_args.push_back(PointerTy_1);
173FunctionType* FuncTy_19 = FunctionType::get(
Logan Chien3f71e702012-02-17 18:45:27 +0800174 /*Result=*/IntegerType::get(mod->getContext(), 32),
Logan Chien42e0e152012-01-13 15:42:36 +0800175 /*Params=*/FuncTy_19_args,
176 /*isVarArg=*/false);
177
Logan Chien3f71e702012-02-17 18:45:27 +0800178std::vector<Type*>FuncTy_20_args;
179FuncTy_20_args.push_back(IntegerType::get(mod->getContext(), 32));
180FuncTy_20_args.push_back(PointerTy_1);
181FunctionType* FuncTy_20 = FunctionType::get(
182 /*Result=*/IntegerType::get(mod->getContext(), 64),
183 /*Params=*/FuncTy_20_args,
184 /*isVarArg=*/false);
185
186std::vector<Type*>FuncTy_21_args;
187FuncTy_21_args.push_back(PointerTy_1);
188FuncTy_21_args.push_back(PointerTy_1);
189FunctionType* FuncTy_21 = FunctionType::get(
190 /*Result=*/IntegerType::get(mod->getContext(), 32),
191 /*Params=*/FuncTy_21_args,
192 /*isVarArg=*/false);
193
194std::vector<Type*>FuncTy_22_args;
195FuncTy_22_args.push_back(PointerTy_1);
196FuncTy_22_args.push_back(PointerTy_1);
197FunctionType* FuncTy_22 = FunctionType::get(
198 /*Result=*/Type::getVoidTy(mod->getContext()),
199 /*Params=*/FuncTy_22_args,
200 /*isVarArg=*/false);
201
Logan Chien42e0e152012-01-13 15:42:36 +0800202
203// Function Declarations
204
205Function* func___art_type_list = mod->getFunction("__art_type_list");
206if (!func___art_type_list) {
207func___art_type_list = Function::Create(
208 /*Type=*/FuncTy_0,
209 /*Linkage=*/GlobalValue::ExternalLinkage,
210 /*Name=*/"__art_type_list", mod); // (external, no body)
211func___art_type_list->setCallingConv(CallingConv::C);
212}
213AttrListPtr func___art_type_list_PAL;
214func___art_type_list->setAttributes(func___art_type_list_PAL);
215
216Function* func_art_get_current_thread_from_code = mod->getFunction("art_get_current_thread_from_code");
217if (!func_art_get_current_thread_from_code) {
218func_art_get_current_thread_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800219 /*Type=*/FuncTy_3,
Logan Chien42e0e152012-01-13 15:42:36 +0800220 /*Linkage=*/GlobalValue::ExternalLinkage,
221 /*Name=*/"art_get_current_thread_from_code", mod); // (external, no body)
222func_art_get_current_thread_from_code->setCallingConv(CallingConv::C);
223}
224AttrListPtr func_art_get_current_thread_from_code_PAL;
225func_art_get_current_thread_from_code->setAttributes(func_art_get_current_thread_from_code_PAL);
226
227Function* func_art_set_current_thread_from_code = mod->getFunction("art_set_current_thread_from_code");
228if (!func_art_set_current_thread_from_code) {
229func_art_set_current_thread_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800230 /*Type=*/FuncTy_4,
Logan Chien42e0e152012-01-13 15:42:36 +0800231 /*Linkage=*/GlobalValue::ExternalLinkage,
232 /*Name=*/"art_set_current_thread_from_code", mod); // (external, no body)
233func_art_set_current_thread_from_code->setCallingConv(CallingConv::C);
234}
235AttrListPtr func_art_set_current_thread_from_code_PAL;
236func_art_set_current_thread_from_code->setAttributes(func_art_set_current_thread_from_code_PAL);
237
238Function* func_art_lock_object_from_code = mod->getFunction("art_lock_object_from_code");
239if (!func_art_lock_object_from_code) {
240func_art_lock_object_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800241 /*Type=*/FuncTy_4,
Logan Chien42e0e152012-01-13 15:42:36 +0800242 /*Linkage=*/GlobalValue::ExternalLinkage,
243 /*Name=*/"art_lock_object_from_code", mod); // (external, no body)
244func_art_lock_object_from_code->setCallingConv(CallingConv::C);
245}
246AttrListPtr func_art_lock_object_from_code_PAL;
247func_art_lock_object_from_code->setAttributes(func_art_lock_object_from_code_PAL);
248
249Function* func_art_unlock_object_from_code = mod->getFunction("art_unlock_object_from_code");
250if (!func_art_unlock_object_from_code) {
251func_art_unlock_object_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800252 /*Type=*/FuncTy_4,
Logan Chien42e0e152012-01-13 15:42:36 +0800253 /*Linkage=*/GlobalValue::ExternalLinkage,
254 /*Name=*/"art_unlock_object_from_code", mod); // (external, no body)
255func_art_unlock_object_from_code->setCallingConv(CallingConv::C);
256}
257AttrListPtr func_art_unlock_object_from_code_PAL;
258func_art_unlock_object_from_code->setAttributes(func_art_unlock_object_from_code_PAL);
259
260Function* func_art_test_suspend_from_code = mod->getFunction("art_test_suspend_from_code");
261if (!func_art_test_suspend_from_code) {
262func_art_test_suspend_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800263 /*Type=*/FuncTy_5,
Logan Chien42e0e152012-01-13 15:42:36 +0800264 /*Linkage=*/GlobalValue::ExternalLinkage,
265 /*Name=*/"art_test_suspend_from_code", mod); // (external, no body)
266func_art_test_suspend_from_code->setCallingConv(CallingConv::C);
267}
268AttrListPtr func_art_test_suspend_from_code_PAL;
269func_art_test_suspend_from_code->setAttributes(func_art_test_suspend_from_code_PAL);
270
Logan Chien3f71e702012-02-17 18:45:27 +0800271Function* func_art_push_shadow_frame_from_code = mod->getFunction("art_push_shadow_frame_from_code");
272if (!func_art_push_shadow_frame_from_code) {
273func_art_push_shadow_frame_from_code = Function::Create(
274 /*Type=*/FuncTy_6,
275 /*Linkage=*/GlobalValue::ExternalLinkage,
276 /*Name=*/"art_push_shadow_frame_from_code", mod); // (external, no body)
277func_art_push_shadow_frame_from_code->setCallingConv(CallingConv::C);
278}
279AttrListPtr func_art_push_shadow_frame_from_code_PAL;
280func_art_push_shadow_frame_from_code->setAttributes(func_art_push_shadow_frame_from_code_PAL);
281
282Function* func_art_pop_shadow_frame_from_code = mod->getFunction("art_pop_shadow_frame_from_code");
283if (!func_art_pop_shadow_frame_from_code) {
284func_art_pop_shadow_frame_from_code = Function::Create(
285 /*Type=*/FuncTy_5,
286 /*Linkage=*/GlobalValue::ExternalLinkage,
287 /*Name=*/"art_pop_shadow_frame_from_code", mod); // (external, no body)
288func_art_pop_shadow_frame_from_code->setCallingConv(CallingConv::C);
289}
290AttrListPtr func_art_pop_shadow_frame_from_code_PAL;
291func_art_pop_shadow_frame_from_code->setAttributes(func_art_pop_shadow_frame_from_code_PAL);
292
Logan Chien42e0e152012-01-13 15:42:36 +0800293Function* func_art_is_exception_pending_from_code = mod->getFunction("art_is_exception_pending_from_code");
294if (!func_art_is_exception_pending_from_code) {
295func_art_is_exception_pending_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800296 /*Type=*/FuncTy_7,
Logan Chien42e0e152012-01-13 15:42:36 +0800297 /*Linkage=*/GlobalValue::ExternalLinkage,
298 /*Name=*/"art_is_exception_pending_from_code", mod); // (external, no body)
299func_art_is_exception_pending_from_code->setCallingConv(CallingConv::C);
300}
301AttrListPtr func_art_is_exception_pending_from_code_PAL;
302func_art_is_exception_pending_from_code->setAttributes(func_art_is_exception_pending_from_code_PAL);
303
304Function* func_art_throw_div_zero_from_code = mod->getFunction("art_throw_div_zero_from_code");
305if (!func_art_throw_div_zero_from_code) {
306func_art_throw_div_zero_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800307 /*Type=*/FuncTy_5,
Logan Chien42e0e152012-01-13 15:42:36 +0800308 /*Linkage=*/GlobalValue::ExternalLinkage,
309 /*Name=*/"art_throw_div_zero_from_code", mod); // (external, no body)
310func_art_throw_div_zero_from_code->setCallingConv(CallingConv::C);
311}
312AttrListPtr func_art_throw_div_zero_from_code_PAL;
313func_art_throw_div_zero_from_code->setAttributes(func_art_throw_div_zero_from_code_PAL);
314
315Function* func_art_throw_array_bounds_from_code = mod->getFunction("art_throw_array_bounds_from_code");
316if (!func_art_throw_array_bounds_from_code) {
317func_art_throw_array_bounds_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800318 /*Type=*/FuncTy_8,
Logan Chien42e0e152012-01-13 15:42:36 +0800319 /*Linkage=*/GlobalValue::ExternalLinkage,
320 /*Name=*/"art_throw_array_bounds_from_code", mod); // (external, no body)
321func_art_throw_array_bounds_from_code->setCallingConv(CallingConv::C);
322}
323AttrListPtr func_art_throw_array_bounds_from_code_PAL;
324func_art_throw_array_bounds_from_code->setAttributes(func_art_throw_array_bounds_from_code_PAL);
325
326Function* func_art_throw_no_such_method_from_code = mod->getFunction("art_throw_no_such_method_from_code");
327if (!func_art_throw_no_such_method_from_code) {
328func_art_throw_no_such_method_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800329 /*Type=*/FuncTy_9,
Logan Chien42e0e152012-01-13 15:42:36 +0800330 /*Linkage=*/GlobalValue::ExternalLinkage,
331 /*Name=*/"art_throw_no_such_method_from_code", mod); // (external, no body)
332func_art_throw_no_such_method_from_code->setCallingConv(CallingConv::C);
333}
334AttrListPtr func_art_throw_no_such_method_from_code_PAL;
335func_art_throw_no_such_method_from_code->setAttributes(func_art_throw_no_such_method_from_code_PAL);
336
337Function* func_art_throw_null_pointer_exception_from_code = mod->getFunction("art_throw_null_pointer_exception_from_code");
338if (!func_art_throw_null_pointer_exception_from_code) {
339func_art_throw_null_pointer_exception_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800340 /*Type=*/FuncTy_5,
Logan Chien42e0e152012-01-13 15:42:36 +0800341 /*Linkage=*/GlobalValue::ExternalLinkage,
342 /*Name=*/"art_throw_null_pointer_exception_from_code", mod); // (external, no body)
343func_art_throw_null_pointer_exception_from_code->setCallingConv(CallingConv::C);
344}
345AttrListPtr func_art_throw_null_pointer_exception_from_code_PAL;
346func_art_throw_null_pointer_exception_from_code->setAttributes(func_art_throw_null_pointer_exception_from_code_PAL);
347
348Function* func_art_throw_stack_overflow_from_code = mod->getFunction("art_throw_stack_overflow_from_code");
349if (!func_art_throw_stack_overflow_from_code) {
350func_art_throw_stack_overflow_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800351 /*Type=*/FuncTy_4,
Logan Chien42e0e152012-01-13 15:42:36 +0800352 /*Linkage=*/GlobalValue::ExternalLinkage,
353 /*Name=*/"art_throw_stack_overflow_from_code", mod); // (external, no body)
354func_art_throw_stack_overflow_from_code->setCallingConv(CallingConv::C);
355}
356AttrListPtr func_art_throw_stack_overflow_from_code_PAL;
357func_art_throw_stack_overflow_from_code->setAttributes(func_art_throw_stack_overflow_from_code_PAL);
358
359Function* func_art_throw_exception_from_code = mod->getFunction("art_throw_exception_from_code");
360if (!func_art_throw_exception_from_code) {
361func_art_throw_exception_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800362 /*Type=*/FuncTy_4,
Logan Chien42e0e152012-01-13 15:42:36 +0800363 /*Linkage=*/GlobalValue::ExternalLinkage,
364 /*Name=*/"art_throw_exception_from_code", mod); // (external, no body)
365func_art_throw_exception_from_code->setCallingConv(CallingConv::C);
366}
367AttrListPtr func_art_throw_exception_from_code_PAL;
368func_art_throw_exception_from_code->setAttributes(func_art_throw_exception_from_code_PAL);
369
370Function* func_art_find_catch_block_from_code = mod->getFunction("art_find_catch_block_from_code");
371if (!func_art_find_catch_block_from_code) {
372func_art_find_catch_block_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800373 /*Type=*/FuncTy_10,
Logan Chien42e0e152012-01-13 15:42:36 +0800374 /*Linkage=*/GlobalValue::ExternalLinkage,
375 /*Name=*/"art_find_catch_block_from_code", mod); // (external, no body)
376func_art_find_catch_block_from_code->setCallingConv(CallingConv::C);
377}
378AttrListPtr func_art_find_catch_block_from_code_PAL;
379func_art_find_catch_block_from_code->setAttributes(func_art_find_catch_block_from_code_PAL);
380
381Function* func_art_alloc_object_from_code = mod->getFunction("art_alloc_object_from_code");
382if (!func_art_alloc_object_from_code) {
383func_art_alloc_object_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800384 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800385 /*Linkage=*/GlobalValue::ExternalLinkage,
386 /*Name=*/"art_alloc_object_from_code", mod); // (external, no body)
387func_art_alloc_object_from_code->setCallingConv(CallingConv::C);
388}
389AttrListPtr func_art_alloc_object_from_code_PAL;
390func_art_alloc_object_from_code->setAttributes(func_art_alloc_object_from_code_PAL);
391
392Function* func_art_alloc_object_from_code_with_access_check = mod->getFunction("art_alloc_object_from_code_with_access_check");
393if (!func_art_alloc_object_from_code_with_access_check) {
394func_art_alloc_object_from_code_with_access_check = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800395 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800396 /*Linkage=*/GlobalValue::ExternalLinkage,
397 /*Name=*/"art_alloc_object_from_code_with_access_check", mod); // (external, no body)
398func_art_alloc_object_from_code_with_access_check->setCallingConv(CallingConv::C);
399}
400AttrListPtr func_art_alloc_object_from_code_with_access_check_PAL;
401func_art_alloc_object_from_code_with_access_check->setAttributes(func_art_alloc_object_from_code_with_access_check_PAL);
402
403Function* func_art_alloc_array_from_code = mod->getFunction("art_alloc_array_from_code");
404if (!func_art_alloc_array_from_code) {
405func_art_alloc_array_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800406 /*Type=*/FuncTy_12,
Logan Chien42e0e152012-01-13 15:42:36 +0800407 /*Linkage=*/GlobalValue::ExternalLinkage,
408 /*Name=*/"art_alloc_array_from_code", mod); // (external, no body)
409func_art_alloc_array_from_code->setCallingConv(CallingConv::C);
410}
411AttrListPtr func_art_alloc_array_from_code_PAL;
412func_art_alloc_array_from_code->setAttributes(func_art_alloc_array_from_code_PAL);
413
414Function* func_art_alloc_array_from_code_with_access_check = mod->getFunction("art_alloc_array_from_code_with_access_check");
415if (!func_art_alloc_array_from_code_with_access_check) {
416func_art_alloc_array_from_code_with_access_check = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800417 /*Type=*/FuncTy_12,
Logan Chien42e0e152012-01-13 15:42:36 +0800418 /*Linkage=*/GlobalValue::ExternalLinkage,
419 /*Name=*/"art_alloc_array_from_code_with_access_check", mod); // (external, no body)
420func_art_alloc_array_from_code_with_access_check->setCallingConv(CallingConv::C);
421}
422AttrListPtr func_art_alloc_array_from_code_with_access_check_PAL;
423func_art_alloc_array_from_code_with_access_check->setAttributes(func_art_alloc_array_from_code_with_access_check_PAL);
424
425Function* func_art_check_and_alloc_array_from_code = mod->getFunction("art_check_and_alloc_array_from_code");
426if (!func_art_check_and_alloc_array_from_code) {
427func_art_check_and_alloc_array_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800428 /*Type=*/FuncTy_12,
Logan Chien42e0e152012-01-13 15:42:36 +0800429 /*Linkage=*/GlobalValue::ExternalLinkage,
430 /*Name=*/"art_check_and_alloc_array_from_code", mod); // (external, no body)
431func_art_check_and_alloc_array_from_code->setCallingConv(CallingConv::C);
432}
433AttrListPtr func_art_check_and_alloc_array_from_code_PAL;
434func_art_check_and_alloc_array_from_code->setAttributes(func_art_check_and_alloc_array_from_code_PAL);
435
436Function* func_art_check_and_alloc_array_from_code_with_access_check = mod->getFunction("art_check_and_alloc_array_from_code_with_access_check");
437if (!func_art_check_and_alloc_array_from_code_with_access_check) {
438func_art_check_and_alloc_array_from_code_with_access_check = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800439 /*Type=*/FuncTy_12,
Logan Chien42e0e152012-01-13 15:42:36 +0800440 /*Linkage=*/GlobalValue::ExternalLinkage,
441 /*Name=*/"art_check_and_alloc_array_from_code_with_access_check", mod); // (external, no body)
442func_art_check_and_alloc_array_from_code_with_access_check->setCallingConv(CallingConv::C);
443}
444AttrListPtr func_art_check_and_alloc_array_from_code_with_access_check_PAL;
445func_art_check_and_alloc_array_from_code_with_access_check->setAttributes(func_art_check_and_alloc_array_from_code_with_access_check_PAL);
446
447Function* func_art_object_init_from_code = mod->getFunction("art_object_init_from_code");
448if (!func_art_object_init_from_code) {
449func_art_object_init_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800450 /*Type=*/FuncTy_4,
Logan Chien42e0e152012-01-13 15:42:36 +0800451 /*Linkage=*/GlobalValue::ExternalLinkage,
452 /*Name=*/"art_object_init_from_code", mod); // (external, no body)
453func_art_object_init_from_code->setCallingConv(CallingConv::C);
454}
455AttrListPtr func_art_object_init_from_code_PAL;
456func_art_object_init_from_code->setAttributes(func_art_object_init_from_code_PAL);
457
458Function* func_art_find_instance_field_from_code = mod->getFunction("art_find_instance_field_from_code");
459if (!func_art_find_instance_field_from_code) {
460func_art_find_instance_field_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800461 /*Type=*/FuncTy_13,
Logan Chien42e0e152012-01-13 15:42:36 +0800462 /*Linkage=*/GlobalValue::ExternalLinkage,
463 /*Name=*/"art_find_instance_field_from_code", mod); // (external, no body)
464func_art_find_instance_field_from_code->setCallingConv(CallingConv::C);
465}
466AttrListPtr func_art_find_instance_field_from_code_PAL;
467func_art_find_instance_field_from_code->setAttributes(func_art_find_instance_field_from_code_PAL);
468
469Function* func_art_find_static_field_from_code = mod->getFunction("art_find_static_field_from_code");
470if (!func_art_find_static_field_from_code) {
471func_art_find_static_field_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800472 /*Type=*/FuncTy_13,
Logan Chien42e0e152012-01-13 15:42:36 +0800473 /*Linkage=*/GlobalValue::ExternalLinkage,
474 /*Name=*/"art_find_static_field_from_code", mod); // (external, no body)
475func_art_find_static_field_from_code->setCallingConv(CallingConv::C);
476}
477AttrListPtr func_art_find_static_field_from_code_PAL;
478func_art_find_static_field_from_code->setAttributes(func_art_find_static_field_from_code_PAL);
479
480Function* func_art_find_interface_method_from_code = mod->getFunction("art_find_interface_method_from_code");
481if (!func_art_find_interface_method_from_code) {
482func_art_find_interface_method_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800483 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800484 /*Linkage=*/GlobalValue::ExternalLinkage,
485 /*Name=*/"art_find_interface_method_from_code", mod); // (external, no body)
486func_art_find_interface_method_from_code->setCallingConv(CallingConv::C);
487}
488AttrListPtr func_art_find_interface_method_from_code_PAL;
489func_art_find_interface_method_from_code->setAttributes(func_art_find_interface_method_from_code_PAL);
490
491Function* func_art_initialize_static_storage_from_code = mod->getFunction("art_initialize_static_storage_from_code");
492if (!func_art_initialize_static_storage_from_code) {
493func_art_initialize_static_storage_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800494 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800495 /*Linkage=*/GlobalValue::ExternalLinkage,
496 /*Name=*/"art_initialize_static_storage_from_code", mod); // (external, no body)
497func_art_initialize_static_storage_from_code->setCallingConv(CallingConv::C);
498}
499AttrListPtr func_art_initialize_static_storage_from_code_PAL;
500func_art_initialize_static_storage_from_code->setAttributes(func_art_initialize_static_storage_from_code_PAL);
501
502Function* func_art_initialize_type_from_code = mod->getFunction("art_initialize_type_from_code");
503if (!func_art_initialize_type_from_code) {
504func_art_initialize_type_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800505 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800506 /*Linkage=*/GlobalValue::ExternalLinkage,
507 /*Name=*/"art_initialize_type_from_code", mod); // (external, no body)
508func_art_initialize_type_from_code->setCallingConv(CallingConv::C);
509}
510AttrListPtr func_art_initialize_type_from_code_PAL;
511func_art_initialize_type_from_code->setAttributes(func_art_initialize_type_from_code_PAL);
512
513Function* func_art_initialize_type_and_verify_access_from_code = mod->getFunction("art_initialize_type_and_verify_access_from_code");
514if (!func_art_initialize_type_and_verify_access_from_code) {
515func_art_initialize_type_and_verify_access_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800516 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800517 /*Linkage=*/GlobalValue::ExternalLinkage,
518 /*Name=*/"art_initialize_type_and_verify_access_from_code", mod); // (external, no body)
519func_art_initialize_type_and_verify_access_from_code->setCallingConv(CallingConv::C);
520}
521AttrListPtr func_art_initialize_type_and_verify_access_from_code_PAL;
522func_art_initialize_type_and_verify_access_from_code->setAttributes(func_art_initialize_type_and_verify_access_from_code_PAL);
523
524Function* func_art_resolve_string_from_code = mod->getFunction("art_resolve_string_from_code");
525if (!func_art_resolve_string_from_code) {
526func_art_resolve_string_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800527 /*Type=*/FuncTy_14,
Logan Chien42e0e152012-01-13 15:42:36 +0800528 /*Linkage=*/GlobalValue::ExternalLinkage,
529 /*Name=*/"art_resolve_string_from_code", mod); // (external, no body)
530func_art_resolve_string_from_code->setCallingConv(CallingConv::C);
531}
532AttrListPtr func_art_resolve_string_from_code_PAL;
533func_art_resolve_string_from_code->setAttributes(func_art_resolve_string_from_code_PAL);
534
535Function* func_art_resolve_method_from_code = mod->getFunction("art_resolve_method_from_code");
536if (!func_art_resolve_method_from_code) {
537func_art_resolve_method_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800538 /*Type=*/FuncTy_15,
Logan Chien42e0e152012-01-13 15:42:36 +0800539 /*Linkage=*/GlobalValue::ExternalLinkage,
540 /*Name=*/"art_resolve_method_from_code", mod); // (external, no body)
541func_art_resolve_method_from_code->setCallingConv(CallingConv::C);
542}
543AttrListPtr func_art_resolve_method_from_code_PAL;
544func_art_resolve_method_from_code->setAttributes(func_art_resolve_method_from_code_PAL);
545
546Function* func_art_set32_static_from_code = mod->getFunction("art_set32_static_from_code");
547if (!func_art_set32_static_from_code) {
548func_art_set32_static_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800549 /*Type=*/FuncTy_16,
Logan Chien42e0e152012-01-13 15:42:36 +0800550 /*Linkage=*/GlobalValue::ExternalLinkage,
551 /*Name=*/"art_set32_static_from_code", mod); // (external, no body)
552func_art_set32_static_from_code->setCallingConv(CallingConv::C);
553}
554AttrListPtr func_art_set32_static_from_code_PAL;
555func_art_set32_static_from_code->setAttributes(func_art_set32_static_from_code_PAL);
556
557Function* func_art_set64_static_from_code = mod->getFunction("art_set64_static_from_code");
558if (!func_art_set64_static_from_code) {
559func_art_set64_static_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800560 /*Type=*/FuncTy_17,
Logan Chien42e0e152012-01-13 15:42:36 +0800561 /*Linkage=*/GlobalValue::ExternalLinkage,
562 /*Name=*/"art_set64_static_from_code", mod); // (external, no body)
563func_art_set64_static_from_code->setCallingConv(CallingConv::C);
564}
565AttrListPtr func_art_set64_static_from_code_PAL;
566func_art_set64_static_from_code->setAttributes(func_art_set64_static_from_code_PAL);
567
568Function* func_art_set_obj_static_from_code = mod->getFunction("art_set_obj_static_from_code");
569if (!func_art_set_obj_static_from_code) {
570func_art_set_obj_static_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800571 /*Type=*/FuncTy_18,
Logan Chien42e0e152012-01-13 15:42:36 +0800572 /*Linkage=*/GlobalValue::ExternalLinkage,
573 /*Name=*/"art_set_obj_static_from_code", mod); // (external, no body)
574func_art_set_obj_static_from_code->setCallingConv(CallingConv::C);
575}
576AttrListPtr func_art_set_obj_static_from_code_PAL;
577func_art_set_obj_static_from_code->setAttributes(func_art_set_obj_static_from_code_PAL);
578
579Function* func_art_get32_static_from_code = mod->getFunction("art_get32_static_from_code");
580if (!func_art_get32_static_from_code) {
581func_art_get32_static_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800582 /*Type=*/FuncTy_19,
Logan Chien42e0e152012-01-13 15:42:36 +0800583 /*Linkage=*/GlobalValue::ExternalLinkage,
584 /*Name=*/"art_get32_static_from_code", mod); // (external, no body)
585func_art_get32_static_from_code->setCallingConv(CallingConv::C);
586}
587AttrListPtr func_art_get32_static_from_code_PAL;
588func_art_get32_static_from_code->setAttributes(func_art_get32_static_from_code_PAL);
589
590Function* func_art_get64_static_from_code = mod->getFunction("art_get64_static_from_code");
591if (!func_art_get64_static_from_code) {
592func_art_get64_static_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800593 /*Type=*/FuncTy_20,
Logan Chien42e0e152012-01-13 15:42:36 +0800594 /*Linkage=*/GlobalValue::ExternalLinkage,
595 /*Name=*/"art_get64_static_from_code", mod); // (external, no body)
596func_art_get64_static_from_code->setCallingConv(CallingConv::C);
597}
598AttrListPtr func_art_get64_static_from_code_PAL;
599func_art_get64_static_from_code->setAttributes(func_art_get64_static_from_code_PAL);
600
601Function* func_art_get_obj_static_from_code = mod->getFunction("art_get_obj_static_from_code");
602if (!func_art_get_obj_static_from_code) {
603func_art_get_obj_static_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800604 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800605 /*Linkage=*/GlobalValue::ExternalLinkage,
606 /*Name=*/"art_get_obj_static_from_code", mod); // (external, no body)
607func_art_get_obj_static_from_code->setCallingConv(CallingConv::C);
608}
609AttrListPtr func_art_get_obj_static_from_code_PAL;
610func_art_get_obj_static_from_code->setAttributes(func_art_get_obj_static_from_code_PAL);
611
612Function* func_art_set32_instance_from_code = mod->getFunction("art_set32_instance_from_code");
613if (!func_art_set32_instance_from_code) {
614func_art_set32_instance_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800615 /*Type=*/FuncTy_16,
Logan Chien42e0e152012-01-13 15:42:36 +0800616 /*Linkage=*/GlobalValue::ExternalLinkage,
617 /*Name=*/"art_set32_instance_from_code", mod); // (external, no body)
618func_art_set32_instance_from_code->setCallingConv(CallingConv::C);
619}
620AttrListPtr func_art_set32_instance_from_code_PAL;
621func_art_set32_instance_from_code->setAttributes(func_art_set32_instance_from_code_PAL);
622
623Function* func_art_set64_instance_from_code = mod->getFunction("art_set64_instance_from_code");
624if (!func_art_set64_instance_from_code) {
625func_art_set64_instance_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800626 /*Type=*/FuncTy_17,
Logan Chien42e0e152012-01-13 15:42:36 +0800627 /*Linkage=*/GlobalValue::ExternalLinkage,
628 /*Name=*/"art_set64_instance_from_code", mod); // (external, no body)
629func_art_set64_instance_from_code->setCallingConv(CallingConv::C);
630}
631AttrListPtr func_art_set64_instance_from_code_PAL;
632func_art_set64_instance_from_code->setAttributes(func_art_set64_instance_from_code_PAL);
633
634Function* func_art_set_obj_instance_from_code = mod->getFunction("art_set_obj_instance_from_code");
635if (!func_art_set_obj_instance_from_code) {
636func_art_set_obj_instance_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800637 /*Type=*/FuncTy_18,
Logan Chien42e0e152012-01-13 15:42:36 +0800638 /*Linkage=*/GlobalValue::ExternalLinkage,
639 /*Name=*/"art_set_obj_instance_from_code", mod); // (external, no body)
640func_art_set_obj_instance_from_code->setCallingConv(CallingConv::C);
641}
642AttrListPtr func_art_set_obj_instance_from_code_PAL;
643func_art_set_obj_instance_from_code->setAttributes(func_art_set_obj_instance_from_code_PAL);
644
645Function* func_art_get32_instance_from_code = mod->getFunction("art_get32_instance_from_code");
646if (!func_art_get32_instance_from_code) {
647func_art_get32_instance_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800648 /*Type=*/FuncTy_19,
Logan Chien42e0e152012-01-13 15:42:36 +0800649 /*Linkage=*/GlobalValue::ExternalLinkage,
650 /*Name=*/"art_get32_instance_from_code", mod); // (external, no body)
651func_art_get32_instance_from_code->setCallingConv(CallingConv::C);
652}
653AttrListPtr func_art_get32_instance_from_code_PAL;
654func_art_get32_instance_from_code->setAttributes(func_art_get32_instance_from_code_PAL);
655
656Function* func_art_get64_instance_from_code = mod->getFunction("art_get64_instance_from_code");
657if (!func_art_get64_instance_from_code) {
658func_art_get64_instance_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800659 /*Type=*/FuncTy_20,
Logan Chien42e0e152012-01-13 15:42:36 +0800660 /*Linkage=*/GlobalValue::ExternalLinkage,
661 /*Name=*/"art_get64_instance_from_code", mod); // (external, no body)
662func_art_get64_instance_from_code->setCallingConv(CallingConv::C);
663}
664AttrListPtr func_art_get64_instance_from_code_PAL;
665func_art_get64_instance_from_code->setAttributes(func_art_get64_instance_from_code_PAL);
666
667Function* func_art_get_obj_instance_from_code = mod->getFunction("art_get_obj_instance_from_code");
668if (!func_art_get_obj_instance_from_code) {
669func_art_get_obj_instance_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800670 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800671 /*Linkage=*/GlobalValue::ExternalLinkage,
672 /*Name=*/"art_get_obj_instance_from_code", mod); // (external, no body)
673func_art_get_obj_instance_from_code->setCallingConv(CallingConv::C);
674}
675AttrListPtr func_art_get_obj_instance_from_code_PAL;
676func_art_get_obj_instance_from_code->setAttributes(func_art_get_obj_instance_from_code_PAL);
677
678Function* func_art_is_assignable_from_code = mod->getFunction("art_is_assignable_from_code");
679if (!func_art_is_assignable_from_code) {
680func_art_is_assignable_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800681 /*Type=*/FuncTy_21,
Logan Chien42e0e152012-01-13 15:42:36 +0800682 /*Linkage=*/GlobalValue::ExternalLinkage,
683 /*Name=*/"art_is_assignable_from_code", mod); // (external, no body)
684func_art_is_assignable_from_code->setCallingConv(CallingConv::C);
685}
686AttrListPtr func_art_is_assignable_from_code_PAL;
687func_art_is_assignable_from_code->setAttributes(func_art_is_assignable_from_code_PAL);
688
689Function* func_art_check_cast_from_code = mod->getFunction("art_check_cast_from_code");
690if (!func_art_check_cast_from_code) {
691func_art_check_cast_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800692 /*Type=*/FuncTy_22,
Logan Chien42e0e152012-01-13 15:42:36 +0800693 /*Linkage=*/GlobalValue::ExternalLinkage,
694 /*Name=*/"art_check_cast_from_code", mod); // (external, no body)
695func_art_check_cast_from_code->setCallingConv(CallingConv::C);
696}
697AttrListPtr func_art_check_cast_from_code_PAL;
698func_art_check_cast_from_code->setAttributes(func_art_check_cast_from_code_PAL);
699
700// Global Variable Declarations
701
702
703// Constant Definitions
704
705// Global Variable Definitions
706
707// Function Definitions
708
709return mod;
710
711}