blob: 6676e02125abaadd4c68e3ce384658a87ccd515f [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 Chien1b0a1b72012-03-15 06:20:17 +080042StructType *StructTy_ShadowFrame = mod->getTypeByName("ShadowFrame");
43if (!StructTy_ShadowFrame) {
44StructTy_ShadowFrame = StructType::create(mod->getContext(), "ShadowFrame");
Logan Chien3f71e702012-02-17 18:45:27 +080045}
Logan Chien1b0a1b72012-03-15 06:20:17 +080046std::vector<Type*>StructTy_ShadowFrame_fields;
47PointerType* PointerTy_2 = PointerType::get(StructTy_ShadowFrame, 0);
Logan Chien3f71e702012-02-17 18:45:27 +080048
Logan Chien1b0a1b72012-03-15 06:20:17 +080049StructTy_ShadowFrame_fields.push_back(PointerTy_2);
50StructTy_ShadowFrame_fields.push_back(PointerTy_1);
51StructTy_ShadowFrame_fields.push_back(IntegerType::get(mod->getContext(), 32));
TDYa12785321912012-04-01 15:24:56 -070052StructTy_ShadowFrame_fields.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien1b0a1b72012-03-15 06:20:17 +080053if (StructTy_ShadowFrame->isOpaque()) {
54StructTy_ShadowFrame->setBody(StructTy_ShadowFrame_fields, /*isPacked=*/false);
Logan Chien3f71e702012-02-17 18:45:27 +080055}
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 Chien3f71e702012-02-17 18:45:27 +0800145FuncTy_14_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien1b0a1b72012-03-15 06:20:17 +0800146FuncTy_14_args.push_back(PointerTy_1);
147FuncTy_14_args.push_back(PointerTy_1);
Logan Chien42e0e152012-01-13 15:42:36 +0800148FunctionType* FuncTy_14 = FunctionType::get(
Logan Chien3f71e702012-02-17 18:45:27 +0800149 /*Result=*/PointerTy_1,
Logan Chien42e0e152012-01-13 15:42:36 +0800150 /*Params=*/FuncTy_14_args,
151 /*isVarArg=*/false);
152
153std::vector<Type*>FuncTy_15_args;
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 Chien1b0a1b72012-03-15 06:20:17 +0800157 /*Result=*/PointerTy_1,
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 Chien1b0a1b72012-03-15 06:20:17 +0800164FuncTy_16_args.push_back(IntegerType::get(mod->getContext(), 32));
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 Chien1b0a1b72012-03-15 06:20:17 +0800173FuncTy_17_args.push_back(IntegerType::get(mod->getContext(), 64));
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 Chien1b0a1b72012-03-15 06:20:17 +0800182FuncTy_18_args.push_back(PointerTy_1);
Logan Chien42e0e152012-01-13 15:42:36 +0800183FunctionType* FuncTy_18 = FunctionType::get(
184 /*Result=*/IntegerType::get(mod->getContext(), 32),
185 /*Params=*/FuncTy_18_args,
186 /*isVarArg=*/false);
187
188std::vector<Type*>FuncTy_19_args;
Logan Chien3f71e702012-02-17 18:45:27 +0800189FuncTy_19_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien42e0e152012-01-13 15:42:36 +0800190FuncTy_19_args.push_back(PointerTy_1);
191FunctionType* FuncTy_19 = FunctionType::get(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800192 /*Result=*/IntegerType::get(mod->getContext(), 32),
Logan Chien42e0e152012-01-13 15:42:36 +0800193 /*Params=*/FuncTy_19_args,
194 /*isVarArg=*/false);
195
Logan Chien3f71e702012-02-17 18:45:27 +0800196std::vector<Type*>FuncTy_20_args;
Logan Chien3b2b2e72012-03-06 16:11:45 +0800197FuncTy_20_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chiena6b2ca62012-03-06 15:50:54 +0800198FuncTy_20_args.push_back(PointerTy_1);
Logan Chien3f71e702012-02-17 18:45:27 +0800199FunctionType* FuncTy_20 = FunctionType::get(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800200 /*Result=*/IntegerType::get(mod->getContext(), 64),
Logan Chien3f71e702012-02-17 18:45:27 +0800201 /*Params=*/FuncTy_20_args,
202 /*isVarArg=*/false);
203
204std::vector<Type*>FuncTy_21_args;
Logan Chien3b2b2e72012-03-06 16:11:45 +0800205FuncTy_21_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien3f71e702012-02-17 18:45:27 +0800206FuncTy_21_args.push_back(PointerTy_1);
207FuncTy_21_args.push_back(PointerTy_1);
Logan Chien1b0a1b72012-03-15 06:20:17 +0800208FuncTy_21_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien3f71e702012-02-17 18:45:27 +0800209FunctionType* FuncTy_21 = FunctionType::get(
Logan Chien3b2b2e72012-03-06 16:11:45 +0800210 /*Result=*/IntegerType::get(mod->getContext(), 32),
Logan Chiena6b2ca62012-03-06 15:50:54 +0800211 /*Params=*/FuncTy_21_args,
Logan Chien3f71e702012-02-17 18:45:27 +0800212 /*isVarArg=*/false);
213
Logan Chien3b2b2e72012-03-06 16:11:45 +0800214std::vector<Type*>FuncTy_22_args;
215FuncTy_22_args.push_back(IntegerType::get(mod->getContext(), 32));
216FuncTy_22_args.push_back(PointerTy_1);
217FuncTy_22_args.push_back(PointerTy_1);
Logan Chien1b0a1b72012-03-15 06:20:17 +0800218FuncTy_22_args.push_back(IntegerType::get(mod->getContext(), 64));
Logan Chien3b2b2e72012-03-06 16:11:45 +0800219FunctionType* FuncTy_22 = FunctionType::get(
220 /*Result=*/IntegerType::get(mod->getContext(), 32),
221 /*Params=*/FuncTy_22_args,
222 /*isVarArg=*/false);
223
224std::vector<Type*>FuncTy_23_args;
225FuncTy_23_args.push_back(IntegerType::get(mod->getContext(), 32));
226FuncTy_23_args.push_back(PointerTy_1);
227FuncTy_23_args.push_back(PointerTy_1);
Logan Chien1b0a1b72012-03-15 06:20:17 +0800228FuncTy_23_args.push_back(PointerTy_1);
Logan Chien3b2b2e72012-03-06 16:11:45 +0800229FunctionType* FuncTy_23 = FunctionType::get(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800230 /*Result=*/IntegerType::get(mod->getContext(), 32),
Logan Chien3b2b2e72012-03-06 16:11:45 +0800231 /*Params=*/FuncTy_23_args,
232 /*isVarArg=*/false);
233
234std::vector<Type*>FuncTy_24_args;
235FuncTy_24_args.push_back(IntegerType::get(mod->getContext(), 32));
236FuncTy_24_args.push_back(PointerTy_1);
237FuncTy_24_args.push_back(PointerTy_1);
238FunctionType* FuncTy_24 = FunctionType::get(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800239 /*Result=*/IntegerType::get(mod->getContext(), 64),
Logan Chien3b2b2e72012-03-06 16:11:45 +0800240 /*Params=*/FuncTy_24_args,
241 /*isVarArg=*/false);
242
243std::vector<Type*>FuncTy_25_args;
244FuncTy_25_args.push_back(PointerTy_1);
245FuncTy_25_args.push_back(PointerTy_1);
246FunctionType* FuncTy_25 = FunctionType::get(
TDYa12785321912012-04-01 15:24:56 -0700247 /*Result=*/PointerTy_1,
Logan Chien3b2b2e72012-03-06 16:11:45 +0800248 /*Params=*/FuncTy_25_args,
249 /*isVarArg=*/false);
250
251std::vector<Type*>FuncTy_26_args;
252FuncTy_26_args.push_back(PointerTy_1);
253FuncTy_26_args.push_back(PointerTy_1);
254FunctionType* FuncTy_26 = FunctionType::get(
TDYa12785321912012-04-01 15:24:56 -0700255 /*Result=*/IntegerType::get(mod->getContext(), 32),
Logan Chien3b2b2e72012-03-06 16:11:45 +0800256 /*Params=*/FuncTy_26_args,
257 /*isVarArg=*/false);
258
TDYa12728f1a142012-03-15 21:51:52 -0700259std::vector<Type*>FuncTy_27_args;
260FuncTy_27_args.push_back(PointerTy_1);
261FuncTy_27_args.push_back(PointerTy_1);
262FunctionType* FuncTy_27 = FunctionType::get(
TDYa12785321912012-04-01 15:24:56 -0700263 /*Result=*/Type::getVoidTy(mod->getContext()),
TDYa12728f1a142012-03-15 21:51:52 -0700264 /*Params=*/FuncTy_27_args,
265 /*isVarArg=*/false);
266
TDYa12785321912012-04-01 15:24:56 -0700267std::vector<Type*>FuncTy_28_args;
268FuncTy_28_args.push_back(PointerTy_1);
269FuncTy_28_args.push_back(PointerTy_1);
270FuncTy_28_args.push_back(IntegerType::get(mod->getContext(), 32));
TDYa1270b686e52012-04-09 22:43:35 -0700271FuncTy_28_args.push_back(IntegerType::get(mod->getContext(), 1));
TDYa12785321912012-04-01 15:24:56 -0700272FunctionType* FuncTy_28 = FunctionType::get(
273 /*Result=*/PointerTy_1,
274 /*Params=*/FuncTy_28_args,
275 /*isVarArg=*/false);
276
TDYa1270b686e52012-04-09 22:43:35 -0700277std::vector<Type*>FuncTy_29_args;
278FuncTy_29_args.push_back(PointerTy_1);
279FunctionType* FuncTy_29 = FunctionType::get(
280 /*Result=*/PointerTy_1,
281 /*Params=*/FuncTy_29_args,
282 /*isVarArg=*/false);
283
Logan Chien42e0e152012-01-13 15:42:36 +0800284
285// Function Declarations
286
287Function* func___art_type_list = mod->getFunction("__art_type_list");
288if (!func___art_type_list) {
289func___art_type_list = Function::Create(
290 /*Type=*/FuncTy_0,
291 /*Linkage=*/GlobalValue::ExternalLinkage,
292 /*Name=*/"__art_type_list", mod); // (external, no body)
293func___art_type_list->setCallingConv(CallingConv::C);
294}
295AttrListPtr func___art_type_list_PAL;
296func___art_type_list->setAttributes(func___art_type_list_PAL);
297
298Function* func_art_get_current_thread_from_code = mod->getFunction("art_get_current_thread_from_code");
299if (!func_art_get_current_thread_from_code) {
300func_art_get_current_thread_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800301 /*Type=*/FuncTy_3,
Logan Chien42e0e152012-01-13 15:42:36 +0800302 /*Linkage=*/GlobalValue::ExternalLinkage,
303 /*Name=*/"art_get_current_thread_from_code", mod); // (external, no body)
304func_art_get_current_thread_from_code->setCallingConv(CallingConv::C);
305}
306AttrListPtr func_art_get_current_thread_from_code_PAL;
307func_art_get_current_thread_from_code->setAttributes(func_art_get_current_thread_from_code_PAL);
308
309Function* func_art_set_current_thread_from_code = mod->getFunction("art_set_current_thread_from_code");
310if (!func_art_set_current_thread_from_code) {
311func_art_set_current_thread_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800312 /*Type=*/FuncTy_4,
Logan Chien42e0e152012-01-13 15:42:36 +0800313 /*Linkage=*/GlobalValue::ExternalLinkage,
314 /*Name=*/"art_set_current_thread_from_code", mod); // (external, no body)
315func_art_set_current_thread_from_code->setCallingConv(CallingConv::C);
316}
317AttrListPtr func_art_set_current_thread_from_code_PAL;
318func_art_set_current_thread_from_code->setAttributes(func_art_set_current_thread_from_code_PAL);
319
320Function* func_art_lock_object_from_code = mod->getFunction("art_lock_object_from_code");
321if (!func_art_lock_object_from_code) {
322func_art_lock_object_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800323 /*Type=*/FuncTy_4,
Logan Chien42e0e152012-01-13 15:42:36 +0800324 /*Linkage=*/GlobalValue::ExternalLinkage,
325 /*Name=*/"art_lock_object_from_code", mod); // (external, no body)
326func_art_lock_object_from_code->setCallingConv(CallingConv::C);
327}
328AttrListPtr func_art_lock_object_from_code_PAL;
329func_art_lock_object_from_code->setAttributes(func_art_lock_object_from_code_PAL);
330
331Function* func_art_unlock_object_from_code = mod->getFunction("art_unlock_object_from_code");
332if (!func_art_unlock_object_from_code) {
333func_art_unlock_object_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800334 /*Type=*/FuncTy_4,
Logan Chien42e0e152012-01-13 15:42:36 +0800335 /*Linkage=*/GlobalValue::ExternalLinkage,
336 /*Name=*/"art_unlock_object_from_code", mod); // (external, no body)
337func_art_unlock_object_from_code->setCallingConv(CallingConv::C);
338}
339AttrListPtr func_art_unlock_object_from_code_PAL;
340func_art_unlock_object_from_code->setAttributes(func_art_unlock_object_from_code_PAL);
341
342Function* func_art_test_suspend_from_code = mod->getFunction("art_test_suspend_from_code");
343if (!func_art_test_suspend_from_code) {
344func_art_test_suspend_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800345 /*Type=*/FuncTy_5,
Logan Chien42e0e152012-01-13 15:42:36 +0800346 /*Linkage=*/GlobalValue::ExternalLinkage,
347 /*Name=*/"art_test_suspend_from_code", mod); // (external, no body)
348func_art_test_suspend_from_code->setCallingConv(CallingConv::C);
349}
350AttrListPtr func_art_test_suspend_from_code_PAL;
351func_art_test_suspend_from_code->setAttributes(func_art_test_suspend_from_code_PAL);
352
Logan Chien3f71e702012-02-17 18:45:27 +0800353Function* func_art_push_shadow_frame_from_code = mod->getFunction("art_push_shadow_frame_from_code");
354if (!func_art_push_shadow_frame_from_code) {
355func_art_push_shadow_frame_from_code = Function::Create(
356 /*Type=*/FuncTy_6,
357 /*Linkage=*/GlobalValue::ExternalLinkage,
358 /*Name=*/"art_push_shadow_frame_from_code", mod); // (external, no body)
359func_art_push_shadow_frame_from_code->setCallingConv(CallingConv::C);
360}
361AttrListPtr func_art_push_shadow_frame_from_code_PAL;
362func_art_push_shadow_frame_from_code->setAttributes(func_art_push_shadow_frame_from_code_PAL);
363
364Function* func_art_pop_shadow_frame_from_code = mod->getFunction("art_pop_shadow_frame_from_code");
365if (!func_art_pop_shadow_frame_from_code) {
366func_art_pop_shadow_frame_from_code = Function::Create(
367 /*Type=*/FuncTy_5,
368 /*Linkage=*/GlobalValue::ExternalLinkage,
369 /*Name=*/"art_pop_shadow_frame_from_code", mod); // (external, no body)
370func_art_pop_shadow_frame_from_code->setCallingConv(CallingConv::C);
371}
372AttrListPtr func_art_pop_shadow_frame_from_code_PAL;
373func_art_pop_shadow_frame_from_code->setAttributes(func_art_pop_shadow_frame_from_code_PAL);
374
Logan Chien42e0e152012-01-13 15:42:36 +0800375Function* func_art_is_exception_pending_from_code = mod->getFunction("art_is_exception_pending_from_code");
376if (!func_art_is_exception_pending_from_code) {
377func_art_is_exception_pending_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800378 /*Type=*/FuncTy_7,
Logan Chien42e0e152012-01-13 15:42:36 +0800379 /*Linkage=*/GlobalValue::ExternalLinkage,
380 /*Name=*/"art_is_exception_pending_from_code", mod); // (external, no body)
381func_art_is_exception_pending_from_code->setCallingConv(CallingConv::C);
382}
383AttrListPtr func_art_is_exception_pending_from_code_PAL;
384func_art_is_exception_pending_from_code->setAttributes(func_art_is_exception_pending_from_code_PAL);
385
386Function* func_art_throw_div_zero_from_code = mod->getFunction("art_throw_div_zero_from_code");
387if (!func_art_throw_div_zero_from_code) {
388func_art_throw_div_zero_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800389 /*Type=*/FuncTy_5,
Logan Chien42e0e152012-01-13 15:42:36 +0800390 /*Linkage=*/GlobalValue::ExternalLinkage,
391 /*Name=*/"art_throw_div_zero_from_code", mod); // (external, no body)
392func_art_throw_div_zero_from_code->setCallingConv(CallingConv::C);
393}
394AttrListPtr func_art_throw_div_zero_from_code_PAL;
395func_art_throw_div_zero_from_code->setAttributes(func_art_throw_div_zero_from_code_PAL);
396
397Function* func_art_throw_array_bounds_from_code = mod->getFunction("art_throw_array_bounds_from_code");
398if (!func_art_throw_array_bounds_from_code) {
399func_art_throw_array_bounds_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800400 /*Type=*/FuncTy_8,
Logan Chien42e0e152012-01-13 15:42:36 +0800401 /*Linkage=*/GlobalValue::ExternalLinkage,
402 /*Name=*/"art_throw_array_bounds_from_code", mod); // (external, no body)
403func_art_throw_array_bounds_from_code->setCallingConv(CallingConv::C);
404}
405AttrListPtr func_art_throw_array_bounds_from_code_PAL;
406func_art_throw_array_bounds_from_code->setAttributes(func_art_throw_array_bounds_from_code_PAL);
407
408Function* func_art_throw_no_such_method_from_code = mod->getFunction("art_throw_no_such_method_from_code");
409if (!func_art_throw_no_such_method_from_code) {
410func_art_throw_no_such_method_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800411 /*Type=*/FuncTy_9,
Logan Chien42e0e152012-01-13 15:42:36 +0800412 /*Linkage=*/GlobalValue::ExternalLinkage,
413 /*Name=*/"art_throw_no_such_method_from_code", mod); // (external, no body)
414func_art_throw_no_such_method_from_code->setCallingConv(CallingConv::C);
415}
416AttrListPtr func_art_throw_no_such_method_from_code_PAL;
417func_art_throw_no_such_method_from_code->setAttributes(func_art_throw_no_such_method_from_code_PAL);
418
419Function* func_art_throw_null_pointer_exception_from_code = mod->getFunction("art_throw_null_pointer_exception_from_code");
420if (!func_art_throw_null_pointer_exception_from_code) {
421func_art_throw_null_pointer_exception_from_code = Function::Create(
TDYa1273f9137d2012-04-08 15:59:19 -0700422 /*Type=*/FuncTy_9,
Logan Chien42e0e152012-01-13 15:42:36 +0800423 /*Linkage=*/GlobalValue::ExternalLinkage,
424 /*Name=*/"art_throw_null_pointer_exception_from_code", mod); // (external, no body)
425func_art_throw_null_pointer_exception_from_code->setCallingConv(CallingConv::C);
426}
427AttrListPtr func_art_throw_null_pointer_exception_from_code_PAL;
428func_art_throw_null_pointer_exception_from_code->setAttributes(func_art_throw_null_pointer_exception_from_code_PAL);
429
430Function* func_art_throw_stack_overflow_from_code = mod->getFunction("art_throw_stack_overflow_from_code");
431if (!func_art_throw_stack_overflow_from_code) {
432func_art_throw_stack_overflow_from_code = Function::Create(
TDYa1274165a832012-04-03 17:47:16 -0700433 /*Type=*/FuncTy_5,
Logan Chien42e0e152012-01-13 15:42:36 +0800434 /*Linkage=*/GlobalValue::ExternalLinkage,
435 /*Name=*/"art_throw_stack_overflow_from_code", mod); // (external, no body)
436func_art_throw_stack_overflow_from_code->setCallingConv(CallingConv::C);
437}
438AttrListPtr func_art_throw_stack_overflow_from_code_PAL;
439func_art_throw_stack_overflow_from_code->setAttributes(func_art_throw_stack_overflow_from_code_PAL);
440
441Function* func_art_throw_exception_from_code = mod->getFunction("art_throw_exception_from_code");
442if (!func_art_throw_exception_from_code) {
443func_art_throw_exception_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800444 /*Type=*/FuncTy_4,
Logan Chien42e0e152012-01-13 15:42:36 +0800445 /*Linkage=*/GlobalValue::ExternalLinkage,
446 /*Name=*/"art_throw_exception_from_code", mod); // (external, no body)
447func_art_throw_exception_from_code->setCallingConv(CallingConv::C);
448}
449AttrListPtr func_art_throw_exception_from_code_PAL;
450func_art_throw_exception_from_code->setAttributes(func_art_throw_exception_from_code_PAL);
451
452Function* func_art_find_catch_block_from_code = mod->getFunction("art_find_catch_block_from_code");
453if (!func_art_find_catch_block_from_code) {
454func_art_find_catch_block_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800455 /*Type=*/FuncTy_10,
Logan Chien42e0e152012-01-13 15:42:36 +0800456 /*Linkage=*/GlobalValue::ExternalLinkage,
457 /*Name=*/"art_find_catch_block_from_code", mod); // (external, no body)
458func_art_find_catch_block_from_code->setCallingConv(CallingConv::C);
459}
460AttrListPtr func_art_find_catch_block_from_code_PAL;
461func_art_find_catch_block_from_code->setAttributes(func_art_find_catch_block_from_code_PAL);
462
463Function* func_art_alloc_object_from_code = mod->getFunction("art_alloc_object_from_code");
464if (!func_art_alloc_object_from_code) {
465func_art_alloc_object_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800466 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800467 /*Linkage=*/GlobalValue::ExternalLinkage,
468 /*Name=*/"art_alloc_object_from_code", mod); // (external, no body)
469func_art_alloc_object_from_code->setCallingConv(CallingConv::C);
470}
471AttrListPtr func_art_alloc_object_from_code_PAL;
472func_art_alloc_object_from_code->setAttributes(func_art_alloc_object_from_code_PAL);
473
474Function* func_art_alloc_object_from_code_with_access_check = mod->getFunction("art_alloc_object_from_code_with_access_check");
475if (!func_art_alloc_object_from_code_with_access_check) {
476func_art_alloc_object_from_code_with_access_check = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800477 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800478 /*Linkage=*/GlobalValue::ExternalLinkage,
479 /*Name=*/"art_alloc_object_from_code_with_access_check", mod); // (external, no body)
480func_art_alloc_object_from_code_with_access_check->setCallingConv(CallingConv::C);
481}
482AttrListPtr func_art_alloc_object_from_code_with_access_check_PAL;
483func_art_alloc_object_from_code_with_access_check->setAttributes(func_art_alloc_object_from_code_with_access_check_PAL);
484
485Function* func_art_alloc_array_from_code = mod->getFunction("art_alloc_array_from_code");
486if (!func_art_alloc_array_from_code) {
487func_art_alloc_array_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800488 /*Type=*/FuncTy_12,
Logan Chien42e0e152012-01-13 15:42:36 +0800489 /*Linkage=*/GlobalValue::ExternalLinkage,
490 /*Name=*/"art_alloc_array_from_code", mod); // (external, no body)
491func_art_alloc_array_from_code->setCallingConv(CallingConv::C);
492}
493AttrListPtr func_art_alloc_array_from_code_PAL;
494func_art_alloc_array_from_code->setAttributes(func_art_alloc_array_from_code_PAL);
495
496Function* func_art_alloc_array_from_code_with_access_check = mod->getFunction("art_alloc_array_from_code_with_access_check");
497if (!func_art_alloc_array_from_code_with_access_check) {
498func_art_alloc_array_from_code_with_access_check = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800499 /*Type=*/FuncTy_12,
Logan Chien42e0e152012-01-13 15:42:36 +0800500 /*Linkage=*/GlobalValue::ExternalLinkage,
501 /*Name=*/"art_alloc_array_from_code_with_access_check", mod); // (external, no body)
502func_art_alloc_array_from_code_with_access_check->setCallingConv(CallingConv::C);
503}
504AttrListPtr func_art_alloc_array_from_code_with_access_check_PAL;
505func_art_alloc_array_from_code_with_access_check->setAttributes(func_art_alloc_array_from_code_with_access_check_PAL);
506
507Function* func_art_check_and_alloc_array_from_code = mod->getFunction("art_check_and_alloc_array_from_code");
508if (!func_art_check_and_alloc_array_from_code) {
509func_art_check_and_alloc_array_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800510 /*Type=*/FuncTy_12,
Logan Chien42e0e152012-01-13 15:42:36 +0800511 /*Linkage=*/GlobalValue::ExternalLinkage,
512 /*Name=*/"art_check_and_alloc_array_from_code", mod); // (external, no body)
513func_art_check_and_alloc_array_from_code->setCallingConv(CallingConv::C);
514}
515AttrListPtr func_art_check_and_alloc_array_from_code_PAL;
516func_art_check_and_alloc_array_from_code->setAttributes(func_art_check_and_alloc_array_from_code_PAL);
517
518Function* func_art_check_and_alloc_array_from_code_with_access_check = mod->getFunction("art_check_and_alloc_array_from_code_with_access_check");
519if (!func_art_check_and_alloc_array_from_code_with_access_check) {
520func_art_check_and_alloc_array_from_code_with_access_check = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800521 /*Type=*/FuncTy_12,
Logan Chien42e0e152012-01-13 15:42:36 +0800522 /*Linkage=*/GlobalValue::ExternalLinkage,
523 /*Name=*/"art_check_and_alloc_array_from_code_with_access_check", mod); // (external, no body)
524func_art_check_and_alloc_array_from_code_with_access_check->setCallingConv(CallingConv::C);
525}
526AttrListPtr func_art_check_and_alloc_array_from_code_with_access_check_PAL;
527func_art_check_and_alloc_array_from_code_with_access_check->setAttributes(func_art_check_and_alloc_array_from_code_with_access_check_PAL);
528
Logan Chien42e0e152012-01-13 15:42:36 +0800529Function* func_art_find_instance_field_from_code = mod->getFunction("art_find_instance_field_from_code");
530if (!func_art_find_instance_field_from_code) {
531func_art_find_instance_field_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800532 /*Type=*/FuncTy_13,
Logan Chien42e0e152012-01-13 15:42:36 +0800533 /*Linkage=*/GlobalValue::ExternalLinkage,
534 /*Name=*/"art_find_instance_field_from_code", mod); // (external, no body)
535func_art_find_instance_field_from_code->setCallingConv(CallingConv::C);
536}
537AttrListPtr func_art_find_instance_field_from_code_PAL;
538func_art_find_instance_field_from_code->setAttributes(func_art_find_instance_field_from_code_PAL);
539
540Function* func_art_find_static_field_from_code = mod->getFunction("art_find_static_field_from_code");
541if (!func_art_find_static_field_from_code) {
542func_art_find_static_field_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800543 /*Type=*/FuncTy_13,
Logan Chien42e0e152012-01-13 15:42:36 +0800544 /*Linkage=*/GlobalValue::ExternalLinkage,
545 /*Name=*/"art_find_static_field_from_code", mod); // (external, no body)
546func_art_find_static_field_from_code->setCallingConv(CallingConv::C);
547}
548AttrListPtr func_art_find_static_field_from_code_PAL;
549func_art_find_static_field_from_code->setAttributes(func_art_find_static_field_from_code_PAL);
550
551Function* func_art_find_interface_method_from_code = mod->getFunction("art_find_interface_method_from_code");
552if (!func_art_find_interface_method_from_code) {
553func_art_find_interface_method_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800554 /*Type=*/FuncTy_14,
Logan Chien42e0e152012-01-13 15:42:36 +0800555 /*Linkage=*/GlobalValue::ExternalLinkage,
556 /*Name=*/"art_find_interface_method_from_code", mod); // (external, no body)
557func_art_find_interface_method_from_code->setCallingConv(CallingConv::C);
558}
559AttrListPtr func_art_find_interface_method_from_code_PAL;
560func_art_find_interface_method_from_code->setAttributes(func_art_find_interface_method_from_code_PAL);
561
Shih-wei Liao399ed3f2012-03-08 01:27:04 -0800562Function* func_art_find_virtual_method_from_code = mod->getFunction("art_find_virtual_method_from_code");
563if (!func_art_find_virtual_method_from_code) {
564func_art_find_virtual_method_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800565 /*Type=*/FuncTy_14,
Shih-wei Liao399ed3f2012-03-08 01:27:04 -0800566 /*Linkage=*/GlobalValue::ExternalLinkage,
567 /*Name=*/"art_find_virtual_method_from_code", mod); // (external, no body)
568func_art_find_virtual_method_from_code->setCallingConv(CallingConv::C);
569}
570AttrListPtr func_art_find_virtual_method_from_code_PAL;
571func_art_find_virtual_method_from_code->setAttributes(func_art_find_virtual_method_from_code_PAL);
572
573Function* func_art_find_super_method_from_code = mod->getFunction("art_find_super_method_from_code");
574if (!func_art_find_super_method_from_code) {
575func_art_find_super_method_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800576 /*Type=*/FuncTy_14,
Shih-wei Liao399ed3f2012-03-08 01:27:04 -0800577 /*Linkage=*/GlobalValue::ExternalLinkage,
578 /*Name=*/"art_find_super_method_from_code", mod); // (external, no body)
579func_art_find_super_method_from_code->setCallingConv(CallingConv::C);
580}
581AttrListPtr func_art_find_super_method_from_code_PAL;
582func_art_find_super_method_from_code->setAttributes(func_art_find_super_method_from_code_PAL);
583
Logan Chien42e0e152012-01-13 15:42:36 +0800584Function* func_art_initialize_static_storage_from_code = mod->getFunction("art_initialize_static_storage_from_code");
585if (!func_art_initialize_static_storage_from_code) {
586func_art_initialize_static_storage_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800587 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800588 /*Linkage=*/GlobalValue::ExternalLinkage,
589 /*Name=*/"art_initialize_static_storage_from_code", mod); // (external, no body)
590func_art_initialize_static_storage_from_code->setCallingConv(CallingConv::C);
591}
592AttrListPtr func_art_initialize_static_storage_from_code_PAL;
593func_art_initialize_static_storage_from_code->setAttributes(func_art_initialize_static_storage_from_code_PAL);
594
595Function* func_art_initialize_type_from_code = mod->getFunction("art_initialize_type_from_code");
596if (!func_art_initialize_type_from_code) {
597func_art_initialize_type_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800598 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800599 /*Linkage=*/GlobalValue::ExternalLinkage,
600 /*Name=*/"art_initialize_type_from_code", mod); // (external, no body)
601func_art_initialize_type_from_code->setCallingConv(CallingConv::C);
602}
603AttrListPtr func_art_initialize_type_from_code_PAL;
604func_art_initialize_type_from_code->setAttributes(func_art_initialize_type_from_code_PAL);
605
606Function* func_art_initialize_type_and_verify_access_from_code = mod->getFunction("art_initialize_type_and_verify_access_from_code");
607if (!func_art_initialize_type_and_verify_access_from_code) {
608func_art_initialize_type_and_verify_access_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800609 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800610 /*Linkage=*/GlobalValue::ExternalLinkage,
611 /*Name=*/"art_initialize_type_and_verify_access_from_code", mod); // (external, no body)
612func_art_initialize_type_and_verify_access_from_code->setCallingConv(CallingConv::C);
613}
614AttrListPtr func_art_initialize_type_and_verify_access_from_code_PAL;
615func_art_initialize_type_and_verify_access_from_code->setAttributes(func_art_initialize_type_and_verify_access_from_code_PAL);
616
617Function* func_art_resolve_string_from_code = mod->getFunction("art_resolve_string_from_code");
618if (!func_art_resolve_string_from_code) {
619func_art_resolve_string_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800620 /*Type=*/FuncTy_15,
Logan Chien42e0e152012-01-13 15:42:36 +0800621 /*Linkage=*/GlobalValue::ExternalLinkage,
622 /*Name=*/"art_resolve_string_from_code", mod); // (external, no body)
623func_art_resolve_string_from_code->setCallingConv(CallingConv::C);
624}
625AttrListPtr func_art_resolve_string_from_code_PAL;
626func_art_resolve_string_from_code->setAttributes(func_art_resolve_string_from_code_PAL);
627
Logan Chien42e0e152012-01-13 15:42:36 +0800628Function* func_art_set32_static_from_code = mod->getFunction("art_set32_static_from_code");
629if (!func_art_set32_static_from_code) {
630func_art_set32_static_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800631 /*Type=*/FuncTy_16,
Logan Chien42e0e152012-01-13 15:42:36 +0800632 /*Linkage=*/GlobalValue::ExternalLinkage,
633 /*Name=*/"art_set32_static_from_code", mod); // (external, no body)
634func_art_set32_static_from_code->setCallingConv(CallingConv::C);
635}
636AttrListPtr func_art_set32_static_from_code_PAL;
637func_art_set32_static_from_code->setAttributes(func_art_set32_static_from_code_PAL);
638
639Function* func_art_set64_static_from_code = mod->getFunction("art_set64_static_from_code");
640if (!func_art_set64_static_from_code) {
641func_art_set64_static_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800642 /*Type=*/FuncTy_17,
Logan Chien42e0e152012-01-13 15:42:36 +0800643 /*Linkage=*/GlobalValue::ExternalLinkage,
644 /*Name=*/"art_set64_static_from_code", mod); // (external, no body)
645func_art_set64_static_from_code->setCallingConv(CallingConv::C);
646}
647AttrListPtr func_art_set64_static_from_code_PAL;
648func_art_set64_static_from_code->setAttributes(func_art_set64_static_from_code_PAL);
649
650Function* func_art_set_obj_static_from_code = mod->getFunction("art_set_obj_static_from_code");
651if (!func_art_set_obj_static_from_code) {
652func_art_set_obj_static_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800653 /*Type=*/FuncTy_18,
Logan Chien42e0e152012-01-13 15:42:36 +0800654 /*Linkage=*/GlobalValue::ExternalLinkage,
655 /*Name=*/"art_set_obj_static_from_code", mod); // (external, no body)
656func_art_set_obj_static_from_code->setCallingConv(CallingConv::C);
657}
658AttrListPtr func_art_set_obj_static_from_code_PAL;
659func_art_set_obj_static_from_code->setAttributes(func_art_set_obj_static_from_code_PAL);
660
661Function* func_art_get32_static_from_code = mod->getFunction("art_get32_static_from_code");
662if (!func_art_get32_static_from_code) {
663func_art_get32_static_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800664 /*Type=*/FuncTy_19,
Logan Chien42e0e152012-01-13 15:42:36 +0800665 /*Linkage=*/GlobalValue::ExternalLinkage,
666 /*Name=*/"art_get32_static_from_code", mod); // (external, no body)
667func_art_get32_static_from_code->setCallingConv(CallingConv::C);
668}
669AttrListPtr func_art_get32_static_from_code_PAL;
670func_art_get32_static_from_code->setAttributes(func_art_get32_static_from_code_PAL);
671
672Function* func_art_get64_static_from_code = mod->getFunction("art_get64_static_from_code");
673if (!func_art_get64_static_from_code) {
674func_art_get64_static_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800675 /*Type=*/FuncTy_20,
Logan Chien42e0e152012-01-13 15:42:36 +0800676 /*Linkage=*/GlobalValue::ExternalLinkage,
677 /*Name=*/"art_get64_static_from_code", mod); // (external, no body)
678func_art_get64_static_from_code->setCallingConv(CallingConv::C);
679}
680AttrListPtr func_art_get64_static_from_code_PAL;
681func_art_get64_static_from_code->setAttributes(func_art_get64_static_from_code_PAL);
682
683Function* func_art_get_obj_static_from_code = mod->getFunction("art_get_obj_static_from_code");
684if (!func_art_get_obj_static_from_code) {
685func_art_get_obj_static_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800686 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800687 /*Linkage=*/GlobalValue::ExternalLinkage,
688 /*Name=*/"art_get_obj_static_from_code", mod); // (external, no body)
689func_art_get_obj_static_from_code->setCallingConv(CallingConv::C);
690}
691AttrListPtr func_art_get_obj_static_from_code_PAL;
692func_art_get_obj_static_from_code->setAttributes(func_art_get_obj_static_from_code_PAL);
693
694Function* func_art_set32_instance_from_code = mod->getFunction("art_set32_instance_from_code");
695if (!func_art_set32_instance_from_code) {
696func_art_set32_instance_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800697 /*Type=*/FuncTy_21,
Logan Chien42e0e152012-01-13 15:42:36 +0800698 /*Linkage=*/GlobalValue::ExternalLinkage,
699 /*Name=*/"art_set32_instance_from_code", mod); // (external, no body)
700func_art_set32_instance_from_code->setCallingConv(CallingConv::C);
701}
702AttrListPtr func_art_set32_instance_from_code_PAL;
703func_art_set32_instance_from_code->setAttributes(func_art_set32_instance_from_code_PAL);
704
705Function* func_art_set64_instance_from_code = mod->getFunction("art_set64_instance_from_code");
706if (!func_art_set64_instance_from_code) {
707func_art_set64_instance_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800708 /*Type=*/FuncTy_22,
Logan Chien42e0e152012-01-13 15:42:36 +0800709 /*Linkage=*/GlobalValue::ExternalLinkage,
710 /*Name=*/"art_set64_instance_from_code", mod); // (external, no body)
711func_art_set64_instance_from_code->setCallingConv(CallingConv::C);
712}
713AttrListPtr func_art_set64_instance_from_code_PAL;
714func_art_set64_instance_from_code->setAttributes(func_art_set64_instance_from_code_PAL);
715
716Function* func_art_set_obj_instance_from_code = mod->getFunction("art_set_obj_instance_from_code");
717if (!func_art_set_obj_instance_from_code) {
718func_art_set_obj_instance_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800719 /*Type=*/FuncTy_23,
Logan Chien42e0e152012-01-13 15:42:36 +0800720 /*Linkage=*/GlobalValue::ExternalLinkage,
721 /*Name=*/"art_set_obj_instance_from_code", mod); // (external, no body)
722func_art_set_obj_instance_from_code->setCallingConv(CallingConv::C);
723}
724AttrListPtr func_art_set_obj_instance_from_code_PAL;
725func_art_set_obj_instance_from_code->setAttributes(func_art_set_obj_instance_from_code_PAL);
726
727Function* func_art_get32_instance_from_code = mod->getFunction("art_get32_instance_from_code");
728if (!func_art_get32_instance_from_code) {
729func_art_get32_instance_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800730 /*Type=*/FuncTy_18,
Logan Chien42e0e152012-01-13 15:42:36 +0800731 /*Linkage=*/GlobalValue::ExternalLinkage,
732 /*Name=*/"art_get32_instance_from_code", mod); // (external, no body)
733func_art_get32_instance_from_code->setCallingConv(CallingConv::C);
734}
735AttrListPtr func_art_get32_instance_from_code_PAL;
736func_art_get32_instance_from_code->setAttributes(func_art_get32_instance_from_code_PAL);
737
738Function* func_art_get64_instance_from_code = mod->getFunction("art_get64_instance_from_code");
739if (!func_art_get64_instance_from_code) {
740func_art_get64_instance_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800741 /*Type=*/FuncTy_24,
Logan Chien42e0e152012-01-13 15:42:36 +0800742 /*Linkage=*/GlobalValue::ExternalLinkage,
743 /*Name=*/"art_get64_instance_from_code", mod); // (external, no body)
744func_art_get64_instance_from_code->setCallingConv(CallingConv::C);
745}
746AttrListPtr func_art_get64_instance_from_code_PAL;
747func_art_get64_instance_from_code->setAttributes(func_art_get64_instance_from_code_PAL);
748
749Function* func_art_get_obj_instance_from_code = mod->getFunction("art_get_obj_instance_from_code");
750if (!func_art_get_obj_instance_from_code) {
751func_art_get_obj_instance_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800752 /*Type=*/FuncTy_14,
Logan Chien42e0e152012-01-13 15:42:36 +0800753 /*Linkage=*/GlobalValue::ExternalLinkage,
754 /*Name=*/"art_get_obj_instance_from_code", mod); // (external, no body)
755func_art_get_obj_instance_from_code->setCallingConv(CallingConv::C);
756}
757AttrListPtr func_art_get_obj_instance_from_code_PAL;
758func_art_get_obj_instance_from_code->setAttributes(func_art_get_obj_instance_from_code_PAL);
759
TDYa12728f1a142012-03-15 21:51:52 -0700760Function* func_art_decode_jobject_in_thread = mod->getFunction("art_decode_jobject_in_thread");
761if (!func_art_decode_jobject_in_thread) {
762func_art_decode_jobject_in_thread = Function::Create(
TDYa12785321912012-04-01 15:24:56 -0700763 /*Type=*/FuncTy_25,
TDYa12728f1a142012-03-15 21:51:52 -0700764 /*Linkage=*/GlobalValue::ExternalLinkage,
765 /*Name=*/"art_decode_jobject_in_thread", mod); // (external, no body)
766func_art_decode_jobject_in_thread->setCallingConv(CallingConv::C);
767}
768AttrListPtr func_art_decode_jobject_in_thread_PAL;
769func_art_decode_jobject_in_thread->setAttributes(func_art_decode_jobject_in_thread_PAL);
770
Logan Chien42e0e152012-01-13 15:42:36 +0800771Function* func_art_is_assignable_from_code = mod->getFunction("art_is_assignable_from_code");
772if (!func_art_is_assignable_from_code) {
773func_art_is_assignable_from_code = Function::Create(
TDYa12785321912012-04-01 15:24:56 -0700774 /*Type=*/FuncTy_26,
Logan Chien42e0e152012-01-13 15:42:36 +0800775 /*Linkage=*/GlobalValue::ExternalLinkage,
776 /*Name=*/"art_is_assignable_from_code", mod); // (external, no body)
777func_art_is_assignable_from_code->setCallingConv(CallingConv::C);
778}
779AttrListPtr func_art_is_assignable_from_code_PAL;
780func_art_is_assignable_from_code->setAttributes(func_art_is_assignable_from_code_PAL);
781
782Function* func_art_check_cast_from_code = mod->getFunction("art_check_cast_from_code");
783if (!func_art_check_cast_from_code) {
784func_art_check_cast_from_code = Function::Create(
TDYa12785321912012-04-01 15:24:56 -0700785 /*Type=*/FuncTy_27,
Logan Chien42e0e152012-01-13 15:42:36 +0800786 /*Linkage=*/GlobalValue::ExternalLinkage,
787 /*Name=*/"art_check_cast_from_code", mod); // (external, no body)
788func_art_check_cast_from_code->setCallingConv(CallingConv::C);
789}
790AttrListPtr func_art_check_cast_from_code_PAL;
791func_art_check_cast_from_code->setAttributes(func_art_check_cast_from_code_PAL);
792
TDYa1271b86d072012-04-05 17:38:56 -0700793Function* func_art_check_put_array_element_from_code = mod->getFunction("art_check_put_array_element_from_code");
794if (!func_art_check_put_array_element_from_code) {
795func_art_check_put_array_element_from_code = Function::Create(
796 /*Type=*/FuncTy_27,
797 /*Linkage=*/GlobalValue::ExternalLinkage,
798 /*Name=*/"art_check_put_array_element_from_code", mod); // (external, no body)
799func_art_check_put_array_element_from_code->setCallingConv(CallingConv::C);
800}
801AttrListPtr func_art_check_put_array_element_from_code_PAL;
802func_art_check_put_array_element_from_code->setAttributes(func_art_check_put_array_element_from_code_PAL);
803
TDYa12785321912012-04-01 15:24:56 -0700804Function* func_art_ensure_resolved_from_code = mod->getFunction("art_ensure_resolved_from_code");
805if (!func_art_ensure_resolved_from_code) {
806func_art_ensure_resolved_from_code = Function::Create(
807 /*Type=*/FuncTy_28,
808 /*Linkage=*/GlobalValue::ExternalLinkage,
809 /*Name=*/"art_ensure_resolved_from_code", mod); // (external, no body)
810func_art_ensure_resolved_from_code->setCallingConv(CallingConv::C);
811}
812AttrListPtr func_art_ensure_resolved_from_code_PAL;
813func_art_ensure_resolved_from_code->setAttributes(func_art_ensure_resolved_from_code_PAL);
814
TDYa1270b686e52012-04-09 22:43:35 -0700815Function* func_art_fix_stub_from_code = mod->getFunction("art_fix_stub_from_code");
816if (!func_art_fix_stub_from_code) {
817func_art_fix_stub_from_code = Function::Create(
818 /*Type=*/FuncTy_29,
TDYa12785321912012-04-01 15:24:56 -0700819 /*Linkage=*/GlobalValue::ExternalLinkage,
TDYa1270b686e52012-04-09 22:43:35 -0700820 /*Name=*/"art_fix_stub_from_code", mod); // (external, no body)
821func_art_fix_stub_from_code->setCallingConv(CallingConv::C);
TDYa12785321912012-04-01 15:24:56 -0700822}
TDYa1270b686e52012-04-09 22:43:35 -0700823AttrListPtr func_art_fix_stub_from_code_PAL;
824func_art_fix_stub_from_code->setAttributes(func_art_fix_stub_from_code_PAL);
TDYa12785321912012-04-01 15:24:56 -0700825
Logan Chien42e0e152012-01-13 15:42:36 +0800826// Global Variable Declarations
827
828
829// Constant Definitions
830
831// Global Variable Definitions
832
833// Function Definitions
834
835return mod;
836
837}
Logan Chiene75a8cc2012-02-24 12:26:43 +0800838
839} // namespace compiler_llvm
840} // namespace art