blob: 18432d5d2ea33e2795b5f8e961c216bdc6527986 [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
TDYa12728f1a142012-03-15 21:51:52 -070049StructTy_ShadowFrame_fields.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien1b0a1b72012-03-15 06:20:17 +080050StructTy_ShadowFrame_fields.push_back(PointerTy_2);
51StructTy_ShadowFrame_fields.push_back(PointerTy_1);
52StructTy_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(
247 /*Result=*/IntegerType::get(mod->getContext(), 32),
248 /*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(
255 /*Result=*/Type::getVoidTy(mod->getContext()),
256 /*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(
263 /*Result=*/PointerTy_1,
264 /*Params=*/FuncTy_27_args,
265 /*isVarArg=*/false);
266
Logan Chien42e0e152012-01-13 15:42:36 +0800267
268// Function Declarations
269
270Function* func___art_type_list = mod->getFunction("__art_type_list");
271if (!func___art_type_list) {
272func___art_type_list = Function::Create(
273 /*Type=*/FuncTy_0,
274 /*Linkage=*/GlobalValue::ExternalLinkage,
275 /*Name=*/"__art_type_list", mod); // (external, no body)
276func___art_type_list->setCallingConv(CallingConv::C);
277}
278AttrListPtr func___art_type_list_PAL;
279func___art_type_list->setAttributes(func___art_type_list_PAL);
280
281Function* func_art_get_current_thread_from_code = mod->getFunction("art_get_current_thread_from_code");
282if (!func_art_get_current_thread_from_code) {
283func_art_get_current_thread_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800284 /*Type=*/FuncTy_3,
Logan Chien42e0e152012-01-13 15:42:36 +0800285 /*Linkage=*/GlobalValue::ExternalLinkage,
286 /*Name=*/"art_get_current_thread_from_code", mod); // (external, no body)
287func_art_get_current_thread_from_code->setCallingConv(CallingConv::C);
288}
289AttrListPtr func_art_get_current_thread_from_code_PAL;
290func_art_get_current_thread_from_code->setAttributes(func_art_get_current_thread_from_code_PAL);
291
292Function* func_art_set_current_thread_from_code = mod->getFunction("art_set_current_thread_from_code");
293if (!func_art_set_current_thread_from_code) {
294func_art_set_current_thread_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800295 /*Type=*/FuncTy_4,
Logan Chien42e0e152012-01-13 15:42:36 +0800296 /*Linkage=*/GlobalValue::ExternalLinkage,
297 /*Name=*/"art_set_current_thread_from_code", mod); // (external, no body)
298func_art_set_current_thread_from_code->setCallingConv(CallingConv::C);
299}
300AttrListPtr func_art_set_current_thread_from_code_PAL;
301func_art_set_current_thread_from_code->setAttributes(func_art_set_current_thread_from_code_PAL);
302
303Function* func_art_lock_object_from_code = mod->getFunction("art_lock_object_from_code");
304if (!func_art_lock_object_from_code) {
305func_art_lock_object_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800306 /*Type=*/FuncTy_4,
Logan Chien42e0e152012-01-13 15:42:36 +0800307 /*Linkage=*/GlobalValue::ExternalLinkage,
308 /*Name=*/"art_lock_object_from_code", mod); // (external, no body)
309func_art_lock_object_from_code->setCallingConv(CallingConv::C);
310}
311AttrListPtr func_art_lock_object_from_code_PAL;
312func_art_lock_object_from_code->setAttributes(func_art_lock_object_from_code_PAL);
313
314Function* func_art_unlock_object_from_code = mod->getFunction("art_unlock_object_from_code");
315if (!func_art_unlock_object_from_code) {
316func_art_unlock_object_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800317 /*Type=*/FuncTy_4,
Logan Chien42e0e152012-01-13 15:42:36 +0800318 /*Linkage=*/GlobalValue::ExternalLinkage,
319 /*Name=*/"art_unlock_object_from_code", mod); // (external, no body)
320func_art_unlock_object_from_code->setCallingConv(CallingConv::C);
321}
322AttrListPtr func_art_unlock_object_from_code_PAL;
323func_art_unlock_object_from_code->setAttributes(func_art_unlock_object_from_code_PAL);
324
325Function* func_art_test_suspend_from_code = mod->getFunction("art_test_suspend_from_code");
326if (!func_art_test_suspend_from_code) {
327func_art_test_suspend_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800328 /*Type=*/FuncTy_5,
Logan Chien42e0e152012-01-13 15:42:36 +0800329 /*Linkage=*/GlobalValue::ExternalLinkage,
330 /*Name=*/"art_test_suspend_from_code", mod); // (external, no body)
331func_art_test_suspend_from_code->setCallingConv(CallingConv::C);
332}
333AttrListPtr func_art_test_suspend_from_code_PAL;
334func_art_test_suspend_from_code->setAttributes(func_art_test_suspend_from_code_PAL);
335
Logan Chien3f71e702012-02-17 18:45:27 +0800336Function* func_art_push_shadow_frame_from_code = mod->getFunction("art_push_shadow_frame_from_code");
337if (!func_art_push_shadow_frame_from_code) {
338func_art_push_shadow_frame_from_code = Function::Create(
339 /*Type=*/FuncTy_6,
340 /*Linkage=*/GlobalValue::ExternalLinkage,
341 /*Name=*/"art_push_shadow_frame_from_code", mod); // (external, no body)
342func_art_push_shadow_frame_from_code->setCallingConv(CallingConv::C);
343}
344AttrListPtr func_art_push_shadow_frame_from_code_PAL;
345func_art_push_shadow_frame_from_code->setAttributes(func_art_push_shadow_frame_from_code_PAL);
346
347Function* func_art_pop_shadow_frame_from_code = mod->getFunction("art_pop_shadow_frame_from_code");
348if (!func_art_pop_shadow_frame_from_code) {
349func_art_pop_shadow_frame_from_code = Function::Create(
350 /*Type=*/FuncTy_5,
351 /*Linkage=*/GlobalValue::ExternalLinkage,
352 /*Name=*/"art_pop_shadow_frame_from_code", mod); // (external, no body)
353func_art_pop_shadow_frame_from_code->setCallingConv(CallingConv::C);
354}
355AttrListPtr func_art_pop_shadow_frame_from_code_PAL;
356func_art_pop_shadow_frame_from_code->setAttributes(func_art_pop_shadow_frame_from_code_PAL);
357
Logan Chien42e0e152012-01-13 15:42:36 +0800358Function* func_art_is_exception_pending_from_code = mod->getFunction("art_is_exception_pending_from_code");
359if (!func_art_is_exception_pending_from_code) {
360func_art_is_exception_pending_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800361 /*Type=*/FuncTy_7,
Logan Chien42e0e152012-01-13 15:42:36 +0800362 /*Linkage=*/GlobalValue::ExternalLinkage,
363 /*Name=*/"art_is_exception_pending_from_code", mod); // (external, no body)
364func_art_is_exception_pending_from_code->setCallingConv(CallingConv::C);
365}
366AttrListPtr func_art_is_exception_pending_from_code_PAL;
367func_art_is_exception_pending_from_code->setAttributes(func_art_is_exception_pending_from_code_PAL);
368
369Function* func_art_throw_div_zero_from_code = mod->getFunction("art_throw_div_zero_from_code");
370if (!func_art_throw_div_zero_from_code) {
371func_art_throw_div_zero_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800372 /*Type=*/FuncTy_5,
Logan Chien42e0e152012-01-13 15:42:36 +0800373 /*Linkage=*/GlobalValue::ExternalLinkage,
374 /*Name=*/"art_throw_div_zero_from_code", mod); // (external, no body)
375func_art_throw_div_zero_from_code->setCallingConv(CallingConv::C);
376}
377AttrListPtr func_art_throw_div_zero_from_code_PAL;
378func_art_throw_div_zero_from_code->setAttributes(func_art_throw_div_zero_from_code_PAL);
379
380Function* func_art_throw_array_bounds_from_code = mod->getFunction("art_throw_array_bounds_from_code");
381if (!func_art_throw_array_bounds_from_code) {
382func_art_throw_array_bounds_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800383 /*Type=*/FuncTy_8,
Logan Chien42e0e152012-01-13 15:42:36 +0800384 /*Linkage=*/GlobalValue::ExternalLinkage,
385 /*Name=*/"art_throw_array_bounds_from_code", mod); // (external, no body)
386func_art_throw_array_bounds_from_code->setCallingConv(CallingConv::C);
387}
388AttrListPtr func_art_throw_array_bounds_from_code_PAL;
389func_art_throw_array_bounds_from_code->setAttributes(func_art_throw_array_bounds_from_code_PAL);
390
391Function* func_art_throw_no_such_method_from_code = mod->getFunction("art_throw_no_such_method_from_code");
392if (!func_art_throw_no_such_method_from_code) {
393func_art_throw_no_such_method_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800394 /*Type=*/FuncTy_9,
Logan Chien42e0e152012-01-13 15:42:36 +0800395 /*Linkage=*/GlobalValue::ExternalLinkage,
396 /*Name=*/"art_throw_no_such_method_from_code", mod); // (external, no body)
397func_art_throw_no_such_method_from_code->setCallingConv(CallingConv::C);
398}
399AttrListPtr func_art_throw_no_such_method_from_code_PAL;
400func_art_throw_no_such_method_from_code->setAttributes(func_art_throw_no_such_method_from_code_PAL);
401
402Function* func_art_throw_null_pointer_exception_from_code = mod->getFunction("art_throw_null_pointer_exception_from_code");
403if (!func_art_throw_null_pointer_exception_from_code) {
404func_art_throw_null_pointer_exception_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800405 /*Type=*/FuncTy_5,
Logan Chien42e0e152012-01-13 15:42:36 +0800406 /*Linkage=*/GlobalValue::ExternalLinkage,
407 /*Name=*/"art_throw_null_pointer_exception_from_code", mod); // (external, no body)
408func_art_throw_null_pointer_exception_from_code->setCallingConv(CallingConv::C);
409}
410AttrListPtr func_art_throw_null_pointer_exception_from_code_PAL;
411func_art_throw_null_pointer_exception_from_code->setAttributes(func_art_throw_null_pointer_exception_from_code_PAL);
412
413Function* func_art_throw_stack_overflow_from_code = mod->getFunction("art_throw_stack_overflow_from_code");
414if (!func_art_throw_stack_overflow_from_code) {
415func_art_throw_stack_overflow_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800416 /*Type=*/FuncTy_4,
Logan Chien42e0e152012-01-13 15:42:36 +0800417 /*Linkage=*/GlobalValue::ExternalLinkage,
418 /*Name=*/"art_throw_stack_overflow_from_code", mod); // (external, no body)
419func_art_throw_stack_overflow_from_code->setCallingConv(CallingConv::C);
420}
421AttrListPtr func_art_throw_stack_overflow_from_code_PAL;
422func_art_throw_stack_overflow_from_code->setAttributes(func_art_throw_stack_overflow_from_code_PAL);
423
424Function* func_art_throw_exception_from_code = mod->getFunction("art_throw_exception_from_code");
425if (!func_art_throw_exception_from_code) {
426func_art_throw_exception_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800427 /*Type=*/FuncTy_4,
Logan Chien42e0e152012-01-13 15:42:36 +0800428 /*Linkage=*/GlobalValue::ExternalLinkage,
429 /*Name=*/"art_throw_exception_from_code", mod); // (external, no body)
430func_art_throw_exception_from_code->setCallingConv(CallingConv::C);
431}
432AttrListPtr func_art_throw_exception_from_code_PAL;
433func_art_throw_exception_from_code->setAttributes(func_art_throw_exception_from_code_PAL);
434
435Function* func_art_find_catch_block_from_code = mod->getFunction("art_find_catch_block_from_code");
436if (!func_art_find_catch_block_from_code) {
437func_art_find_catch_block_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800438 /*Type=*/FuncTy_10,
Logan Chien42e0e152012-01-13 15:42:36 +0800439 /*Linkage=*/GlobalValue::ExternalLinkage,
440 /*Name=*/"art_find_catch_block_from_code", mod); // (external, no body)
441func_art_find_catch_block_from_code->setCallingConv(CallingConv::C);
442}
443AttrListPtr func_art_find_catch_block_from_code_PAL;
444func_art_find_catch_block_from_code->setAttributes(func_art_find_catch_block_from_code_PAL);
445
446Function* func_art_alloc_object_from_code = mod->getFunction("art_alloc_object_from_code");
447if (!func_art_alloc_object_from_code) {
448func_art_alloc_object_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800449 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800450 /*Linkage=*/GlobalValue::ExternalLinkage,
451 /*Name=*/"art_alloc_object_from_code", mod); // (external, no body)
452func_art_alloc_object_from_code->setCallingConv(CallingConv::C);
453}
454AttrListPtr func_art_alloc_object_from_code_PAL;
455func_art_alloc_object_from_code->setAttributes(func_art_alloc_object_from_code_PAL);
456
457Function* func_art_alloc_object_from_code_with_access_check = mod->getFunction("art_alloc_object_from_code_with_access_check");
458if (!func_art_alloc_object_from_code_with_access_check) {
459func_art_alloc_object_from_code_with_access_check = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800460 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800461 /*Linkage=*/GlobalValue::ExternalLinkage,
462 /*Name=*/"art_alloc_object_from_code_with_access_check", mod); // (external, no body)
463func_art_alloc_object_from_code_with_access_check->setCallingConv(CallingConv::C);
464}
465AttrListPtr func_art_alloc_object_from_code_with_access_check_PAL;
466func_art_alloc_object_from_code_with_access_check->setAttributes(func_art_alloc_object_from_code_with_access_check_PAL);
467
468Function* func_art_alloc_array_from_code = mod->getFunction("art_alloc_array_from_code");
469if (!func_art_alloc_array_from_code) {
470func_art_alloc_array_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800471 /*Type=*/FuncTy_12,
Logan Chien42e0e152012-01-13 15:42:36 +0800472 /*Linkage=*/GlobalValue::ExternalLinkage,
473 /*Name=*/"art_alloc_array_from_code", mod); // (external, no body)
474func_art_alloc_array_from_code->setCallingConv(CallingConv::C);
475}
476AttrListPtr func_art_alloc_array_from_code_PAL;
477func_art_alloc_array_from_code->setAttributes(func_art_alloc_array_from_code_PAL);
478
479Function* func_art_alloc_array_from_code_with_access_check = mod->getFunction("art_alloc_array_from_code_with_access_check");
480if (!func_art_alloc_array_from_code_with_access_check) {
481func_art_alloc_array_from_code_with_access_check = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800482 /*Type=*/FuncTy_12,
Logan Chien42e0e152012-01-13 15:42:36 +0800483 /*Linkage=*/GlobalValue::ExternalLinkage,
484 /*Name=*/"art_alloc_array_from_code_with_access_check", mod); // (external, no body)
485func_art_alloc_array_from_code_with_access_check->setCallingConv(CallingConv::C);
486}
487AttrListPtr func_art_alloc_array_from_code_with_access_check_PAL;
488func_art_alloc_array_from_code_with_access_check->setAttributes(func_art_alloc_array_from_code_with_access_check_PAL);
489
490Function* func_art_check_and_alloc_array_from_code = mod->getFunction("art_check_and_alloc_array_from_code");
491if (!func_art_check_and_alloc_array_from_code) {
492func_art_check_and_alloc_array_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800493 /*Type=*/FuncTy_12,
Logan Chien42e0e152012-01-13 15:42:36 +0800494 /*Linkage=*/GlobalValue::ExternalLinkage,
495 /*Name=*/"art_check_and_alloc_array_from_code", mod); // (external, no body)
496func_art_check_and_alloc_array_from_code->setCallingConv(CallingConv::C);
497}
498AttrListPtr func_art_check_and_alloc_array_from_code_PAL;
499func_art_check_and_alloc_array_from_code->setAttributes(func_art_check_and_alloc_array_from_code_PAL);
500
501Function* func_art_check_and_alloc_array_from_code_with_access_check = mod->getFunction("art_check_and_alloc_array_from_code_with_access_check");
502if (!func_art_check_and_alloc_array_from_code_with_access_check) {
503func_art_check_and_alloc_array_from_code_with_access_check = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800504 /*Type=*/FuncTy_12,
Logan Chien42e0e152012-01-13 15:42:36 +0800505 /*Linkage=*/GlobalValue::ExternalLinkage,
506 /*Name=*/"art_check_and_alloc_array_from_code_with_access_check", mod); // (external, no body)
507func_art_check_and_alloc_array_from_code_with_access_check->setCallingConv(CallingConv::C);
508}
509AttrListPtr func_art_check_and_alloc_array_from_code_with_access_check_PAL;
510func_art_check_and_alloc_array_from_code_with_access_check->setAttributes(func_art_check_and_alloc_array_from_code_with_access_check_PAL);
511
Logan Chien42e0e152012-01-13 15:42:36 +0800512Function* func_art_find_instance_field_from_code = mod->getFunction("art_find_instance_field_from_code");
513if (!func_art_find_instance_field_from_code) {
514func_art_find_instance_field_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800515 /*Type=*/FuncTy_13,
Logan Chien42e0e152012-01-13 15:42:36 +0800516 /*Linkage=*/GlobalValue::ExternalLinkage,
517 /*Name=*/"art_find_instance_field_from_code", mod); // (external, no body)
518func_art_find_instance_field_from_code->setCallingConv(CallingConv::C);
519}
520AttrListPtr func_art_find_instance_field_from_code_PAL;
521func_art_find_instance_field_from_code->setAttributes(func_art_find_instance_field_from_code_PAL);
522
523Function* func_art_find_static_field_from_code = mod->getFunction("art_find_static_field_from_code");
524if (!func_art_find_static_field_from_code) {
525func_art_find_static_field_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800526 /*Type=*/FuncTy_13,
Logan Chien42e0e152012-01-13 15:42:36 +0800527 /*Linkage=*/GlobalValue::ExternalLinkage,
528 /*Name=*/"art_find_static_field_from_code", mod); // (external, no body)
529func_art_find_static_field_from_code->setCallingConv(CallingConv::C);
530}
531AttrListPtr func_art_find_static_field_from_code_PAL;
532func_art_find_static_field_from_code->setAttributes(func_art_find_static_field_from_code_PAL);
533
534Function* func_art_find_interface_method_from_code = mod->getFunction("art_find_interface_method_from_code");
535if (!func_art_find_interface_method_from_code) {
536func_art_find_interface_method_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800537 /*Type=*/FuncTy_14,
Logan Chien42e0e152012-01-13 15:42:36 +0800538 /*Linkage=*/GlobalValue::ExternalLinkage,
539 /*Name=*/"art_find_interface_method_from_code", mod); // (external, no body)
540func_art_find_interface_method_from_code->setCallingConv(CallingConv::C);
541}
542AttrListPtr func_art_find_interface_method_from_code_PAL;
543func_art_find_interface_method_from_code->setAttributes(func_art_find_interface_method_from_code_PAL);
544
Shih-wei Liao399ed3f2012-03-08 01:27:04 -0800545Function* func_art_find_virtual_method_from_code = mod->getFunction("art_find_virtual_method_from_code");
546if (!func_art_find_virtual_method_from_code) {
547func_art_find_virtual_method_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800548 /*Type=*/FuncTy_14,
Shih-wei Liao399ed3f2012-03-08 01:27:04 -0800549 /*Linkage=*/GlobalValue::ExternalLinkage,
550 /*Name=*/"art_find_virtual_method_from_code", mod); // (external, no body)
551func_art_find_virtual_method_from_code->setCallingConv(CallingConv::C);
552}
553AttrListPtr func_art_find_virtual_method_from_code_PAL;
554func_art_find_virtual_method_from_code->setAttributes(func_art_find_virtual_method_from_code_PAL);
555
556Function* func_art_find_super_method_from_code = mod->getFunction("art_find_super_method_from_code");
557if (!func_art_find_super_method_from_code) {
558func_art_find_super_method_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800559 /*Type=*/FuncTy_14,
Shih-wei Liao399ed3f2012-03-08 01:27:04 -0800560 /*Linkage=*/GlobalValue::ExternalLinkage,
561 /*Name=*/"art_find_super_method_from_code", mod); // (external, no body)
562func_art_find_super_method_from_code->setCallingConv(CallingConv::C);
563}
564AttrListPtr func_art_find_super_method_from_code_PAL;
565func_art_find_super_method_from_code->setAttributes(func_art_find_super_method_from_code_PAL);
566
Logan Chien42e0e152012-01-13 15:42:36 +0800567Function* func_art_initialize_static_storage_from_code = mod->getFunction("art_initialize_static_storage_from_code");
568if (!func_art_initialize_static_storage_from_code) {
569func_art_initialize_static_storage_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800570 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800571 /*Linkage=*/GlobalValue::ExternalLinkage,
572 /*Name=*/"art_initialize_static_storage_from_code", mod); // (external, no body)
573func_art_initialize_static_storage_from_code->setCallingConv(CallingConv::C);
574}
575AttrListPtr func_art_initialize_static_storage_from_code_PAL;
576func_art_initialize_static_storage_from_code->setAttributes(func_art_initialize_static_storage_from_code_PAL);
577
578Function* func_art_initialize_type_from_code = mod->getFunction("art_initialize_type_from_code");
579if (!func_art_initialize_type_from_code) {
580func_art_initialize_type_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800581 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800582 /*Linkage=*/GlobalValue::ExternalLinkage,
583 /*Name=*/"art_initialize_type_from_code", mod); // (external, no body)
584func_art_initialize_type_from_code->setCallingConv(CallingConv::C);
585}
586AttrListPtr func_art_initialize_type_from_code_PAL;
587func_art_initialize_type_from_code->setAttributes(func_art_initialize_type_from_code_PAL);
588
589Function* func_art_initialize_type_and_verify_access_from_code = mod->getFunction("art_initialize_type_and_verify_access_from_code");
590if (!func_art_initialize_type_and_verify_access_from_code) {
591func_art_initialize_type_and_verify_access_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800592 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800593 /*Linkage=*/GlobalValue::ExternalLinkage,
594 /*Name=*/"art_initialize_type_and_verify_access_from_code", mod); // (external, no body)
595func_art_initialize_type_and_verify_access_from_code->setCallingConv(CallingConv::C);
596}
597AttrListPtr func_art_initialize_type_and_verify_access_from_code_PAL;
598func_art_initialize_type_and_verify_access_from_code->setAttributes(func_art_initialize_type_and_verify_access_from_code_PAL);
599
600Function* func_art_resolve_string_from_code = mod->getFunction("art_resolve_string_from_code");
601if (!func_art_resolve_string_from_code) {
602func_art_resolve_string_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800603 /*Type=*/FuncTy_15,
Logan Chien42e0e152012-01-13 15:42:36 +0800604 /*Linkage=*/GlobalValue::ExternalLinkage,
605 /*Name=*/"art_resolve_string_from_code", mod); // (external, no body)
606func_art_resolve_string_from_code->setCallingConv(CallingConv::C);
607}
608AttrListPtr func_art_resolve_string_from_code_PAL;
609func_art_resolve_string_from_code->setAttributes(func_art_resolve_string_from_code_PAL);
610
Logan Chien42e0e152012-01-13 15:42:36 +0800611Function* func_art_set32_static_from_code = mod->getFunction("art_set32_static_from_code");
612if (!func_art_set32_static_from_code) {
613func_art_set32_static_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800614 /*Type=*/FuncTy_16,
Logan Chien42e0e152012-01-13 15:42:36 +0800615 /*Linkage=*/GlobalValue::ExternalLinkage,
616 /*Name=*/"art_set32_static_from_code", mod); // (external, no body)
617func_art_set32_static_from_code->setCallingConv(CallingConv::C);
618}
619AttrListPtr func_art_set32_static_from_code_PAL;
620func_art_set32_static_from_code->setAttributes(func_art_set32_static_from_code_PAL);
621
622Function* func_art_set64_static_from_code = mod->getFunction("art_set64_static_from_code");
623if (!func_art_set64_static_from_code) {
624func_art_set64_static_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800625 /*Type=*/FuncTy_17,
Logan Chien42e0e152012-01-13 15:42:36 +0800626 /*Linkage=*/GlobalValue::ExternalLinkage,
627 /*Name=*/"art_set64_static_from_code", mod); // (external, no body)
628func_art_set64_static_from_code->setCallingConv(CallingConv::C);
629}
630AttrListPtr func_art_set64_static_from_code_PAL;
631func_art_set64_static_from_code->setAttributes(func_art_set64_static_from_code_PAL);
632
633Function* func_art_set_obj_static_from_code = mod->getFunction("art_set_obj_static_from_code");
634if (!func_art_set_obj_static_from_code) {
635func_art_set_obj_static_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800636 /*Type=*/FuncTy_18,
Logan Chien42e0e152012-01-13 15:42:36 +0800637 /*Linkage=*/GlobalValue::ExternalLinkage,
638 /*Name=*/"art_set_obj_static_from_code", mod); // (external, no body)
639func_art_set_obj_static_from_code->setCallingConv(CallingConv::C);
640}
641AttrListPtr func_art_set_obj_static_from_code_PAL;
642func_art_set_obj_static_from_code->setAttributes(func_art_set_obj_static_from_code_PAL);
643
644Function* func_art_get32_static_from_code = mod->getFunction("art_get32_static_from_code");
645if (!func_art_get32_static_from_code) {
646func_art_get32_static_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800647 /*Type=*/FuncTy_19,
Logan Chien42e0e152012-01-13 15:42:36 +0800648 /*Linkage=*/GlobalValue::ExternalLinkage,
649 /*Name=*/"art_get32_static_from_code", mod); // (external, no body)
650func_art_get32_static_from_code->setCallingConv(CallingConv::C);
651}
652AttrListPtr func_art_get32_static_from_code_PAL;
653func_art_get32_static_from_code->setAttributes(func_art_get32_static_from_code_PAL);
654
655Function* func_art_get64_static_from_code = mod->getFunction("art_get64_static_from_code");
656if (!func_art_get64_static_from_code) {
657func_art_get64_static_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800658 /*Type=*/FuncTy_20,
Logan Chien42e0e152012-01-13 15:42:36 +0800659 /*Linkage=*/GlobalValue::ExternalLinkage,
660 /*Name=*/"art_get64_static_from_code", mod); // (external, no body)
661func_art_get64_static_from_code->setCallingConv(CallingConv::C);
662}
663AttrListPtr func_art_get64_static_from_code_PAL;
664func_art_get64_static_from_code->setAttributes(func_art_get64_static_from_code_PAL);
665
666Function* func_art_get_obj_static_from_code = mod->getFunction("art_get_obj_static_from_code");
667if (!func_art_get_obj_static_from_code) {
668func_art_get_obj_static_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800669 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800670 /*Linkage=*/GlobalValue::ExternalLinkage,
671 /*Name=*/"art_get_obj_static_from_code", mod); // (external, no body)
672func_art_get_obj_static_from_code->setCallingConv(CallingConv::C);
673}
674AttrListPtr func_art_get_obj_static_from_code_PAL;
675func_art_get_obj_static_from_code->setAttributes(func_art_get_obj_static_from_code_PAL);
676
677Function* func_art_set32_instance_from_code = mod->getFunction("art_set32_instance_from_code");
678if (!func_art_set32_instance_from_code) {
679func_art_set32_instance_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800680 /*Type=*/FuncTy_21,
Logan Chien42e0e152012-01-13 15:42:36 +0800681 /*Linkage=*/GlobalValue::ExternalLinkage,
682 /*Name=*/"art_set32_instance_from_code", mod); // (external, no body)
683func_art_set32_instance_from_code->setCallingConv(CallingConv::C);
684}
685AttrListPtr func_art_set32_instance_from_code_PAL;
686func_art_set32_instance_from_code->setAttributes(func_art_set32_instance_from_code_PAL);
687
688Function* func_art_set64_instance_from_code = mod->getFunction("art_set64_instance_from_code");
689if (!func_art_set64_instance_from_code) {
690func_art_set64_instance_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800691 /*Type=*/FuncTy_22,
Logan Chien42e0e152012-01-13 15:42:36 +0800692 /*Linkage=*/GlobalValue::ExternalLinkage,
693 /*Name=*/"art_set64_instance_from_code", mod); // (external, no body)
694func_art_set64_instance_from_code->setCallingConv(CallingConv::C);
695}
696AttrListPtr func_art_set64_instance_from_code_PAL;
697func_art_set64_instance_from_code->setAttributes(func_art_set64_instance_from_code_PAL);
698
699Function* func_art_set_obj_instance_from_code = mod->getFunction("art_set_obj_instance_from_code");
700if (!func_art_set_obj_instance_from_code) {
701func_art_set_obj_instance_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800702 /*Type=*/FuncTy_23,
Logan Chien42e0e152012-01-13 15:42:36 +0800703 /*Linkage=*/GlobalValue::ExternalLinkage,
704 /*Name=*/"art_set_obj_instance_from_code", mod); // (external, no body)
705func_art_set_obj_instance_from_code->setCallingConv(CallingConv::C);
706}
707AttrListPtr func_art_set_obj_instance_from_code_PAL;
708func_art_set_obj_instance_from_code->setAttributes(func_art_set_obj_instance_from_code_PAL);
709
710Function* func_art_get32_instance_from_code = mod->getFunction("art_get32_instance_from_code");
711if (!func_art_get32_instance_from_code) {
712func_art_get32_instance_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800713 /*Type=*/FuncTy_18,
Logan Chien42e0e152012-01-13 15:42:36 +0800714 /*Linkage=*/GlobalValue::ExternalLinkage,
715 /*Name=*/"art_get32_instance_from_code", mod); // (external, no body)
716func_art_get32_instance_from_code->setCallingConv(CallingConv::C);
717}
718AttrListPtr func_art_get32_instance_from_code_PAL;
719func_art_get32_instance_from_code->setAttributes(func_art_get32_instance_from_code_PAL);
720
721Function* func_art_get64_instance_from_code = mod->getFunction("art_get64_instance_from_code");
722if (!func_art_get64_instance_from_code) {
723func_art_get64_instance_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800724 /*Type=*/FuncTy_24,
Logan Chien42e0e152012-01-13 15:42:36 +0800725 /*Linkage=*/GlobalValue::ExternalLinkage,
726 /*Name=*/"art_get64_instance_from_code", mod); // (external, no body)
727func_art_get64_instance_from_code->setCallingConv(CallingConv::C);
728}
729AttrListPtr func_art_get64_instance_from_code_PAL;
730func_art_get64_instance_from_code->setAttributes(func_art_get64_instance_from_code_PAL);
731
732Function* func_art_get_obj_instance_from_code = mod->getFunction("art_get_obj_instance_from_code");
733if (!func_art_get_obj_instance_from_code) {
734func_art_get_obj_instance_from_code = Function::Create(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800735 /*Type=*/FuncTy_14,
Logan Chien42e0e152012-01-13 15:42:36 +0800736 /*Linkage=*/GlobalValue::ExternalLinkage,
737 /*Name=*/"art_get_obj_instance_from_code", mod); // (external, no body)
738func_art_get_obj_instance_from_code->setCallingConv(CallingConv::C);
739}
740AttrListPtr func_art_get_obj_instance_from_code_PAL;
741func_art_get_obj_instance_from_code->setAttributes(func_art_get_obj_instance_from_code_PAL);
742
TDYa12728f1a142012-03-15 21:51:52 -0700743Function* func_art_decode_jobject_in_thread = mod->getFunction("art_decode_jobject_in_thread");
744if (!func_art_decode_jobject_in_thread) {
745func_art_decode_jobject_in_thread = Function::Create(
746 /*Type=*/FuncTy_27,
747 /*Linkage=*/GlobalValue::ExternalLinkage,
748 /*Name=*/"art_decode_jobject_in_thread", mod); // (external, no body)
749func_art_decode_jobject_in_thread->setCallingConv(CallingConv::C);
750}
751AttrListPtr func_art_decode_jobject_in_thread_PAL;
752func_art_decode_jobject_in_thread->setAttributes(func_art_decode_jobject_in_thread_PAL);
753
Logan Chien42e0e152012-01-13 15:42:36 +0800754Function* func_art_is_assignable_from_code = mod->getFunction("art_is_assignable_from_code");
755if (!func_art_is_assignable_from_code) {
756func_art_is_assignable_from_code = Function::Create(
Logan Chien3b2b2e72012-03-06 16:11:45 +0800757 /*Type=*/FuncTy_25,
Logan Chien42e0e152012-01-13 15:42:36 +0800758 /*Linkage=*/GlobalValue::ExternalLinkage,
759 /*Name=*/"art_is_assignable_from_code", mod); // (external, no body)
760func_art_is_assignable_from_code->setCallingConv(CallingConv::C);
761}
762AttrListPtr func_art_is_assignable_from_code_PAL;
763func_art_is_assignable_from_code->setAttributes(func_art_is_assignable_from_code_PAL);
764
765Function* func_art_check_cast_from_code = mod->getFunction("art_check_cast_from_code");
766if (!func_art_check_cast_from_code) {
767func_art_check_cast_from_code = Function::Create(
Logan Chien3b2b2e72012-03-06 16:11:45 +0800768 /*Type=*/FuncTy_26,
Logan Chien42e0e152012-01-13 15:42:36 +0800769 /*Linkage=*/GlobalValue::ExternalLinkage,
770 /*Name=*/"art_check_cast_from_code", mod); // (external, no body)
771func_art_check_cast_from_code->setCallingConv(CallingConv::C);
772}
773AttrListPtr func_art_check_cast_from_code_PAL;
774func_art_check_cast_from_code->setAttributes(func_art_check_cast_from_code_PAL);
775
776// Global Variable Declarations
777
778
779// Constant Definitions
780
781// Global Variable Definitions
782
783// Function Definitions
784
785return mod;
786
787}
Logan Chiene75a8cc2012-02-24 12:26:43 +0800788
789} // namespace compiler_llvm
790} // namespace art