blob: e327c005ce270f7a0da00742b689ea138ce49830 [file] [log] [blame]
Logan Chien9e5f5c12012-04-10 13:51:45 +08001// Generated with tools/gen_art_module_cc.sh
Logan Chiene75a8cc2012-02-24 12:26:43 +08002
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 Chien9e5f5c12012-04-10 13:51:45 +0800114FuncTy_10_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien42e0e152012-01-13 15:42:36 +0800115FunctionType* FuncTy_10 = FunctionType::get(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800116 /*Result=*/Type::getVoidTy(mod->getContext()),
Logan Chien42e0e152012-01-13 15:42:36 +0800117 /*Params=*/FuncTy_10_args,
118 /*isVarArg=*/false);
119
120std::vector<Type*>FuncTy_11_args;
Logan Chien3f71e702012-02-17 18:45:27 +0800121FuncTy_11_args.push_back(PointerTy_1);
Logan Chien9e5f5c12012-04-10 13:51:45 +0800122FuncTy_11_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien42e0e152012-01-13 15:42:36 +0800123FunctionType* FuncTy_11 = FunctionType::get(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800124 /*Result=*/IntegerType::get(mod->getContext(), 32),
Logan Chien42e0e152012-01-13 15:42:36 +0800125 /*Params=*/FuncTy_11_args,
126 /*isVarArg=*/false);
127
128std::vector<Type*>FuncTy_12_args;
Logan Chien3f71e702012-02-17 18:45:27 +0800129FuncTy_12_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien42e0e152012-01-13 15:42:36 +0800130FuncTy_12_args.push_back(PointerTy_1);
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 Chien9e5f5c12012-04-10 13:51:45 +0800139FuncTy_13_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien42e0e152012-01-13 15:42:36 +0800140FunctionType* FuncTy_13 = FunctionType::get(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800141 /*Result=*/PointerTy_1,
Logan Chien42e0e152012-01-13 15:42:36 +0800142 /*Params=*/FuncTy_13_args,
143 /*isVarArg=*/false);
144
145std::vector<Type*>FuncTy_14_args;
Logan Chien3f71e702012-02-17 18:45:27 +0800146FuncTy_14_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien1b0a1b72012-03-15 06:20:17 +0800147FuncTy_14_args.push_back(PointerTy_1);
Logan Chien42e0e152012-01-13 15:42:36 +0800148FunctionType* FuncTy_14 = FunctionType::get(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800149 /*Result=*/Type::getVoidTy(mod->getContext()),
Logan Chien42e0e152012-01-13 15:42:36 +0800150 /*Params=*/FuncTy_14_args,
151 /*isVarArg=*/false);
152
153std::vector<Type*>FuncTy_15_args;
154FuncTy_15_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien9e5f5c12012-04-10 13:51:45 +0800155FuncTy_15_args.push_back(PointerTy_1);
156FuncTy_15_args.push_back(PointerTy_1);
Logan Chien42e0e152012-01-13 15:42:36 +0800157FunctionType* FuncTy_15 = FunctionType::get(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800158 /*Result=*/PointerTy_1,
Logan Chien42e0e152012-01-13 15:42:36 +0800159 /*Params=*/FuncTy_15_args,
160 /*isVarArg=*/false);
161
162std::vector<Type*>FuncTy_16_args;
Logan Chien42e0e152012-01-13 15:42:36 +0800163FuncTy_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(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800166 /*Result=*/PointerTy_1,
Logan Chien42e0e152012-01-13 15:42:36 +0800167 /*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 Chien9e5f5c12012-04-10 13:51:45 +0800173FuncTy_17_args.push_back(IntegerType::get(mod->getContext(), 32));
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 Chien9e5f5c12012-04-10 13:51:45 +0800182FuncTy_18_args.push_back(IntegerType::get(mod->getContext(), 64));
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);
Logan Chien9e5f5c12012-04-10 13:51:45 +0800191FuncTy_19_args.push_back(PointerTy_1);
Logan Chien42e0e152012-01-13 15:42:36 +0800192FunctionType* FuncTy_19 = FunctionType::get(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800193 /*Result=*/IntegerType::get(mod->getContext(), 32),
Logan Chien42e0e152012-01-13 15:42:36 +0800194 /*Params=*/FuncTy_19_args,
195 /*isVarArg=*/false);
196
Logan Chien3f71e702012-02-17 18:45:27 +0800197std::vector<Type*>FuncTy_20_args;
Logan Chien3b2b2e72012-03-06 16:11:45 +0800198FuncTy_20_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chiena6b2ca62012-03-06 15:50:54 +0800199FuncTy_20_args.push_back(PointerTy_1);
Logan Chien3f71e702012-02-17 18:45:27 +0800200FunctionType* FuncTy_20 = FunctionType::get(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800201 /*Result=*/IntegerType::get(mod->getContext(), 32),
Logan Chien3f71e702012-02-17 18:45:27 +0800202 /*Params=*/FuncTy_20_args,
203 /*isVarArg=*/false);
204
205std::vector<Type*>FuncTy_21_args;
Logan Chien3b2b2e72012-03-06 16:11:45 +0800206FuncTy_21_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien3f71e702012-02-17 18:45:27 +0800207FuncTy_21_args.push_back(PointerTy_1);
Logan Chien3f71e702012-02-17 18:45:27 +0800208FunctionType* FuncTy_21 = FunctionType::get(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800209 /*Result=*/IntegerType::get(mod->getContext(), 64),
Logan Chiena6b2ca62012-03-06 15:50:54 +0800210 /*Params=*/FuncTy_21_args,
Logan Chien3f71e702012-02-17 18:45:27 +0800211 /*isVarArg=*/false);
212
Logan Chien3b2b2e72012-03-06 16:11:45 +0800213std::vector<Type*>FuncTy_22_args;
214FuncTy_22_args.push_back(IntegerType::get(mod->getContext(), 32));
215FuncTy_22_args.push_back(PointerTy_1);
216FuncTy_22_args.push_back(PointerTy_1);
Logan Chien9e5f5c12012-04-10 13:51:45 +0800217FuncTy_22_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien3b2b2e72012-03-06 16:11:45 +0800218FunctionType* FuncTy_22 = FunctionType::get(
219 /*Result=*/IntegerType::get(mod->getContext(), 32),
220 /*Params=*/FuncTy_22_args,
221 /*isVarArg=*/false);
222
223std::vector<Type*>FuncTy_23_args;
224FuncTy_23_args.push_back(IntegerType::get(mod->getContext(), 32));
225FuncTy_23_args.push_back(PointerTy_1);
226FuncTy_23_args.push_back(PointerTy_1);
Logan Chien9e5f5c12012-04-10 13:51:45 +0800227FuncTy_23_args.push_back(IntegerType::get(mod->getContext(), 64));
Logan Chien3b2b2e72012-03-06 16:11:45 +0800228FunctionType* FuncTy_23 = FunctionType::get(
Logan Chien1b0a1b72012-03-15 06:20:17 +0800229 /*Result=*/IntegerType::get(mod->getContext(), 32),
Logan Chien3b2b2e72012-03-06 16:11:45 +0800230 /*Params=*/FuncTy_23_args,
231 /*isVarArg=*/false);
232
233std::vector<Type*>FuncTy_24_args;
234FuncTy_24_args.push_back(IntegerType::get(mod->getContext(), 32));
235FuncTy_24_args.push_back(PointerTy_1);
236FuncTy_24_args.push_back(PointerTy_1);
Logan Chien9e5f5c12012-04-10 13:51:45 +0800237FuncTy_24_args.push_back(PointerTy_1);
Logan Chien3b2b2e72012-03-06 16:11:45 +0800238FunctionType* FuncTy_24 = FunctionType::get(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800239 /*Result=*/IntegerType::get(mod->getContext(), 32),
Logan Chien3b2b2e72012-03-06 16:11:45 +0800240 /*Params=*/FuncTy_24_args,
241 /*isVarArg=*/false);
242
243std::vector<Type*>FuncTy_25_args;
Logan Chien9e5f5c12012-04-10 13:51:45 +0800244FuncTy_25_args.push_back(IntegerType::get(mod->getContext(), 32));
Logan Chien3b2b2e72012-03-06 16:11:45 +0800245FuncTy_25_args.push_back(PointerTy_1);
246FuncTy_25_args.push_back(PointerTy_1);
247FunctionType* FuncTy_25 = FunctionType::get(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800248 /*Result=*/IntegerType::get(mod->getContext(), 64),
Logan Chien3b2b2e72012-03-06 16:11:45 +0800249 /*Params=*/FuncTy_25_args,
250 /*isVarArg=*/false);
251
252std::vector<Type*>FuncTy_26_args;
253FuncTy_26_args.push_back(PointerTy_1);
254FuncTy_26_args.push_back(PointerTy_1);
255FunctionType* FuncTy_26 = FunctionType::get(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800256 /*Result=*/PointerTy_1,
Logan Chien3b2b2e72012-03-06 16:11:45 +0800257 /*Params=*/FuncTy_26_args,
258 /*isVarArg=*/false);
259
TDYa12728f1a142012-03-15 21:51:52 -0700260std::vector<Type*>FuncTy_27_args;
261FuncTy_27_args.push_back(PointerTy_1);
262FuncTy_27_args.push_back(PointerTy_1);
263FunctionType* FuncTy_27 = FunctionType::get(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800264 /*Result=*/IntegerType::get(mod->getContext(), 32),
TDYa12728f1a142012-03-15 21:51:52 -0700265 /*Params=*/FuncTy_27_args,
266 /*isVarArg=*/false);
267
TDYa12785321912012-04-01 15:24:56 -0700268std::vector<Type*>FuncTy_28_args;
269FuncTy_28_args.push_back(PointerTy_1);
270FuncTy_28_args.push_back(PointerTy_1);
TDYa12785321912012-04-01 15:24:56 -0700271FunctionType* FuncTy_28 = FunctionType::get(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800272 /*Result=*/Type::getVoidTy(mod->getContext()),
TDYa12785321912012-04-01 15:24:56 -0700273 /*Params=*/FuncTy_28_args,
274 /*isVarArg=*/false);
275
TDYa1270b686e52012-04-09 22:43:35 -0700276std::vector<Type*>FuncTy_29_args;
277FuncTy_29_args.push_back(PointerTy_1);
Logan Chien9e5f5c12012-04-10 13:51:45 +0800278FuncTy_29_args.push_back(PointerTy_1);
279FuncTy_29_args.push_back(IntegerType::get(mod->getContext(), 32));
280FuncTy_29_args.push_back(IntegerType::get(mod->getContext(), 1));
TDYa1270b686e52012-04-09 22:43:35 -0700281FunctionType* FuncTy_29 = FunctionType::get(
282 /*Result=*/PointerTy_1,
283 /*Params=*/FuncTy_29_args,
284 /*isVarArg=*/false);
285
Logan Chien9e5f5c12012-04-10 13:51:45 +0800286std::vector<Type*>FuncTy_30_args;
287FuncTy_30_args.push_back(PointerTy_1);
288FunctionType* FuncTy_30 = FunctionType::get(
289 /*Result=*/PointerTy_1,
290 /*Params=*/FuncTy_30_args,
291 /*isVarArg=*/false);
292
Logan Chien42e0e152012-01-13 15:42:36 +0800293
294// Function Declarations
295
296Function* func___art_type_list = mod->getFunction("__art_type_list");
297if (!func___art_type_list) {
298func___art_type_list = Function::Create(
299 /*Type=*/FuncTy_0,
300 /*Linkage=*/GlobalValue::ExternalLinkage,
301 /*Name=*/"__art_type_list", mod); // (external, no body)
302func___art_type_list->setCallingConv(CallingConv::C);
303}
304AttrListPtr func___art_type_list_PAL;
305func___art_type_list->setAttributes(func___art_type_list_PAL);
306
307Function* func_art_get_current_thread_from_code = mod->getFunction("art_get_current_thread_from_code");
308if (!func_art_get_current_thread_from_code) {
309func_art_get_current_thread_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800310 /*Type=*/FuncTy_3,
Logan Chien42e0e152012-01-13 15:42:36 +0800311 /*Linkage=*/GlobalValue::ExternalLinkage,
312 /*Name=*/"art_get_current_thread_from_code", mod); // (external, no body)
313func_art_get_current_thread_from_code->setCallingConv(CallingConv::C);
314}
315AttrListPtr func_art_get_current_thread_from_code_PAL;
316func_art_get_current_thread_from_code->setAttributes(func_art_get_current_thread_from_code_PAL);
317
318Function* func_art_set_current_thread_from_code = mod->getFunction("art_set_current_thread_from_code");
319if (!func_art_set_current_thread_from_code) {
320func_art_set_current_thread_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800321 /*Type=*/FuncTy_4,
Logan Chien42e0e152012-01-13 15:42:36 +0800322 /*Linkage=*/GlobalValue::ExternalLinkage,
323 /*Name=*/"art_set_current_thread_from_code", mod); // (external, no body)
324func_art_set_current_thread_from_code->setCallingConv(CallingConv::C);
325}
326AttrListPtr func_art_set_current_thread_from_code_PAL;
327func_art_set_current_thread_from_code->setAttributes(func_art_set_current_thread_from_code_PAL);
328
329Function* func_art_lock_object_from_code = mod->getFunction("art_lock_object_from_code");
330if (!func_art_lock_object_from_code) {
331func_art_lock_object_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800332 /*Type=*/FuncTy_4,
Logan Chien42e0e152012-01-13 15:42:36 +0800333 /*Linkage=*/GlobalValue::ExternalLinkage,
334 /*Name=*/"art_lock_object_from_code", mod); // (external, no body)
335func_art_lock_object_from_code->setCallingConv(CallingConv::C);
336}
337AttrListPtr func_art_lock_object_from_code_PAL;
338func_art_lock_object_from_code->setAttributes(func_art_lock_object_from_code_PAL);
339
340Function* func_art_unlock_object_from_code = mod->getFunction("art_unlock_object_from_code");
341if (!func_art_unlock_object_from_code) {
342func_art_unlock_object_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800343 /*Type=*/FuncTy_4,
Logan Chien42e0e152012-01-13 15:42:36 +0800344 /*Linkage=*/GlobalValue::ExternalLinkage,
345 /*Name=*/"art_unlock_object_from_code", mod); // (external, no body)
346func_art_unlock_object_from_code->setCallingConv(CallingConv::C);
347}
348AttrListPtr func_art_unlock_object_from_code_PAL;
349func_art_unlock_object_from_code->setAttributes(func_art_unlock_object_from_code_PAL);
350
351Function* func_art_test_suspend_from_code = mod->getFunction("art_test_suspend_from_code");
352if (!func_art_test_suspend_from_code) {
353func_art_test_suspend_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800354 /*Type=*/FuncTy_5,
Logan Chien42e0e152012-01-13 15:42:36 +0800355 /*Linkage=*/GlobalValue::ExternalLinkage,
356 /*Name=*/"art_test_suspend_from_code", mod); // (external, no body)
357func_art_test_suspend_from_code->setCallingConv(CallingConv::C);
358}
359AttrListPtr func_art_test_suspend_from_code_PAL;
360func_art_test_suspend_from_code->setAttributes(func_art_test_suspend_from_code_PAL);
361
Logan Chien3f71e702012-02-17 18:45:27 +0800362Function* func_art_push_shadow_frame_from_code = mod->getFunction("art_push_shadow_frame_from_code");
363if (!func_art_push_shadow_frame_from_code) {
364func_art_push_shadow_frame_from_code = Function::Create(
365 /*Type=*/FuncTy_6,
366 /*Linkage=*/GlobalValue::ExternalLinkage,
367 /*Name=*/"art_push_shadow_frame_from_code", mod); // (external, no body)
368func_art_push_shadow_frame_from_code->setCallingConv(CallingConv::C);
369}
370AttrListPtr func_art_push_shadow_frame_from_code_PAL;
371func_art_push_shadow_frame_from_code->setAttributes(func_art_push_shadow_frame_from_code_PAL);
372
373Function* func_art_pop_shadow_frame_from_code = mod->getFunction("art_pop_shadow_frame_from_code");
374if (!func_art_pop_shadow_frame_from_code) {
375func_art_pop_shadow_frame_from_code = Function::Create(
376 /*Type=*/FuncTy_5,
377 /*Linkage=*/GlobalValue::ExternalLinkage,
378 /*Name=*/"art_pop_shadow_frame_from_code", mod); // (external, no body)
379func_art_pop_shadow_frame_from_code->setCallingConv(CallingConv::C);
380}
381AttrListPtr func_art_pop_shadow_frame_from_code_PAL;
382func_art_pop_shadow_frame_from_code->setAttributes(func_art_pop_shadow_frame_from_code_PAL);
383
Logan Chien42e0e152012-01-13 15:42:36 +0800384Function* func_art_is_exception_pending_from_code = mod->getFunction("art_is_exception_pending_from_code");
385if (!func_art_is_exception_pending_from_code) {
386func_art_is_exception_pending_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800387 /*Type=*/FuncTy_7,
Logan Chien42e0e152012-01-13 15:42:36 +0800388 /*Linkage=*/GlobalValue::ExternalLinkage,
389 /*Name=*/"art_is_exception_pending_from_code", mod); // (external, no body)
390func_art_is_exception_pending_from_code->setCallingConv(CallingConv::C);
391}
392AttrListPtr func_art_is_exception_pending_from_code_PAL;
393func_art_is_exception_pending_from_code->setAttributes(func_art_is_exception_pending_from_code_PAL);
394
395Function* func_art_throw_div_zero_from_code = mod->getFunction("art_throw_div_zero_from_code");
396if (!func_art_throw_div_zero_from_code) {
397func_art_throw_div_zero_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800398 /*Type=*/FuncTy_5,
Logan Chien42e0e152012-01-13 15:42:36 +0800399 /*Linkage=*/GlobalValue::ExternalLinkage,
400 /*Name=*/"art_throw_div_zero_from_code", mod); // (external, no body)
401func_art_throw_div_zero_from_code->setCallingConv(CallingConv::C);
402}
403AttrListPtr func_art_throw_div_zero_from_code_PAL;
404func_art_throw_div_zero_from_code->setAttributes(func_art_throw_div_zero_from_code_PAL);
405
406Function* func_art_throw_array_bounds_from_code = mod->getFunction("art_throw_array_bounds_from_code");
407if (!func_art_throw_array_bounds_from_code) {
408func_art_throw_array_bounds_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800409 /*Type=*/FuncTy_8,
Logan Chien42e0e152012-01-13 15:42:36 +0800410 /*Linkage=*/GlobalValue::ExternalLinkage,
411 /*Name=*/"art_throw_array_bounds_from_code", mod); // (external, no body)
412func_art_throw_array_bounds_from_code->setCallingConv(CallingConv::C);
413}
414AttrListPtr func_art_throw_array_bounds_from_code_PAL;
415func_art_throw_array_bounds_from_code->setAttributes(func_art_throw_array_bounds_from_code_PAL);
416
417Function* func_art_throw_no_such_method_from_code = mod->getFunction("art_throw_no_such_method_from_code");
418if (!func_art_throw_no_such_method_from_code) {
419func_art_throw_no_such_method_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800420 /*Type=*/FuncTy_9,
Logan Chien42e0e152012-01-13 15:42:36 +0800421 /*Linkage=*/GlobalValue::ExternalLinkage,
422 /*Name=*/"art_throw_no_such_method_from_code", mod); // (external, no body)
423func_art_throw_no_such_method_from_code->setCallingConv(CallingConv::C);
424}
425AttrListPtr func_art_throw_no_such_method_from_code_PAL;
426func_art_throw_no_such_method_from_code->setAttributes(func_art_throw_no_such_method_from_code_PAL);
427
428Function* func_art_throw_null_pointer_exception_from_code = mod->getFunction("art_throw_null_pointer_exception_from_code");
429if (!func_art_throw_null_pointer_exception_from_code) {
430func_art_throw_null_pointer_exception_from_code = Function::Create(
TDYa1273f9137d2012-04-08 15:59:19 -0700431 /*Type=*/FuncTy_9,
Logan Chien42e0e152012-01-13 15:42:36 +0800432 /*Linkage=*/GlobalValue::ExternalLinkage,
433 /*Name=*/"art_throw_null_pointer_exception_from_code", mod); // (external, no body)
434func_art_throw_null_pointer_exception_from_code->setCallingConv(CallingConv::C);
435}
436AttrListPtr func_art_throw_null_pointer_exception_from_code_PAL;
437func_art_throw_null_pointer_exception_from_code->setAttributes(func_art_throw_null_pointer_exception_from_code_PAL);
438
439Function* func_art_throw_stack_overflow_from_code = mod->getFunction("art_throw_stack_overflow_from_code");
440if (!func_art_throw_stack_overflow_from_code) {
441func_art_throw_stack_overflow_from_code = Function::Create(
TDYa1274165a832012-04-03 17:47:16 -0700442 /*Type=*/FuncTy_5,
Logan Chien42e0e152012-01-13 15:42:36 +0800443 /*Linkage=*/GlobalValue::ExternalLinkage,
444 /*Name=*/"art_throw_stack_overflow_from_code", mod); // (external, no body)
445func_art_throw_stack_overflow_from_code->setCallingConv(CallingConv::C);
446}
447AttrListPtr func_art_throw_stack_overflow_from_code_PAL;
448func_art_throw_stack_overflow_from_code->setAttributes(func_art_throw_stack_overflow_from_code_PAL);
449
450Function* func_art_throw_exception_from_code = mod->getFunction("art_throw_exception_from_code");
451if (!func_art_throw_exception_from_code) {
452func_art_throw_exception_from_code = Function::Create(
Logan Chien3f71e702012-02-17 18:45:27 +0800453 /*Type=*/FuncTy_4,
Logan Chien42e0e152012-01-13 15:42:36 +0800454 /*Linkage=*/GlobalValue::ExternalLinkage,
455 /*Name=*/"art_throw_exception_from_code", mod); // (external, no body)
456func_art_throw_exception_from_code->setCallingConv(CallingConv::C);
457}
458AttrListPtr func_art_throw_exception_from_code_PAL;
459func_art_throw_exception_from_code->setAttributes(func_art_throw_exception_from_code_PAL);
460
Logan Chien9e5f5c12012-04-10 13:51:45 +0800461Function* func_art_throw_verification_error_from_code = mod->getFunction("art_throw_verification_error_from_code");
462if (!func_art_throw_verification_error_from_code) {
463func_art_throw_verification_error_from_code = Function::Create(
464 /*Type=*/FuncTy_10,
465 /*Linkage=*/GlobalValue::ExternalLinkage,
466 /*Name=*/"art_throw_verification_error_from_code", mod); // (external, no body)
467func_art_throw_verification_error_from_code->setCallingConv(CallingConv::C);
468}
469AttrListPtr func_art_throw_verification_error_from_code_PAL;
470func_art_throw_verification_error_from_code->setAttributes(func_art_throw_verification_error_from_code_PAL);
471
Logan Chien42e0e152012-01-13 15:42:36 +0800472Function* func_art_find_catch_block_from_code = mod->getFunction("art_find_catch_block_from_code");
473if (!func_art_find_catch_block_from_code) {
474func_art_find_catch_block_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800475 /*Type=*/FuncTy_11,
Logan Chien42e0e152012-01-13 15:42:36 +0800476 /*Linkage=*/GlobalValue::ExternalLinkage,
477 /*Name=*/"art_find_catch_block_from_code", mod); // (external, no body)
478func_art_find_catch_block_from_code->setCallingConv(CallingConv::C);
479}
480AttrListPtr func_art_find_catch_block_from_code_PAL;
481func_art_find_catch_block_from_code->setAttributes(func_art_find_catch_block_from_code_PAL);
482
483Function* func_art_alloc_object_from_code = mod->getFunction("art_alloc_object_from_code");
484if (!func_art_alloc_object_from_code) {
485func_art_alloc_object_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800486 /*Type=*/FuncTy_12,
Logan Chien42e0e152012-01-13 15:42:36 +0800487 /*Linkage=*/GlobalValue::ExternalLinkage,
488 /*Name=*/"art_alloc_object_from_code", mod); // (external, no body)
489func_art_alloc_object_from_code->setCallingConv(CallingConv::C);
490}
491AttrListPtr func_art_alloc_object_from_code_PAL;
492func_art_alloc_object_from_code->setAttributes(func_art_alloc_object_from_code_PAL);
493
494Function* func_art_alloc_object_from_code_with_access_check = mod->getFunction("art_alloc_object_from_code_with_access_check");
495if (!func_art_alloc_object_from_code_with_access_check) {
496func_art_alloc_object_from_code_with_access_check = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800497 /*Type=*/FuncTy_12,
Logan Chien42e0e152012-01-13 15:42:36 +0800498 /*Linkage=*/GlobalValue::ExternalLinkage,
499 /*Name=*/"art_alloc_object_from_code_with_access_check", mod); // (external, no body)
500func_art_alloc_object_from_code_with_access_check->setCallingConv(CallingConv::C);
501}
502AttrListPtr func_art_alloc_object_from_code_with_access_check_PAL;
503func_art_alloc_object_from_code_with_access_check->setAttributes(func_art_alloc_object_from_code_with_access_check_PAL);
504
505Function* func_art_alloc_array_from_code = mod->getFunction("art_alloc_array_from_code");
506if (!func_art_alloc_array_from_code) {
507func_art_alloc_array_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800508 /*Type=*/FuncTy_13,
Logan Chien42e0e152012-01-13 15:42:36 +0800509 /*Linkage=*/GlobalValue::ExternalLinkage,
510 /*Name=*/"art_alloc_array_from_code", mod); // (external, no body)
511func_art_alloc_array_from_code->setCallingConv(CallingConv::C);
512}
513AttrListPtr func_art_alloc_array_from_code_PAL;
514func_art_alloc_array_from_code->setAttributes(func_art_alloc_array_from_code_PAL);
515
516Function* func_art_alloc_array_from_code_with_access_check = mod->getFunction("art_alloc_array_from_code_with_access_check");
517if (!func_art_alloc_array_from_code_with_access_check) {
518func_art_alloc_array_from_code_with_access_check = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800519 /*Type=*/FuncTy_13,
Logan Chien42e0e152012-01-13 15:42:36 +0800520 /*Linkage=*/GlobalValue::ExternalLinkage,
521 /*Name=*/"art_alloc_array_from_code_with_access_check", mod); // (external, no body)
522func_art_alloc_array_from_code_with_access_check->setCallingConv(CallingConv::C);
523}
524AttrListPtr func_art_alloc_array_from_code_with_access_check_PAL;
525func_art_alloc_array_from_code_with_access_check->setAttributes(func_art_alloc_array_from_code_with_access_check_PAL);
526
527Function* func_art_check_and_alloc_array_from_code = mod->getFunction("art_check_and_alloc_array_from_code");
528if (!func_art_check_and_alloc_array_from_code) {
529func_art_check_and_alloc_array_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800530 /*Type=*/FuncTy_13,
Logan Chien42e0e152012-01-13 15:42:36 +0800531 /*Linkage=*/GlobalValue::ExternalLinkage,
532 /*Name=*/"art_check_and_alloc_array_from_code", mod); // (external, no body)
533func_art_check_and_alloc_array_from_code->setCallingConv(CallingConv::C);
534}
535AttrListPtr func_art_check_and_alloc_array_from_code_PAL;
536func_art_check_and_alloc_array_from_code->setAttributes(func_art_check_and_alloc_array_from_code_PAL);
537
538Function* func_art_check_and_alloc_array_from_code_with_access_check = mod->getFunction("art_check_and_alloc_array_from_code_with_access_check");
539if (!func_art_check_and_alloc_array_from_code_with_access_check) {
540func_art_check_and_alloc_array_from_code_with_access_check = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800541 /*Type=*/FuncTy_13,
Logan Chien42e0e152012-01-13 15:42:36 +0800542 /*Linkage=*/GlobalValue::ExternalLinkage,
543 /*Name=*/"art_check_and_alloc_array_from_code_with_access_check", mod); // (external, no body)
544func_art_check_and_alloc_array_from_code_with_access_check->setCallingConv(CallingConv::C);
545}
546AttrListPtr func_art_check_and_alloc_array_from_code_with_access_check_PAL;
547func_art_check_and_alloc_array_from_code_with_access_check->setAttributes(func_art_check_and_alloc_array_from_code_with_access_check_PAL);
548
Logan Chien42e0e152012-01-13 15:42:36 +0800549Function* func_art_find_instance_field_from_code = mod->getFunction("art_find_instance_field_from_code");
550if (!func_art_find_instance_field_from_code) {
551func_art_find_instance_field_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800552 /*Type=*/FuncTy_14,
Logan Chien42e0e152012-01-13 15:42:36 +0800553 /*Linkage=*/GlobalValue::ExternalLinkage,
554 /*Name=*/"art_find_instance_field_from_code", mod); // (external, no body)
555func_art_find_instance_field_from_code->setCallingConv(CallingConv::C);
556}
557AttrListPtr func_art_find_instance_field_from_code_PAL;
558func_art_find_instance_field_from_code->setAttributes(func_art_find_instance_field_from_code_PAL);
559
560Function* func_art_find_static_field_from_code = mod->getFunction("art_find_static_field_from_code");
561if (!func_art_find_static_field_from_code) {
562func_art_find_static_field_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800563 /*Type=*/FuncTy_14,
Logan Chien42e0e152012-01-13 15:42:36 +0800564 /*Linkage=*/GlobalValue::ExternalLinkage,
565 /*Name=*/"art_find_static_field_from_code", mod); // (external, no body)
566func_art_find_static_field_from_code->setCallingConv(CallingConv::C);
567}
568AttrListPtr func_art_find_static_field_from_code_PAL;
569func_art_find_static_field_from_code->setAttributes(func_art_find_static_field_from_code_PAL);
570
571Function* func_art_find_interface_method_from_code = mod->getFunction("art_find_interface_method_from_code");
572if (!func_art_find_interface_method_from_code) {
573func_art_find_interface_method_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800574 /*Type=*/FuncTy_15,
Logan Chien42e0e152012-01-13 15:42:36 +0800575 /*Linkage=*/GlobalValue::ExternalLinkage,
576 /*Name=*/"art_find_interface_method_from_code", mod); // (external, no body)
577func_art_find_interface_method_from_code->setCallingConv(CallingConv::C);
578}
579AttrListPtr func_art_find_interface_method_from_code_PAL;
580func_art_find_interface_method_from_code->setAttributes(func_art_find_interface_method_from_code_PAL);
581
Shih-wei Liao399ed3f2012-03-08 01:27:04 -0800582Function* func_art_find_virtual_method_from_code = mod->getFunction("art_find_virtual_method_from_code");
583if (!func_art_find_virtual_method_from_code) {
584func_art_find_virtual_method_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800585 /*Type=*/FuncTy_15,
Shih-wei Liao399ed3f2012-03-08 01:27:04 -0800586 /*Linkage=*/GlobalValue::ExternalLinkage,
587 /*Name=*/"art_find_virtual_method_from_code", mod); // (external, no body)
588func_art_find_virtual_method_from_code->setCallingConv(CallingConv::C);
589}
590AttrListPtr func_art_find_virtual_method_from_code_PAL;
591func_art_find_virtual_method_from_code->setAttributes(func_art_find_virtual_method_from_code_PAL);
592
593Function* func_art_find_super_method_from_code = mod->getFunction("art_find_super_method_from_code");
594if (!func_art_find_super_method_from_code) {
595func_art_find_super_method_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800596 /*Type=*/FuncTy_15,
Shih-wei Liao399ed3f2012-03-08 01:27:04 -0800597 /*Linkage=*/GlobalValue::ExternalLinkage,
598 /*Name=*/"art_find_super_method_from_code", mod); // (external, no body)
599func_art_find_super_method_from_code->setCallingConv(CallingConv::C);
600}
601AttrListPtr func_art_find_super_method_from_code_PAL;
602func_art_find_super_method_from_code->setAttributes(func_art_find_super_method_from_code_PAL);
603
Logan Chien42e0e152012-01-13 15:42:36 +0800604Function* func_art_initialize_static_storage_from_code = mod->getFunction("art_initialize_static_storage_from_code");
605if (!func_art_initialize_static_storage_from_code) {
606func_art_initialize_static_storage_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800607 /*Type=*/FuncTy_12,
Logan Chien42e0e152012-01-13 15:42:36 +0800608 /*Linkage=*/GlobalValue::ExternalLinkage,
609 /*Name=*/"art_initialize_static_storage_from_code", mod); // (external, no body)
610func_art_initialize_static_storage_from_code->setCallingConv(CallingConv::C);
611}
612AttrListPtr func_art_initialize_static_storage_from_code_PAL;
613func_art_initialize_static_storage_from_code->setAttributes(func_art_initialize_static_storage_from_code_PAL);
614
615Function* func_art_initialize_type_from_code = mod->getFunction("art_initialize_type_from_code");
616if (!func_art_initialize_type_from_code) {
617func_art_initialize_type_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800618 /*Type=*/FuncTy_12,
Logan Chien42e0e152012-01-13 15:42:36 +0800619 /*Linkage=*/GlobalValue::ExternalLinkage,
620 /*Name=*/"art_initialize_type_from_code", mod); // (external, no body)
621func_art_initialize_type_from_code->setCallingConv(CallingConv::C);
622}
623AttrListPtr func_art_initialize_type_from_code_PAL;
624func_art_initialize_type_from_code->setAttributes(func_art_initialize_type_from_code_PAL);
625
626Function* func_art_initialize_type_and_verify_access_from_code = mod->getFunction("art_initialize_type_and_verify_access_from_code");
627if (!func_art_initialize_type_and_verify_access_from_code) {
628func_art_initialize_type_and_verify_access_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800629 /*Type=*/FuncTy_12,
Logan Chien42e0e152012-01-13 15:42:36 +0800630 /*Linkage=*/GlobalValue::ExternalLinkage,
631 /*Name=*/"art_initialize_type_and_verify_access_from_code", mod); // (external, no body)
632func_art_initialize_type_and_verify_access_from_code->setCallingConv(CallingConv::C);
633}
634AttrListPtr func_art_initialize_type_and_verify_access_from_code_PAL;
635func_art_initialize_type_and_verify_access_from_code->setAttributes(func_art_initialize_type_and_verify_access_from_code_PAL);
636
637Function* func_art_resolve_string_from_code = mod->getFunction("art_resolve_string_from_code");
638if (!func_art_resolve_string_from_code) {
639func_art_resolve_string_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800640 /*Type=*/FuncTy_16,
Logan Chien42e0e152012-01-13 15:42:36 +0800641 /*Linkage=*/GlobalValue::ExternalLinkage,
642 /*Name=*/"art_resolve_string_from_code", mod); // (external, no body)
643func_art_resolve_string_from_code->setCallingConv(CallingConv::C);
644}
645AttrListPtr func_art_resolve_string_from_code_PAL;
646func_art_resolve_string_from_code->setAttributes(func_art_resolve_string_from_code_PAL);
647
Logan Chien42e0e152012-01-13 15:42:36 +0800648Function* func_art_set32_static_from_code = mod->getFunction("art_set32_static_from_code");
649if (!func_art_set32_static_from_code) {
650func_art_set32_static_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800651 /*Type=*/FuncTy_17,
Logan Chien42e0e152012-01-13 15:42:36 +0800652 /*Linkage=*/GlobalValue::ExternalLinkage,
653 /*Name=*/"art_set32_static_from_code", mod); // (external, no body)
654func_art_set32_static_from_code->setCallingConv(CallingConv::C);
655}
656AttrListPtr func_art_set32_static_from_code_PAL;
657func_art_set32_static_from_code->setAttributes(func_art_set32_static_from_code_PAL);
658
659Function* func_art_set64_static_from_code = mod->getFunction("art_set64_static_from_code");
660if (!func_art_set64_static_from_code) {
661func_art_set64_static_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800662 /*Type=*/FuncTy_18,
Logan Chien42e0e152012-01-13 15:42:36 +0800663 /*Linkage=*/GlobalValue::ExternalLinkage,
664 /*Name=*/"art_set64_static_from_code", mod); // (external, no body)
665func_art_set64_static_from_code->setCallingConv(CallingConv::C);
666}
667AttrListPtr func_art_set64_static_from_code_PAL;
668func_art_set64_static_from_code->setAttributes(func_art_set64_static_from_code_PAL);
669
670Function* func_art_set_obj_static_from_code = mod->getFunction("art_set_obj_static_from_code");
671if (!func_art_set_obj_static_from_code) {
672func_art_set_obj_static_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800673 /*Type=*/FuncTy_19,
Logan Chien42e0e152012-01-13 15:42:36 +0800674 /*Linkage=*/GlobalValue::ExternalLinkage,
675 /*Name=*/"art_set_obj_static_from_code", mod); // (external, no body)
676func_art_set_obj_static_from_code->setCallingConv(CallingConv::C);
677}
678AttrListPtr func_art_set_obj_static_from_code_PAL;
679func_art_set_obj_static_from_code->setAttributes(func_art_set_obj_static_from_code_PAL);
680
681Function* func_art_get32_static_from_code = mod->getFunction("art_get32_static_from_code");
682if (!func_art_get32_static_from_code) {
683func_art_get32_static_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800684 /*Type=*/FuncTy_20,
Logan Chien42e0e152012-01-13 15:42:36 +0800685 /*Linkage=*/GlobalValue::ExternalLinkage,
686 /*Name=*/"art_get32_static_from_code", mod); // (external, no body)
687func_art_get32_static_from_code->setCallingConv(CallingConv::C);
688}
689AttrListPtr func_art_get32_static_from_code_PAL;
690func_art_get32_static_from_code->setAttributes(func_art_get32_static_from_code_PAL);
691
692Function* func_art_get64_static_from_code = mod->getFunction("art_get64_static_from_code");
693if (!func_art_get64_static_from_code) {
694func_art_get64_static_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800695 /*Type=*/FuncTy_21,
Logan Chien42e0e152012-01-13 15:42:36 +0800696 /*Linkage=*/GlobalValue::ExternalLinkage,
697 /*Name=*/"art_get64_static_from_code", mod); // (external, no body)
698func_art_get64_static_from_code->setCallingConv(CallingConv::C);
699}
700AttrListPtr func_art_get64_static_from_code_PAL;
701func_art_get64_static_from_code->setAttributes(func_art_get64_static_from_code_PAL);
702
703Function* func_art_get_obj_static_from_code = mod->getFunction("art_get_obj_static_from_code");
704if (!func_art_get_obj_static_from_code) {
705func_art_get_obj_static_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800706 /*Type=*/FuncTy_12,
Logan Chien42e0e152012-01-13 15:42:36 +0800707 /*Linkage=*/GlobalValue::ExternalLinkage,
708 /*Name=*/"art_get_obj_static_from_code", mod); // (external, no body)
709func_art_get_obj_static_from_code->setCallingConv(CallingConv::C);
710}
711AttrListPtr func_art_get_obj_static_from_code_PAL;
712func_art_get_obj_static_from_code->setAttributes(func_art_get_obj_static_from_code_PAL);
713
714Function* func_art_set32_instance_from_code = mod->getFunction("art_set32_instance_from_code");
715if (!func_art_set32_instance_from_code) {
716func_art_set32_instance_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800717 /*Type=*/FuncTy_22,
Logan Chien42e0e152012-01-13 15:42:36 +0800718 /*Linkage=*/GlobalValue::ExternalLinkage,
719 /*Name=*/"art_set32_instance_from_code", mod); // (external, no body)
720func_art_set32_instance_from_code->setCallingConv(CallingConv::C);
721}
722AttrListPtr func_art_set32_instance_from_code_PAL;
723func_art_set32_instance_from_code->setAttributes(func_art_set32_instance_from_code_PAL);
724
725Function* func_art_set64_instance_from_code = mod->getFunction("art_set64_instance_from_code");
726if (!func_art_set64_instance_from_code) {
727func_art_set64_instance_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800728 /*Type=*/FuncTy_23,
Logan Chien42e0e152012-01-13 15:42:36 +0800729 /*Linkage=*/GlobalValue::ExternalLinkage,
730 /*Name=*/"art_set64_instance_from_code", mod); // (external, no body)
731func_art_set64_instance_from_code->setCallingConv(CallingConv::C);
732}
733AttrListPtr func_art_set64_instance_from_code_PAL;
734func_art_set64_instance_from_code->setAttributes(func_art_set64_instance_from_code_PAL);
735
736Function* func_art_set_obj_instance_from_code = mod->getFunction("art_set_obj_instance_from_code");
737if (!func_art_set_obj_instance_from_code) {
738func_art_set_obj_instance_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800739 /*Type=*/FuncTy_24,
Logan Chien42e0e152012-01-13 15:42:36 +0800740 /*Linkage=*/GlobalValue::ExternalLinkage,
741 /*Name=*/"art_set_obj_instance_from_code", mod); // (external, no body)
742func_art_set_obj_instance_from_code->setCallingConv(CallingConv::C);
743}
744AttrListPtr func_art_set_obj_instance_from_code_PAL;
745func_art_set_obj_instance_from_code->setAttributes(func_art_set_obj_instance_from_code_PAL);
746
747Function* func_art_get32_instance_from_code = mod->getFunction("art_get32_instance_from_code");
748if (!func_art_get32_instance_from_code) {
749func_art_get32_instance_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800750 /*Type=*/FuncTy_19,
Logan Chien42e0e152012-01-13 15:42:36 +0800751 /*Linkage=*/GlobalValue::ExternalLinkage,
752 /*Name=*/"art_get32_instance_from_code", mod); // (external, no body)
753func_art_get32_instance_from_code->setCallingConv(CallingConv::C);
754}
755AttrListPtr func_art_get32_instance_from_code_PAL;
756func_art_get32_instance_from_code->setAttributes(func_art_get32_instance_from_code_PAL);
757
758Function* func_art_get64_instance_from_code = mod->getFunction("art_get64_instance_from_code");
759if (!func_art_get64_instance_from_code) {
760func_art_get64_instance_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800761 /*Type=*/FuncTy_25,
Logan Chien42e0e152012-01-13 15:42:36 +0800762 /*Linkage=*/GlobalValue::ExternalLinkage,
763 /*Name=*/"art_get64_instance_from_code", mod); // (external, no body)
764func_art_get64_instance_from_code->setCallingConv(CallingConv::C);
765}
766AttrListPtr func_art_get64_instance_from_code_PAL;
767func_art_get64_instance_from_code->setAttributes(func_art_get64_instance_from_code_PAL);
768
769Function* func_art_get_obj_instance_from_code = mod->getFunction("art_get_obj_instance_from_code");
770if (!func_art_get_obj_instance_from_code) {
771func_art_get_obj_instance_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800772 /*Type=*/FuncTy_15,
Logan Chien42e0e152012-01-13 15:42:36 +0800773 /*Linkage=*/GlobalValue::ExternalLinkage,
774 /*Name=*/"art_get_obj_instance_from_code", mod); // (external, no body)
775func_art_get_obj_instance_from_code->setCallingConv(CallingConv::C);
776}
777AttrListPtr func_art_get_obj_instance_from_code_PAL;
778func_art_get_obj_instance_from_code->setAttributes(func_art_get_obj_instance_from_code_PAL);
779
TDYa12728f1a142012-03-15 21:51:52 -0700780Function* func_art_decode_jobject_in_thread = mod->getFunction("art_decode_jobject_in_thread");
781if (!func_art_decode_jobject_in_thread) {
782func_art_decode_jobject_in_thread = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800783 /*Type=*/FuncTy_26,
TDYa12728f1a142012-03-15 21:51:52 -0700784 /*Linkage=*/GlobalValue::ExternalLinkage,
785 /*Name=*/"art_decode_jobject_in_thread", mod); // (external, no body)
786func_art_decode_jobject_in_thread->setCallingConv(CallingConv::C);
787}
788AttrListPtr func_art_decode_jobject_in_thread_PAL;
789func_art_decode_jobject_in_thread->setAttributes(func_art_decode_jobject_in_thread_PAL);
790
Logan Chien42e0e152012-01-13 15:42:36 +0800791Function* func_art_is_assignable_from_code = mod->getFunction("art_is_assignable_from_code");
792if (!func_art_is_assignable_from_code) {
793func_art_is_assignable_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800794 /*Type=*/FuncTy_27,
Logan Chien42e0e152012-01-13 15:42:36 +0800795 /*Linkage=*/GlobalValue::ExternalLinkage,
796 /*Name=*/"art_is_assignable_from_code", mod); // (external, no body)
797func_art_is_assignable_from_code->setCallingConv(CallingConv::C);
798}
799AttrListPtr func_art_is_assignable_from_code_PAL;
800func_art_is_assignable_from_code->setAttributes(func_art_is_assignable_from_code_PAL);
801
802Function* func_art_check_cast_from_code = mod->getFunction("art_check_cast_from_code");
803if (!func_art_check_cast_from_code) {
804func_art_check_cast_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800805 /*Type=*/FuncTy_28,
Logan Chien42e0e152012-01-13 15:42:36 +0800806 /*Linkage=*/GlobalValue::ExternalLinkage,
807 /*Name=*/"art_check_cast_from_code", mod); // (external, no body)
808func_art_check_cast_from_code->setCallingConv(CallingConv::C);
809}
810AttrListPtr func_art_check_cast_from_code_PAL;
811func_art_check_cast_from_code->setAttributes(func_art_check_cast_from_code_PAL);
812
TDYa1271b86d072012-04-05 17:38:56 -0700813Function* func_art_check_put_array_element_from_code = mod->getFunction("art_check_put_array_element_from_code");
814if (!func_art_check_put_array_element_from_code) {
815func_art_check_put_array_element_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800816 /*Type=*/FuncTy_28,
TDYa1271b86d072012-04-05 17:38:56 -0700817 /*Linkage=*/GlobalValue::ExternalLinkage,
818 /*Name=*/"art_check_put_array_element_from_code", mod); // (external, no body)
819func_art_check_put_array_element_from_code->setCallingConv(CallingConv::C);
820}
821AttrListPtr func_art_check_put_array_element_from_code_PAL;
822func_art_check_put_array_element_from_code->setAttributes(func_art_check_put_array_element_from_code_PAL);
823
TDYa12785321912012-04-01 15:24:56 -0700824Function* func_art_ensure_resolved_from_code = mod->getFunction("art_ensure_resolved_from_code");
825if (!func_art_ensure_resolved_from_code) {
826func_art_ensure_resolved_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800827 /*Type=*/FuncTy_29,
TDYa12785321912012-04-01 15:24:56 -0700828 /*Linkage=*/GlobalValue::ExternalLinkage,
829 /*Name=*/"art_ensure_resolved_from_code", mod); // (external, no body)
830func_art_ensure_resolved_from_code->setCallingConv(CallingConv::C);
831}
832AttrListPtr func_art_ensure_resolved_from_code_PAL;
833func_art_ensure_resolved_from_code->setAttributes(func_art_ensure_resolved_from_code_PAL);
834
TDYa1270b686e52012-04-09 22:43:35 -0700835Function* func_art_fix_stub_from_code = mod->getFunction("art_fix_stub_from_code");
836if (!func_art_fix_stub_from_code) {
837func_art_fix_stub_from_code = Function::Create(
Logan Chien9e5f5c12012-04-10 13:51:45 +0800838 /*Type=*/FuncTy_30,
TDYa12785321912012-04-01 15:24:56 -0700839 /*Linkage=*/GlobalValue::ExternalLinkage,
TDYa1270b686e52012-04-09 22:43:35 -0700840 /*Name=*/"art_fix_stub_from_code", mod); // (external, no body)
841func_art_fix_stub_from_code->setCallingConv(CallingConv::C);
TDYa12785321912012-04-01 15:24:56 -0700842}
TDYa1270b686e52012-04-09 22:43:35 -0700843AttrListPtr func_art_fix_stub_from_code_PAL;
844func_art_fix_stub_from_code->setAttributes(func_art_fix_stub_from_code_PAL);
TDYa12785321912012-04-01 15:24:56 -0700845
Logan Chien42e0e152012-01-13 15:42:36 +0800846// Global Variable Declarations
847
848
849// Constant Definitions
850
851// Global Variable Definitions
852
853// Function Definitions
854
855return mod;
856
857}
Logan Chiene75a8cc2012-02-24 12:26:43 +0800858
859} // namespace compiler_llvm
860} // namespace art