Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 1 | // Generated with tools/gen_art_module_cc.sh |
Logan Chien | e75a8cc | 2012-02-24 12:26:43 +0800 | [diff] [blame] | 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 | |
| 15 | using namespace llvm; |
| 16 | |
| 17 | namespace art { |
| 18 | namespace compiler_llvm { |
| 19 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 20 | |
| 21 | // Generated by llvm2cpp - DO NOT MODIFY! |
| 22 | |
| 23 | |
| 24 | Module* makeLLVMModuleContents(Module *mod) { |
| 25 | |
| 26 | mod->setModuleIdentifier("art_module.ll"); |
| 27 | |
| 28 | // Type Definitions |
| 29 | std::vector<Type*>FuncTy_0_args; |
| 30 | StructType *StructTy_JavaObject = mod->getTypeByName("JavaObject"); |
| 31 | if (!StructTy_JavaObject) { |
| 32 | StructTy_JavaObject = StructType::create(mod->getContext(), "JavaObject"); |
| 33 | } |
| 34 | std::vector<Type*>StructTy_JavaObject_fields; |
| 35 | if (StructTy_JavaObject->isOpaque()) { |
| 36 | StructTy_JavaObject->setBody(StructTy_JavaObject_fields, /*isPacked=*/false); |
| 37 | } |
| 38 | |
| 39 | PointerType* PointerTy_1 = PointerType::get(StructTy_JavaObject, 0); |
| 40 | |
| 41 | FuncTy_0_args.push_back(PointerTy_1); |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 42 | StructType *StructTy_ShadowFrame = mod->getTypeByName("ShadowFrame"); |
| 43 | if (!StructTy_ShadowFrame) { |
| 44 | StructTy_ShadowFrame = StructType::create(mod->getContext(), "ShadowFrame"); |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 45 | } |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 46 | std::vector<Type*>StructTy_ShadowFrame_fields; |
| 47 | PointerType* PointerTy_2 = PointerType::get(StructTy_ShadowFrame, 0); |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 48 | |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 49 | StructTy_ShadowFrame_fields.push_back(PointerTy_2); |
| 50 | StructTy_ShadowFrame_fields.push_back(PointerTy_1); |
| 51 | StructTy_ShadowFrame_fields.push_back(IntegerType::get(mod->getContext(), 32)); |
TDYa127 | 8532191 | 2012-04-01 15:24:56 -0700 | [diff] [blame] | 52 | StructTy_ShadowFrame_fields.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 53 | if (StructTy_ShadowFrame->isOpaque()) { |
| 54 | StructTy_ShadowFrame->setBody(StructTy_ShadowFrame_fields, /*isPacked=*/false); |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 55 | } |
| 56 | |
| 57 | |
| 58 | FuncTy_0_args.push_back(PointerTy_2); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 59 | FunctionType* FuncTy_0 = FunctionType::get( |
| 60 | /*Result=*/Type::getVoidTy(mod->getContext()), |
| 61 | /*Params=*/FuncTy_0_args, |
| 62 | /*isVarArg=*/false); |
| 63 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 64 | std::vector<Type*>FuncTy_3_args; |
| 65 | FunctionType* FuncTy_3 = FunctionType::get( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 66 | /*Result=*/PointerTy_1, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 67 | /*Params=*/FuncTy_3_args, |
| 68 | /*isVarArg=*/false); |
| 69 | |
| 70 | std::vector<Type*>FuncTy_4_args; |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 71 | FuncTy_4_args.push_back(PointerTy_1); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 72 | FunctionType* FuncTy_4 = FunctionType::get( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 73 | /*Result=*/Type::getVoidTy(mod->getContext()), |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 74 | /*Params=*/FuncTy_4_args, |
| 75 | /*isVarArg=*/false); |
| 76 | |
| 77 | std::vector<Type*>FuncTy_5_args; |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 78 | FuncTy_5_args.push_back(PointerTy_1); |
| 79 | FuncTy_5_args.push_back(PointerTy_1); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 80 | FunctionType* FuncTy_5 = FunctionType::get( |
| 81 | /*Result=*/Type::getVoidTy(mod->getContext()), |
| 82 | /*Params=*/FuncTy_5_args, |
| 83 | /*isVarArg=*/false); |
| 84 | |
| 85 | std::vector<Type*>FuncTy_6_args; |
TDYa127 | 853cd09 | 2012-04-21 22:15:31 -0700 | [diff] [blame^] | 86 | FuncTy_6_args.push_back(PointerTy_2); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 87 | FunctionType* FuncTy_6 = FunctionType::get( |
| 88 | /*Result=*/Type::getVoidTy(mod->getContext()), |
| 89 | /*Params=*/FuncTy_6_args, |
| 90 | /*isVarArg=*/false); |
| 91 | |
| 92 | std::vector<Type*>FuncTy_7_args; |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 93 | FunctionType* FuncTy_7 = FunctionType::get( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 94 | /*Result=*/Type::getVoidTy(mod->getContext()), |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 95 | /*Params=*/FuncTy_7_args, |
| 96 | /*isVarArg=*/false); |
| 97 | |
| 98 | std::vector<Type*>FuncTy_8_args; |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 99 | FunctionType* FuncTy_8 = FunctionType::get( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 100 | /*Result=*/IntegerType::get(mod->getContext(), 1), |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 101 | /*Params=*/FuncTy_8_args, |
| 102 | /*isVarArg=*/false); |
| 103 | |
| 104 | std::vector<Type*>FuncTy_9_args; |
| 105 | FuncTy_9_args.push_back(IntegerType::get(mod->getContext(), 32)); |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 106 | FuncTy_9_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 107 | FunctionType* FuncTy_9 = FunctionType::get( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 108 | /*Result=*/Type::getVoidTy(mod->getContext()), |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 109 | /*Params=*/FuncTy_9_args, |
| 110 | /*isVarArg=*/false); |
| 111 | |
| 112 | std::vector<Type*>FuncTy_10_args; |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 113 | FuncTy_10_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 114 | FunctionType* FuncTy_10 = FunctionType::get( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 115 | /*Result=*/Type::getVoidTy(mod->getContext()), |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 116 | /*Params=*/FuncTy_10_args, |
| 117 | /*isVarArg=*/false); |
| 118 | |
| 119 | std::vector<Type*>FuncTy_11_args; |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 120 | FuncTy_11_args.push_back(PointerTy_1); |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 121 | FuncTy_11_args.push_back(IntegerType::get(mod->getContext(), 32)); |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 122 | FuncTy_11_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 123 | FunctionType* FuncTy_11 = FunctionType::get( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 124 | /*Result=*/Type::getVoidTy(mod->getContext()), |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 125 | /*Params=*/FuncTy_11_args, |
| 126 | /*isVarArg=*/false); |
| 127 | |
| 128 | std::vector<Type*>FuncTy_12_args; |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 129 | FuncTy_12_args.push_back(PointerTy_1); |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 130 | FuncTy_12_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 131 | FunctionType* FuncTy_12 = FunctionType::get( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 132 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 133 | /*Params=*/FuncTy_12_args, |
| 134 | /*isVarArg=*/false); |
| 135 | |
| 136 | std::vector<Type*>FuncTy_13_args; |
| 137 | FuncTy_13_args.push_back(IntegerType::get(mod->getContext(), 32)); |
| 138 | FuncTy_13_args.push_back(PointerTy_1); |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 139 | FuncTy_13_args.push_back(PointerTy_1); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 140 | FunctionType* FuncTy_13 = FunctionType::get( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 141 | /*Result=*/PointerTy_1, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 142 | /*Params=*/FuncTy_13_args, |
| 143 | /*isVarArg=*/false); |
| 144 | |
| 145 | std::vector<Type*>FuncTy_14_args; |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 146 | FuncTy_14_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 147 | FuncTy_14_args.push_back(PointerTy_1); |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 148 | FuncTy_14_args.push_back(IntegerType::get(mod->getContext(), 32)); |
| 149 | FuncTy_14_args.push_back(PointerTy_1); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 150 | FunctionType* FuncTy_14 = FunctionType::get( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 151 | /*Result=*/PointerTy_1, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 152 | /*Params=*/FuncTy_14_args, |
| 153 | /*isVarArg=*/false); |
| 154 | |
| 155 | std::vector<Type*>FuncTy_15_args; |
| 156 | FuncTy_15_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 157 | FuncTy_15_args.push_back(PointerTy_1); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 158 | FunctionType* FuncTy_15 = FunctionType::get( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 159 | /*Result=*/Type::getVoidTy(mod->getContext()), |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 160 | /*Params=*/FuncTy_15_args, |
| 161 | /*isVarArg=*/false); |
| 162 | |
| 163 | std::vector<Type*>FuncTy_16_args; |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 164 | FuncTy_16_args.push_back(IntegerType::get(mod->getContext(), 32)); |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 165 | FuncTy_16_args.push_back(PointerTy_1); |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 166 | FuncTy_16_args.push_back(PointerTy_1); |
| 167 | FuncTy_16_args.push_back(PointerTy_1); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 168 | FunctionType* FuncTy_16 = FunctionType::get( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 169 | /*Result=*/PointerTy_1, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 170 | /*Params=*/FuncTy_16_args, |
| 171 | /*isVarArg=*/false); |
| 172 | |
| 173 | std::vector<Type*>FuncTy_17_args; |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 174 | FuncTy_17_args.push_back(PointerTy_1); |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 175 | FuncTy_17_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 176 | FunctionType* FuncTy_17 = FunctionType::get( |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 177 | /*Result=*/PointerTy_1, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 178 | /*Params=*/FuncTy_17_args, |
| 179 | /*isVarArg=*/false); |
| 180 | |
| 181 | std::vector<Type*>FuncTy_18_args; |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 182 | FuncTy_18_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 183 | FuncTy_18_args.push_back(PointerTy_1); |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 184 | FuncTy_18_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 185 | FunctionType* FuncTy_18 = FunctionType::get( |
| 186 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
| 187 | /*Params=*/FuncTy_18_args, |
| 188 | /*isVarArg=*/false); |
| 189 | |
| 190 | std::vector<Type*>FuncTy_19_args; |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 191 | FuncTy_19_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 192 | FuncTy_19_args.push_back(PointerTy_1); |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 193 | FuncTy_19_args.push_back(IntegerType::get(mod->getContext(), 64)); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 194 | FunctionType* FuncTy_19 = FunctionType::get( |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 195 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 196 | /*Params=*/FuncTy_19_args, |
| 197 | /*isVarArg=*/false); |
| 198 | |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 199 | std::vector<Type*>FuncTy_20_args; |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 200 | FuncTy_20_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | a6b2ca6 | 2012-03-06 15:50:54 +0800 | [diff] [blame] | 201 | FuncTy_20_args.push_back(PointerTy_1); |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 202 | FuncTy_20_args.push_back(PointerTy_1); |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 203 | FunctionType* FuncTy_20 = FunctionType::get( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 204 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 205 | /*Params=*/FuncTy_20_args, |
| 206 | /*isVarArg=*/false); |
| 207 | |
| 208 | std::vector<Type*>FuncTy_21_args; |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 209 | FuncTy_21_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 210 | FuncTy_21_args.push_back(PointerTy_1); |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 211 | FunctionType* FuncTy_21 = FunctionType::get( |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 212 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
Logan Chien | a6b2ca6 | 2012-03-06 15:50:54 +0800 | [diff] [blame] | 213 | /*Params=*/FuncTy_21_args, |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 214 | /*isVarArg=*/false); |
| 215 | |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 216 | std::vector<Type*>FuncTy_22_args; |
| 217 | FuncTy_22_args.push_back(IntegerType::get(mod->getContext(), 32)); |
| 218 | FuncTy_22_args.push_back(PointerTy_1); |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 219 | FunctionType* FuncTy_22 = FunctionType::get( |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 220 | /*Result=*/IntegerType::get(mod->getContext(), 64), |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 221 | /*Params=*/FuncTy_22_args, |
| 222 | /*isVarArg=*/false); |
| 223 | |
| 224 | std::vector<Type*>FuncTy_23_args; |
| 225 | FuncTy_23_args.push_back(IntegerType::get(mod->getContext(), 32)); |
| 226 | FuncTy_23_args.push_back(PointerTy_1); |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 227 | FunctionType* FuncTy_23 = FunctionType::get( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 228 | /*Result=*/PointerTy_1, |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 229 | /*Params=*/FuncTy_23_args, |
| 230 | /*isVarArg=*/false); |
| 231 | |
| 232 | std::vector<Type*>FuncTy_24_args; |
| 233 | FuncTy_24_args.push_back(IntegerType::get(mod->getContext(), 32)); |
| 234 | FuncTy_24_args.push_back(PointerTy_1); |
| 235 | FuncTy_24_args.push_back(PointerTy_1); |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 236 | FuncTy_24_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 237 | FunctionType* FuncTy_24 = FunctionType::get( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 238 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 239 | /*Params=*/FuncTy_24_args, |
| 240 | /*isVarArg=*/false); |
| 241 | |
| 242 | std::vector<Type*>FuncTy_25_args; |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 243 | FuncTy_25_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 244 | FuncTy_25_args.push_back(PointerTy_1); |
| 245 | FuncTy_25_args.push_back(PointerTy_1); |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 246 | FuncTy_25_args.push_back(IntegerType::get(mod->getContext(), 64)); |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 247 | FunctionType* FuncTy_25 = FunctionType::get( |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 248 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 249 | /*Params=*/FuncTy_25_args, |
| 250 | /*isVarArg=*/false); |
| 251 | |
| 252 | std::vector<Type*>FuncTy_26_args; |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 253 | FuncTy_26_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 254 | FuncTy_26_args.push_back(PointerTy_1); |
| 255 | FuncTy_26_args.push_back(PointerTy_1); |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 256 | FuncTy_26_args.push_back(PointerTy_1); |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 257 | FunctionType* FuncTy_26 = FunctionType::get( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 258 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 259 | /*Params=*/FuncTy_26_args, |
| 260 | /*isVarArg=*/false); |
| 261 | |
TDYa127 | 28f1a14 | 2012-03-15 21:51:52 -0700 | [diff] [blame] | 262 | std::vector<Type*>FuncTy_27_args; |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 263 | FuncTy_27_args.push_back(IntegerType::get(mod->getContext(), 32)); |
TDYa127 | 28f1a14 | 2012-03-15 21:51:52 -0700 | [diff] [blame] | 264 | FuncTy_27_args.push_back(PointerTy_1); |
| 265 | FuncTy_27_args.push_back(PointerTy_1); |
| 266 | FunctionType* FuncTy_27 = FunctionType::get( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 267 | /*Result=*/IntegerType::get(mod->getContext(), 64), |
TDYa127 | 28f1a14 | 2012-03-15 21:51:52 -0700 | [diff] [blame] | 268 | /*Params=*/FuncTy_27_args, |
| 269 | /*isVarArg=*/false); |
| 270 | |
TDYa127 | 8532191 | 2012-04-01 15:24:56 -0700 | [diff] [blame] | 271 | std::vector<Type*>FuncTy_28_args; |
| 272 | FuncTy_28_args.push_back(PointerTy_1); |
| 273 | FuncTy_28_args.push_back(PointerTy_1); |
TDYa127 | 8532191 | 2012-04-01 15:24:56 -0700 | [diff] [blame] | 274 | FunctionType* FuncTy_28 = FunctionType::get( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 275 | /*Result=*/PointerTy_1, |
TDYa127 | 8532191 | 2012-04-01 15:24:56 -0700 | [diff] [blame] | 276 | /*Params=*/FuncTy_28_args, |
| 277 | /*isVarArg=*/false); |
| 278 | |
TDYa127 | 0b686e5 | 2012-04-09 22:43:35 -0700 | [diff] [blame] | 279 | std::vector<Type*>FuncTy_29_args; |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 280 | FuncTy_29_args.push_back(PointerTy_1); |
| 281 | FuncTy_29_args.push_back(PointerTy_1); |
TDYa127 | 0b686e5 | 2012-04-09 22:43:35 -0700 | [diff] [blame] | 282 | FunctionType* FuncTy_29 = FunctionType::get( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 283 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
TDYa127 | 0b686e5 | 2012-04-09 22:43:35 -0700 | [diff] [blame] | 284 | /*Params=*/FuncTy_29_args, |
| 285 | /*isVarArg=*/false); |
| 286 | |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 287 | std::vector<Type*>FuncTy_30_args; |
TDYa127 | a474687 | 2012-04-11 23:48:55 -0700 | [diff] [blame] | 288 | FuncTy_30_args.push_back(Type::getDoubleTy(mod->getContext())); |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 289 | FunctionType* FuncTy_30 = FunctionType::get( |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 290 | /*Result=*/IntegerType::get(mod->getContext(), 64), |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 291 | /*Params=*/FuncTy_30_args, |
| 292 | /*isVarArg=*/false); |
| 293 | |
TDYa127 | 5bb8601 | 2012-04-11 05:57:28 -0700 | [diff] [blame] | 294 | std::vector<Type*>FuncTy_31_args; |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 295 | FuncTy_31_args.push_back(Type::getDoubleTy(mod->getContext())); |
TDYa127 | 5bb8601 | 2012-04-11 05:57:28 -0700 | [diff] [blame] | 296 | FunctionType* FuncTy_31 = FunctionType::get( |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 297 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
TDYa127 | 5bb8601 | 2012-04-11 05:57:28 -0700 | [diff] [blame] | 298 | /*Params=*/FuncTy_31_args, |
TDYa127 | a474687 | 2012-04-11 23:48:55 -0700 | [diff] [blame] | 299 | /*isVarArg=*/false); |
| 300 | |
| 301 | std::vector<Type*>FuncTy_32_args; |
| 302 | FuncTy_32_args.push_back(Type::getFloatTy(mod->getContext())); |
| 303 | FunctionType* FuncTy_32 = FunctionType::get( |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 304 | /*Result=*/IntegerType::get(mod->getContext(), 64), |
TDYa127 | a474687 | 2012-04-11 23:48:55 -0700 | [diff] [blame] | 305 | /*Params=*/FuncTy_32_args, |
| 306 | /*isVarArg=*/false); |
| 307 | |
| 308 | std::vector<Type*>FuncTy_33_args; |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 309 | FuncTy_33_args.push_back(Type::getFloatTy(mod->getContext())); |
TDYa127 | a474687 | 2012-04-11 23:48:55 -0700 | [diff] [blame] | 310 | FunctionType* FuncTy_33 = FunctionType::get( |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 311 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
TDYa127 | a474687 | 2012-04-11 23:48:55 -0700 | [diff] [blame] | 312 | /*Params=*/FuncTy_33_args, |
| 313 | /*isVarArg=*/false); |
| 314 | |
| 315 | std::vector<Type*>FuncTy_34_args; |
| 316 | FuncTy_34_args.push_back(PointerTy_1); |
| 317 | FunctionType* FuncTy_34 = FunctionType::get( |
| 318 | /*Result=*/PointerTy_1, |
| 319 | /*Params=*/FuncTy_34_args, |
| 320 | /*isVarArg=*/false); |
| 321 | |
| 322 | std::vector<Type*>FuncTy_35_args; |
| 323 | FuncTy_35_args.push_back(PointerTy_1); |
| 324 | FunctionType* FuncTy_35 = FunctionType::get( |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 325 | /*Result=*/Type::getVoidTy(mod->getContext()), |
TDYa127 | 05fe3b6 | 2012-04-21 00:28:54 -0700 | [diff] [blame] | 326 | /*Params=*/FuncTy_35_args, |
TDYa127 | 5bb8601 | 2012-04-11 05:57:28 -0700 | [diff] [blame] | 327 | /*isVarArg=*/true); |
| 328 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 329 | |
| 330 | // Function Declarations |
| 331 | |
| 332 | Function* func___art_type_list = mod->getFunction("__art_type_list"); |
| 333 | if (!func___art_type_list) { |
| 334 | func___art_type_list = Function::Create( |
| 335 | /*Type=*/FuncTy_0, |
| 336 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 337 | /*Name=*/"__art_type_list", mod); // (external, no body) |
| 338 | func___art_type_list->setCallingConv(CallingConv::C); |
| 339 | } |
| 340 | AttrListPtr func___art_type_list_PAL; |
| 341 | func___art_type_list->setAttributes(func___art_type_list_PAL); |
| 342 | |
| 343 | Function* func_art_get_current_thread_from_code = mod->getFunction("art_get_current_thread_from_code"); |
| 344 | if (!func_art_get_current_thread_from_code) { |
| 345 | func_art_get_current_thread_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 346 | /*Type=*/FuncTy_3, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 347 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 348 | /*Name=*/"art_get_current_thread_from_code", mod); // (external, no body) |
| 349 | func_art_get_current_thread_from_code->setCallingConv(CallingConv::C); |
| 350 | } |
| 351 | AttrListPtr func_art_get_current_thread_from_code_PAL; |
| 352 | func_art_get_current_thread_from_code->setAttributes(func_art_get_current_thread_from_code_PAL); |
| 353 | |
| 354 | Function* func_art_set_current_thread_from_code = mod->getFunction("art_set_current_thread_from_code"); |
| 355 | if (!func_art_set_current_thread_from_code) { |
| 356 | func_art_set_current_thread_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 357 | /*Type=*/FuncTy_4, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 358 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 359 | /*Name=*/"art_set_current_thread_from_code", mod); // (external, no body) |
| 360 | func_art_set_current_thread_from_code->setCallingConv(CallingConv::C); |
| 361 | } |
| 362 | AttrListPtr func_art_set_current_thread_from_code_PAL; |
| 363 | func_art_set_current_thread_from_code->setAttributes(func_art_set_current_thread_from_code_PAL); |
| 364 | |
| 365 | Function* func_art_lock_object_from_code = mod->getFunction("art_lock_object_from_code"); |
| 366 | if (!func_art_lock_object_from_code) { |
| 367 | func_art_lock_object_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 368 | /*Type=*/FuncTy_5, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 369 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 370 | /*Name=*/"art_lock_object_from_code", mod); // (external, no body) |
| 371 | func_art_lock_object_from_code->setCallingConv(CallingConv::C); |
| 372 | } |
| 373 | AttrListPtr func_art_lock_object_from_code_PAL; |
| 374 | func_art_lock_object_from_code->setAttributes(func_art_lock_object_from_code_PAL); |
| 375 | |
| 376 | Function* func_art_unlock_object_from_code = mod->getFunction("art_unlock_object_from_code"); |
| 377 | if (!func_art_unlock_object_from_code) { |
| 378 | func_art_unlock_object_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 379 | /*Type=*/FuncTy_5, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 380 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 381 | /*Name=*/"art_unlock_object_from_code", mod); // (external, no body) |
| 382 | func_art_unlock_object_from_code->setCallingConv(CallingConv::C); |
| 383 | } |
| 384 | AttrListPtr func_art_unlock_object_from_code_PAL; |
| 385 | func_art_unlock_object_from_code->setAttributes(func_art_unlock_object_from_code_PAL); |
| 386 | |
| 387 | Function* func_art_test_suspend_from_code = mod->getFunction("art_test_suspend_from_code"); |
| 388 | if (!func_art_test_suspend_from_code) { |
| 389 | func_art_test_suspend_from_code = Function::Create( |
TDYa127 | 853cd09 | 2012-04-21 22:15:31 -0700 | [diff] [blame^] | 390 | /*Type=*/FuncTy_4, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 391 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 392 | /*Name=*/"art_test_suspend_from_code", mod); // (external, no body) |
| 393 | func_art_test_suspend_from_code->setCallingConv(CallingConv::C); |
| 394 | } |
| 395 | AttrListPtr func_art_test_suspend_from_code_PAL; |
| 396 | func_art_test_suspend_from_code->setAttributes(func_art_test_suspend_from_code_PAL); |
| 397 | |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 398 | Function* func_art_push_shadow_frame_from_code = mod->getFunction("art_push_shadow_frame_from_code"); |
| 399 | if (!func_art_push_shadow_frame_from_code) { |
| 400 | func_art_push_shadow_frame_from_code = Function::Create( |
TDYa127 | 853cd09 | 2012-04-21 22:15:31 -0700 | [diff] [blame^] | 401 | /*Type=*/FuncTy_6, |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 402 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 403 | /*Name=*/"art_push_shadow_frame_from_code", mod); // (external, no body) |
| 404 | func_art_push_shadow_frame_from_code->setCallingConv(CallingConv::C); |
| 405 | } |
| 406 | AttrListPtr func_art_push_shadow_frame_from_code_PAL; |
| 407 | func_art_push_shadow_frame_from_code->setAttributes(func_art_push_shadow_frame_from_code_PAL); |
| 408 | |
| 409 | Function* func_art_pop_shadow_frame_from_code = mod->getFunction("art_pop_shadow_frame_from_code"); |
| 410 | if (!func_art_pop_shadow_frame_from_code) { |
| 411 | func_art_pop_shadow_frame_from_code = Function::Create( |
TDYa127 | 853cd09 | 2012-04-21 22:15:31 -0700 | [diff] [blame^] | 412 | /*Type=*/FuncTy_7, |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 413 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 414 | /*Name=*/"art_pop_shadow_frame_from_code", mod); // (external, no body) |
| 415 | func_art_pop_shadow_frame_from_code->setCallingConv(CallingConv::C); |
| 416 | } |
| 417 | AttrListPtr func_art_pop_shadow_frame_from_code_PAL; |
| 418 | func_art_pop_shadow_frame_from_code->setAttributes(func_art_pop_shadow_frame_from_code_PAL); |
| 419 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 420 | Function* func_art_is_exception_pending_from_code = mod->getFunction("art_is_exception_pending_from_code"); |
| 421 | if (!func_art_is_exception_pending_from_code) { |
| 422 | func_art_is_exception_pending_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 423 | /*Type=*/FuncTy_8, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 424 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 425 | /*Name=*/"art_is_exception_pending_from_code", mod); // (external, no body) |
| 426 | func_art_is_exception_pending_from_code->setCallingConv(CallingConv::C); |
| 427 | } |
| 428 | AttrListPtr func_art_is_exception_pending_from_code_PAL; |
| 429 | func_art_is_exception_pending_from_code->setAttributes(func_art_is_exception_pending_from_code_PAL); |
| 430 | |
| 431 | Function* func_art_throw_div_zero_from_code = mod->getFunction("art_throw_div_zero_from_code"); |
| 432 | if (!func_art_throw_div_zero_from_code) { |
| 433 | func_art_throw_div_zero_from_code = Function::Create( |
TDYa127 | 853cd09 | 2012-04-21 22:15:31 -0700 | [diff] [blame^] | 434 | /*Type=*/FuncTy_7, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 435 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 436 | /*Name=*/"art_throw_div_zero_from_code", mod); // (external, no body) |
| 437 | func_art_throw_div_zero_from_code->setCallingConv(CallingConv::C); |
| 438 | } |
| 439 | AttrListPtr func_art_throw_div_zero_from_code_PAL; |
| 440 | func_art_throw_div_zero_from_code->setAttributes(func_art_throw_div_zero_from_code_PAL); |
| 441 | |
| 442 | Function* func_art_throw_array_bounds_from_code = mod->getFunction("art_throw_array_bounds_from_code"); |
| 443 | if (!func_art_throw_array_bounds_from_code) { |
| 444 | func_art_throw_array_bounds_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 445 | /*Type=*/FuncTy_9, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 446 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 447 | /*Name=*/"art_throw_array_bounds_from_code", mod); // (external, no body) |
| 448 | func_art_throw_array_bounds_from_code->setCallingConv(CallingConv::C); |
| 449 | } |
| 450 | AttrListPtr func_art_throw_array_bounds_from_code_PAL; |
| 451 | func_art_throw_array_bounds_from_code->setAttributes(func_art_throw_array_bounds_from_code_PAL); |
| 452 | |
| 453 | Function* func_art_throw_no_such_method_from_code = mod->getFunction("art_throw_no_such_method_from_code"); |
| 454 | if (!func_art_throw_no_such_method_from_code) { |
| 455 | func_art_throw_no_such_method_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 456 | /*Type=*/FuncTy_10, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 457 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 458 | /*Name=*/"art_throw_no_such_method_from_code", mod); // (external, no body) |
| 459 | func_art_throw_no_such_method_from_code->setCallingConv(CallingConv::C); |
| 460 | } |
| 461 | AttrListPtr func_art_throw_no_such_method_from_code_PAL; |
| 462 | func_art_throw_no_such_method_from_code->setAttributes(func_art_throw_no_such_method_from_code_PAL); |
| 463 | |
| 464 | Function* func_art_throw_null_pointer_exception_from_code = mod->getFunction("art_throw_null_pointer_exception_from_code"); |
| 465 | if (!func_art_throw_null_pointer_exception_from_code) { |
| 466 | func_art_throw_null_pointer_exception_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 467 | /*Type=*/FuncTy_10, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 468 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 469 | /*Name=*/"art_throw_null_pointer_exception_from_code", mod); // (external, no body) |
| 470 | func_art_throw_null_pointer_exception_from_code->setCallingConv(CallingConv::C); |
| 471 | } |
| 472 | AttrListPtr func_art_throw_null_pointer_exception_from_code_PAL; |
| 473 | func_art_throw_null_pointer_exception_from_code->setAttributes(func_art_throw_null_pointer_exception_from_code_PAL); |
| 474 | |
| 475 | Function* func_art_throw_stack_overflow_from_code = mod->getFunction("art_throw_stack_overflow_from_code"); |
| 476 | if (!func_art_throw_stack_overflow_from_code) { |
| 477 | func_art_throw_stack_overflow_from_code = Function::Create( |
TDYa127 | 853cd09 | 2012-04-21 22:15:31 -0700 | [diff] [blame^] | 478 | /*Type=*/FuncTy_7, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 479 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 480 | /*Name=*/"art_throw_stack_overflow_from_code", mod); // (external, no body) |
| 481 | func_art_throw_stack_overflow_from_code->setCallingConv(CallingConv::C); |
| 482 | } |
| 483 | AttrListPtr func_art_throw_stack_overflow_from_code_PAL; |
| 484 | func_art_throw_stack_overflow_from_code->setAttributes(func_art_throw_stack_overflow_from_code_PAL); |
| 485 | |
| 486 | Function* func_art_throw_exception_from_code = mod->getFunction("art_throw_exception_from_code"); |
| 487 | if (!func_art_throw_exception_from_code) { |
| 488 | func_art_throw_exception_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 489 | /*Type=*/FuncTy_4, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 490 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 491 | /*Name=*/"art_throw_exception_from_code", mod); // (external, no body) |
| 492 | func_art_throw_exception_from_code->setCallingConv(CallingConv::C); |
| 493 | } |
| 494 | AttrListPtr func_art_throw_exception_from_code_PAL; |
| 495 | func_art_throw_exception_from_code->setAttributes(func_art_throw_exception_from_code_PAL); |
| 496 | |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 497 | Function* func_art_throw_verification_error_from_code = mod->getFunction("art_throw_verification_error_from_code"); |
| 498 | if (!func_art_throw_verification_error_from_code) { |
| 499 | func_art_throw_verification_error_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 500 | /*Type=*/FuncTy_11, |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 501 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 502 | /*Name=*/"art_throw_verification_error_from_code", mod); // (external, no body) |
| 503 | func_art_throw_verification_error_from_code->setCallingConv(CallingConv::C); |
| 504 | } |
| 505 | AttrListPtr func_art_throw_verification_error_from_code_PAL; |
| 506 | func_art_throw_verification_error_from_code->setAttributes(func_art_throw_verification_error_from_code_PAL); |
| 507 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 508 | Function* func_art_find_catch_block_from_code = mod->getFunction("art_find_catch_block_from_code"); |
| 509 | if (!func_art_find_catch_block_from_code) { |
| 510 | func_art_find_catch_block_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 511 | /*Type=*/FuncTy_12, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 512 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 513 | /*Name=*/"art_find_catch_block_from_code", mod); // (external, no body) |
| 514 | func_art_find_catch_block_from_code->setCallingConv(CallingConv::C); |
| 515 | } |
| 516 | AttrListPtr func_art_find_catch_block_from_code_PAL; |
| 517 | func_art_find_catch_block_from_code->setAttributes(func_art_find_catch_block_from_code_PAL); |
| 518 | |
| 519 | Function* func_art_alloc_object_from_code = mod->getFunction("art_alloc_object_from_code"); |
| 520 | if (!func_art_alloc_object_from_code) { |
| 521 | func_art_alloc_object_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 522 | /*Type=*/FuncTy_13, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 523 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 524 | /*Name=*/"art_alloc_object_from_code", mod); // (external, no body) |
| 525 | func_art_alloc_object_from_code->setCallingConv(CallingConv::C); |
| 526 | } |
| 527 | AttrListPtr func_art_alloc_object_from_code_PAL; |
| 528 | func_art_alloc_object_from_code->setAttributes(func_art_alloc_object_from_code_PAL); |
| 529 | |
| 530 | Function* func_art_alloc_object_from_code_with_access_check = mod->getFunction("art_alloc_object_from_code_with_access_check"); |
| 531 | if (!func_art_alloc_object_from_code_with_access_check) { |
| 532 | func_art_alloc_object_from_code_with_access_check = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 533 | /*Type=*/FuncTy_13, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 534 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 535 | /*Name=*/"art_alloc_object_from_code_with_access_check", mod); // (external, no body) |
| 536 | func_art_alloc_object_from_code_with_access_check->setCallingConv(CallingConv::C); |
| 537 | } |
| 538 | AttrListPtr func_art_alloc_object_from_code_with_access_check_PAL; |
| 539 | func_art_alloc_object_from_code_with_access_check->setAttributes(func_art_alloc_object_from_code_with_access_check_PAL); |
| 540 | |
| 541 | Function* func_art_alloc_array_from_code = mod->getFunction("art_alloc_array_from_code"); |
| 542 | if (!func_art_alloc_array_from_code) { |
| 543 | func_art_alloc_array_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 544 | /*Type=*/FuncTy_14, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 545 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 546 | /*Name=*/"art_alloc_array_from_code", mod); // (external, no body) |
| 547 | func_art_alloc_array_from_code->setCallingConv(CallingConv::C); |
| 548 | } |
| 549 | AttrListPtr func_art_alloc_array_from_code_PAL; |
| 550 | func_art_alloc_array_from_code->setAttributes(func_art_alloc_array_from_code_PAL); |
| 551 | |
| 552 | Function* func_art_alloc_array_from_code_with_access_check = mod->getFunction("art_alloc_array_from_code_with_access_check"); |
| 553 | if (!func_art_alloc_array_from_code_with_access_check) { |
| 554 | func_art_alloc_array_from_code_with_access_check = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 555 | /*Type=*/FuncTy_14, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 556 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 557 | /*Name=*/"art_alloc_array_from_code_with_access_check", mod); // (external, no body) |
| 558 | func_art_alloc_array_from_code_with_access_check->setCallingConv(CallingConv::C); |
| 559 | } |
| 560 | AttrListPtr func_art_alloc_array_from_code_with_access_check_PAL; |
| 561 | func_art_alloc_array_from_code_with_access_check->setAttributes(func_art_alloc_array_from_code_with_access_check_PAL); |
| 562 | |
| 563 | Function* func_art_check_and_alloc_array_from_code = mod->getFunction("art_check_and_alloc_array_from_code"); |
| 564 | if (!func_art_check_and_alloc_array_from_code) { |
| 565 | func_art_check_and_alloc_array_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 566 | /*Type=*/FuncTy_14, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 567 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 568 | /*Name=*/"art_check_and_alloc_array_from_code", mod); // (external, no body) |
| 569 | func_art_check_and_alloc_array_from_code->setCallingConv(CallingConv::C); |
| 570 | } |
| 571 | AttrListPtr func_art_check_and_alloc_array_from_code_PAL; |
| 572 | func_art_check_and_alloc_array_from_code->setAttributes(func_art_check_and_alloc_array_from_code_PAL); |
| 573 | |
| 574 | Function* func_art_check_and_alloc_array_from_code_with_access_check = mod->getFunction("art_check_and_alloc_array_from_code_with_access_check"); |
| 575 | if (!func_art_check_and_alloc_array_from_code_with_access_check) { |
| 576 | func_art_check_and_alloc_array_from_code_with_access_check = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 577 | /*Type=*/FuncTy_14, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 578 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 579 | /*Name=*/"art_check_and_alloc_array_from_code_with_access_check", mod); // (external, no body) |
| 580 | func_art_check_and_alloc_array_from_code_with_access_check->setCallingConv(CallingConv::C); |
| 581 | } |
| 582 | AttrListPtr func_art_check_and_alloc_array_from_code_with_access_check_PAL; |
| 583 | func_art_check_and_alloc_array_from_code_with_access_check->setAttributes(func_art_check_and_alloc_array_from_code_with_access_check_PAL); |
| 584 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 585 | Function* func_art_find_instance_field_from_code = mod->getFunction("art_find_instance_field_from_code"); |
| 586 | if (!func_art_find_instance_field_from_code) { |
| 587 | func_art_find_instance_field_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 588 | /*Type=*/FuncTy_15, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 589 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 590 | /*Name=*/"art_find_instance_field_from_code", mod); // (external, no body) |
| 591 | func_art_find_instance_field_from_code->setCallingConv(CallingConv::C); |
| 592 | } |
| 593 | AttrListPtr func_art_find_instance_field_from_code_PAL; |
| 594 | func_art_find_instance_field_from_code->setAttributes(func_art_find_instance_field_from_code_PAL); |
| 595 | |
| 596 | Function* func_art_find_static_field_from_code = mod->getFunction("art_find_static_field_from_code"); |
| 597 | if (!func_art_find_static_field_from_code) { |
| 598 | func_art_find_static_field_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 599 | /*Type=*/FuncTy_15, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 600 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 601 | /*Name=*/"art_find_static_field_from_code", mod); // (external, no body) |
| 602 | func_art_find_static_field_from_code->setCallingConv(CallingConv::C); |
| 603 | } |
| 604 | AttrListPtr func_art_find_static_field_from_code_PAL; |
| 605 | func_art_find_static_field_from_code->setAttributes(func_art_find_static_field_from_code_PAL); |
| 606 | |
Logan Chien | 7e7fabc | 2012-04-10 18:59:11 +0800 | [diff] [blame] | 607 | Function* func_art_find_static_method_from_code_with_access_check = mod->getFunction("art_find_static_method_from_code_with_access_check"); |
| 608 | if (!func_art_find_static_method_from_code_with_access_check) { |
| 609 | func_art_find_static_method_from_code_with_access_check = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 610 | /*Type=*/FuncTy_16, |
Logan Chien | 7e7fabc | 2012-04-10 18:59:11 +0800 | [diff] [blame] | 611 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 612 | /*Name=*/"art_find_static_method_from_code_with_access_check", mod); // (external, no body) |
| 613 | func_art_find_static_method_from_code_with_access_check->setCallingConv(CallingConv::C); |
| 614 | } |
| 615 | AttrListPtr func_art_find_static_method_from_code_with_access_check_PAL; |
| 616 | func_art_find_static_method_from_code_with_access_check->setAttributes(func_art_find_static_method_from_code_with_access_check_PAL); |
| 617 | |
| 618 | Function* func_art_find_direct_method_from_code_with_access_check = mod->getFunction("art_find_direct_method_from_code_with_access_check"); |
| 619 | if (!func_art_find_direct_method_from_code_with_access_check) { |
| 620 | func_art_find_direct_method_from_code_with_access_check = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 621 | /*Type=*/FuncTy_16, |
Logan Chien | 7e7fabc | 2012-04-10 18:59:11 +0800 | [diff] [blame] | 622 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 623 | /*Name=*/"art_find_direct_method_from_code_with_access_check", mod); // (external, no body) |
| 624 | func_art_find_direct_method_from_code_with_access_check->setCallingConv(CallingConv::C); |
| 625 | } |
| 626 | AttrListPtr func_art_find_direct_method_from_code_with_access_check_PAL; |
| 627 | func_art_find_direct_method_from_code_with_access_check->setAttributes(func_art_find_direct_method_from_code_with_access_check_PAL); |
| 628 | |
| 629 | Function* func_art_find_virtual_method_from_code_with_access_check = mod->getFunction("art_find_virtual_method_from_code_with_access_check"); |
| 630 | if (!func_art_find_virtual_method_from_code_with_access_check) { |
| 631 | func_art_find_virtual_method_from_code_with_access_check = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 632 | /*Type=*/FuncTy_16, |
Logan Chien | 7e7fabc | 2012-04-10 18:59:11 +0800 | [diff] [blame] | 633 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 634 | /*Name=*/"art_find_virtual_method_from_code_with_access_check", mod); // (external, no body) |
| 635 | func_art_find_virtual_method_from_code_with_access_check->setCallingConv(CallingConv::C); |
| 636 | } |
| 637 | AttrListPtr func_art_find_virtual_method_from_code_with_access_check_PAL; |
| 638 | func_art_find_virtual_method_from_code_with_access_check->setAttributes(func_art_find_virtual_method_from_code_with_access_check_PAL); |
| 639 | |
| 640 | Function* func_art_find_super_method_from_code_with_access_check = mod->getFunction("art_find_super_method_from_code_with_access_check"); |
| 641 | if (!func_art_find_super_method_from_code_with_access_check) { |
| 642 | func_art_find_super_method_from_code_with_access_check = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 643 | /*Type=*/FuncTy_16, |
Logan Chien | 7e7fabc | 2012-04-10 18:59:11 +0800 | [diff] [blame] | 644 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 645 | /*Name=*/"art_find_super_method_from_code_with_access_check", mod); // (external, no body) |
| 646 | func_art_find_super_method_from_code_with_access_check->setCallingConv(CallingConv::C); |
| 647 | } |
| 648 | AttrListPtr func_art_find_super_method_from_code_with_access_check_PAL; |
| 649 | func_art_find_super_method_from_code_with_access_check->setAttributes(func_art_find_super_method_from_code_with_access_check_PAL); |
| 650 | |
| 651 | Function* func_art_find_interface_method_from_code_with_access_check = mod->getFunction("art_find_interface_method_from_code_with_access_check"); |
| 652 | if (!func_art_find_interface_method_from_code_with_access_check) { |
| 653 | func_art_find_interface_method_from_code_with_access_check = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 654 | /*Type=*/FuncTy_16, |
Logan Chien | 7e7fabc | 2012-04-10 18:59:11 +0800 | [diff] [blame] | 655 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 656 | /*Name=*/"art_find_interface_method_from_code_with_access_check", mod); // (external, no body) |
| 657 | func_art_find_interface_method_from_code_with_access_check->setCallingConv(CallingConv::C); |
| 658 | } |
| 659 | AttrListPtr func_art_find_interface_method_from_code_with_access_check_PAL; |
| 660 | func_art_find_interface_method_from_code_with_access_check->setAttributes(func_art_find_interface_method_from_code_with_access_check_PAL); |
| 661 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 662 | Function* func_art_find_interface_method_from_code = mod->getFunction("art_find_interface_method_from_code"); |
| 663 | if (!func_art_find_interface_method_from_code) { |
| 664 | func_art_find_interface_method_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 665 | /*Type=*/FuncTy_16, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 666 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 667 | /*Name=*/"art_find_interface_method_from_code", mod); // (external, no body) |
| 668 | func_art_find_interface_method_from_code->setCallingConv(CallingConv::C); |
| 669 | } |
| 670 | AttrListPtr func_art_find_interface_method_from_code_PAL; |
| 671 | func_art_find_interface_method_from_code->setAttributes(func_art_find_interface_method_from_code_PAL); |
| 672 | |
| 673 | Function* func_art_initialize_static_storage_from_code = mod->getFunction("art_initialize_static_storage_from_code"); |
| 674 | if (!func_art_initialize_static_storage_from_code) { |
| 675 | func_art_initialize_static_storage_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 676 | /*Type=*/FuncTy_13, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 677 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 678 | /*Name=*/"art_initialize_static_storage_from_code", mod); // (external, no body) |
| 679 | func_art_initialize_static_storage_from_code->setCallingConv(CallingConv::C); |
| 680 | } |
| 681 | AttrListPtr func_art_initialize_static_storage_from_code_PAL; |
| 682 | func_art_initialize_static_storage_from_code->setAttributes(func_art_initialize_static_storage_from_code_PAL); |
| 683 | |
| 684 | Function* func_art_initialize_type_from_code = mod->getFunction("art_initialize_type_from_code"); |
| 685 | if (!func_art_initialize_type_from_code) { |
| 686 | func_art_initialize_type_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 687 | /*Type=*/FuncTy_13, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 688 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 689 | /*Name=*/"art_initialize_type_from_code", mod); // (external, no body) |
| 690 | func_art_initialize_type_from_code->setCallingConv(CallingConv::C); |
| 691 | } |
| 692 | AttrListPtr func_art_initialize_type_from_code_PAL; |
| 693 | func_art_initialize_type_from_code->setAttributes(func_art_initialize_type_from_code_PAL); |
| 694 | |
| 695 | Function* func_art_initialize_type_and_verify_access_from_code = mod->getFunction("art_initialize_type_and_verify_access_from_code"); |
| 696 | if (!func_art_initialize_type_and_verify_access_from_code) { |
| 697 | func_art_initialize_type_and_verify_access_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 698 | /*Type=*/FuncTy_13, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 699 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 700 | /*Name=*/"art_initialize_type_and_verify_access_from_code", mod); // (external, no body) |
| 701 | func_art_initialize_type_and_verify_access_from_code->setCallingConv(CallingConv::C); |
| 702 | } |
| 703 | AttrListPtr func_art_initialize_type_and_verify_access_from_code_PAL; |
| 704 | func_art_initialize_type_and_verify_access_from_code->setAttributes(func_art_initialize_type_and_verify_access_from_code_PAL); |
| 705 | |
| 706 | Function* func_art_resolve_string_from_code = mod->getFunction("art_resolve_string_from_code"); |
| 707 | if (!func_art_resolve_string_from_code) { |
| 708 | func_art_resolve_string_from_code = Function::Create( |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 709 | /*Type=*/FuncTy_17, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 710 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 711 | /*Name=*/"art_resolve_string_from_code", mod); // (external, no body) |
| 712 | func_art_resolve_string_from_code->setCallingConv(CallingConv::C); |
| 713 | } |
| 714 | AttrListPtr func_art_resolve_string_from_code_PAL; |
| 715 | func_art_resolve_string_from_code->setAttributes(func_art_resolve_string_from_code_PAL); |
| 716 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 717 | Function* func_art_set32_static_from_code = mod->getFunction("art_set32_static_from_code"); |
| 718 | if (!func_art_set32_static_from_code) { |
| 719 | func_art_set32_static_from_code = Function::Create( |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 720 | /*Type=*/FuncTy_18, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 721 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 722 | /*Name=*/"art_set32_static_from_code", mod); // (external, no body) |
| 723 | func_art_set32_static_from_code->setCallingConv(CallingConv::C); |
| 724 | } |
| 725 | AttrListPtr func_art_set32_static_from_code_PAL; |
| 726 | func_art_set32_static_from_code->setAttributes(func_art_set32_static_from_code_PAL); |
| 727 | |
| 728 | Function* func_art_set64_static_from_code = mod->getFunction("art_set64_static_from_code"); |
| 729 | if (!func_art_set64_static_from_code) { |
| 730 | func_art_set64_static_from_code = Function::Create( |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 731 | /*Type=*/FuncTy_19, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 732 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 733 | /*Name=*/"art_set64_static_from_code", mod); // (external, no body) |
| 734 | func_art_set64_static_from_code->setCallingConv(CallingConv::C); |
| 735 | } |
| 736 | AttrListPtr func_art_set64_static_from_code_PAL; |
| 737 | func_art_set64_static_from_code->setAttributes(func_art_set64_static_from_code_PAL); |
| 738 | |
| 739 | Function* func_art_set_obj_static_from_code = mod->getFunction("art_set_obj_static_from_code"); |
| 740 | if (!func_art_set_obj_static_from_code) { |
| 741 | func_art_set_obj_static_from_code = Function::Create( |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 742 | /*Type=*/FuncTy_20, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 743 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 744 | /*Name=*/"art_set_obj_static_from_code", mod); // (external, no body) |
| 745 | func_art_set_obj_static_from_code->setCallingConv(CallingConv::C); |
| 746 | } |
| 747 | AttrListPtr func_art_set_obj_static_from_code_PAL; |
| 748 | func_art_set_obj_static_from_code->setAttributes(func_art_set_obj_static_from_code_PAL); |
| 749 | |
| 750 | Function* func_art_get32_static_from_code = mod->getFunction("art_get32_static_from_code"); |
| 751 | if (!func_art_get32_static_from_code) { |
| 752 | func_art_get32_static_from_code = Function::Create( |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 753 | /*Type=*/FuncTy_21, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 754 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 755 | /*Name=*/"art_get32_static_from_code", mod); // (external, no body) |
| 756 | func_art_get32_static_from_code->setCallingConv(CallingConv::C); |
| 757 | } |
| 758 | AttrListPtr func_art_get32_static_from_code_PAL; |
| 759 | func_art_get32_static_from_code->setAttributes(func_art_get32_static_from_code_PAL); |
| 760 | |
| 761 | Function* func_art_get64_static_from_code = mod->getFunction("art_get64_static_from_code"); |
| 762 | if (!func_art_get64_static_from_code) { |
| 763 | func_art_get64_static_from_code = Function::Create( |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 764 | /*Type=*/FuncTy_22, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 765 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 766 | /*Name=*/"art_get64_static_from_code", mod); // (external, no body) |
| 767 | func_art_get64_static_from_code->setCallingConv(CallingConv::C); |
| 768 | } |
| 769 | AttrListPtr func_art_get64_static_from_code_PAL; |
| 770 | func_art_get64_static_from_code->setAttributes(func_art_get64_static_from_code_PAL); |
| 771 | |
| 772 | Function* func_art_get_obj_static_from_code = mod->getFunction("art_get_obj_static_from_code"); |
| 773 | if (!func_art_get_obj_static_from_code) { |
| 774 | func_art_get_obj_static_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 775 | /*Type=*/FuncTy_23, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 776 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 777 | /*Name=*/"art_get_obj_static_from_code", mod); // (external, no body) |
| 778 | func_art_get_obj_static_from_code->setCallingConv(CallingConv::C); |
| 779 | } |
| 780 | AttrListPtr func_art_get_obj_static_from_code_PAL; |
| 781 | func_art_get_obj_static_from_code->setAttributes(func_art_get_obj_static_from_code_PAL); |
| 782 | |
| 783 | Function* func_art_set32_instance_from_code = mod->getFunction("art_set32_instance_from_code"); |
| 784 | if (!func_art_set32_instance_from_code) { |
| 785 | func_art_set32_instance_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 786 | /*Type=*/FuncTy_24, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 787 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 788 | /*Name=*/"art_set32_instance_from_code", mod); // (external, no body) |
| 789 | func_art_set32_instance_from_code->setCallingConv(CallingConv::C); |
| 790 | } |
| 791 | AttrListPtr func_art_set32_instance_from_code_PAL; |
| 792 | func_art_set32_instance_from_code->setAttributes(func_art_set32_instance_from_code_PAL); |
| 793 | |
| 794 | Function* func_art_set64_instance_from_code = mod->getFunction("art_set64_instance_from_code"); |
| 795 | if (!func_art_set64_instance_from_code) { |
| 796 | func_art_set64_instance_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 797 | /*Type=*/FuncTy_25, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 798 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 799 | /*Name=*/"art_set64_instance_from_code", mod); // (external, no body) |
| 800 | func_art_set64_instance_from_code->setCallingConv(CallingConv::C); |
| 801 | } |
| 802 | AttrListPtr func_art_set64_instance_from_code_PAL; |
| 803 | func_art_set64_instance_from_code->setAttributes(func_art_set64_instance_from_code_PAL); |
| 804 | |
| 805 | Function* func_art_set_obj_instance_from_code = mod->getFunction("art_set_obj_instance_from_code"); |
| 806 | if (!func_art_set_obj_instance_from_code) { |
| 807 | func_art_set_obj_instance_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 808 | /*Type=*/FuncTy_26, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 809 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 810 | /*Name=*/"art_set_obj_instance_from_code", mod); // (external, no body) |
| 811 | func_art_set_obj_instance_from_code->setCallingConv(CallingConv::C); |
| 812 | } |
| 813 | AttrListPtr func_art_set_obj_instance_from_code_PAL; |
| 814 | func_art_set_obj_instance_from_code->setAttributes(func_art_set_obj_instance_from_code_PAL); |
| 815 | |
| 816 | Function* func_art_get32_instance_from_code = mod->getFunction("art_get32_instance_from_code"); |
| 817 | if (!func_art_get32_instance_from_code) { |
| 818 | func_art_get32_instance_from_code = Function::Create( |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 819 | /*Type=*/FuncTy_20, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 820 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 821 | /*Name=*/"art_get32_instance_from_code", mod); // (external, no body) |
| 822 | func_art_get32_instance_from_code->setCallingConv(CallingConv::C); |
| 823 | } |
| 824 | AttrListPtr func_art_get32_instance_from_code_PAL; |
| 825 | func_art_get32_instance_from_code->setAttributes(func_art_get32_instance_from_code_PAL); |
| 826 | |
| 827 | Function* func_art_get64_instance_from_code = mod->getFunction("art_get64_instance_from_code"); |
| 828 | if (!func_art_get64_instance_from_code) { |
| 829 | func_art_get64_instance_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 830 | /*Type=*/FuncTy_27, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 831 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 832 | /*Name=*/"art_get64_instance_from_code", mod); // (external, no body) |
| 833 | func_art_get64_instance_from_code->setCallingConv(CallingConv::C); |
| 834 | } |
| 835 | AttrListPtr func_art_get64_instance_from_code_PAL; |
| 836 | func_art_get64_instance_from_code->setAttributes(func_art_get64_instance_from_code_PAL); |
| 837 | |
| 838 | Function* func_art_get_obj_instance_from_code = mod->getFunction("art_get_obj_instance_from_code"); |
| 839 | if (!func_art_get_obj_instance_from_code) { |
| 840 | func_art_get_obj_instance_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 841 | /*Type=*/FuncTy_13, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 842 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 843 | /*Name=*/"art_get_obj_instance_from_code", mod); // (external, no body) |
| 844 | func_art_get_obj_instance_from_code->setCallingConv(CallingConv::C); |
| 845 | } |
| 846 | AttrListPtr func_art_get_obj_instance_from_code_PAL; |
| 847 | func_art_get_obj_instance_from_code->setAttributes(func_art_get_obj_instance_from_code_PAL); |
| 848 | |
TDYa127 | 28f1a14 | 2012-03-15 21:51:52 -0700 | [diff] [blame] | 849 | Function* func_art_decode_jobject_in_thread = mod->getFunction("art_decode_jobject_in_thread"); |
| 850 | if (!func_art_decode_jobject_in_thread) { |
| 851 | func_art_decode_jobject_in_thread = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 852 | /*Type=*/FuncTy_28, |
TDYa127 | 28f1a14 | 2012-03-15 21:51:52 -0700 | [diff] [blame] | 853 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 854 | /*Name=*/"art_decode_jobject_in_thread", mod); // (external, no body) |
| 855 | func_art_decode_jobject_in_thread->setCallingConv(CallingConv::C); |
| 856 | } |
| 857 | AttrListPtr func_art_decode_jobject_in_thread_PAL; |
| 858 | func_art_decode_jobject_in_thread->setAttributes(func_art_decode_jobject_in_thread_PAL); |
| 859 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 860 | Function* func_art_is_assignable_from_code = mod->getFunction("art_is_assignable_from_code"); |
| 861 | if (!func_art_is_assignable_from_code) { |
| 862 | func_art_is_assignable_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 863 | /*Type=*/FuncTy_29, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 864 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 865 | /*Name=*/"art_is_assignable_from_code", mod); // (external, no body) |
| 866 | func_art_is_assignable_from_code->setCallingConv(CallingConv::C); |
| 867 | } |
| 868 | AttrListPtr func_art_is_assignable_from_code_PAL; |
| 869 | func_art_is_assignable_from_code->setAttributes(func_art_is_assignable_from_code_PAL); |
| 870 | |
| 871 | Function* func_art_check_cast_from_code = mod->getFunction("art_check_cast_from_code"); |
| 872 | if (!func_art_check_cast_from_code) { |
| 873 | func_art_check_cast_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 874 | /*Type=*/FuncTy_5, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 875 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 876 | /*Name=*/"art_check_cast_from_code", mod); // (external, no body) |
| 877 | func_art_check_cast_from_code->setCallingConv(CallingConv::C); |
| 878 | } |
| 879 | AttrListPtr func_art_check_cast_from_code_PAL; |
| 880 | func_art_check_cast_from_code->setAttributes(func_art_check_cast_from_code_PAL); |
| 881 | |
TDYa127 | 1b86d07 | 2012-04-05 17:38:56 -0700 | [diff] [blame] | 882 | Function* func_art_check_put_array_element_from_code = mod->getFunction("art_check_put_array_element_from_code"); |
| 883 | if (!func_art_check_put_array_element_from_code) { |
| 884 | func_art_check_put_array_element_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 885 | /*Type=*/FuncTy_5, |
TDYa127 | 1b86d07 | 2012-04-05 17:38:56 -0700 | [diff] [blame] | 886 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 887 | /*Name=*/"art_check_put_array_element_from_code", mod); // (external, no body) |
| 888 | func_art_check_put_array_element_from_code->setCallingConv(CallingConv::C); |
| 889 | } |
| 890 | AttrListPtr func_art_check_put_array_element_from_code_PAL; |
| 891 | func_art_check_put_array_element_from_code->setAttributes(func_art_check_put_array_element_from_code_PAL); |
| 892 | |
TDYa127 | a474687 | 2012-04-11 23:48:55 -0700 | [diff] [blame] | 893 | Function* func_D2L = mod->getFunction("D2L"); |
| 894 | if (!func_D2L) { |
| 895 | func_D2L = Function::Create( |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 896 | /*Type=*/FuncTy_30, |
TDYa127 | a474687 | 2012-04-11 23:48:55 -0700 | [diff] [blame] | 897 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 898 | /*Name=*/"D2L", mod); // (external, no body) |
| 899 | func_D2L->setCallingConv(CallingConv::C); |
| 900 | } |
| 901 | AttrListPtr func_D2L_PAL; |
| 902 | func_D2L->setAttributes(func_D2L_PAL); |
| 903 | |
| 904 | Function* func_D2I = mod->getFunction("D2I"); |
| 905 | if (!func_D2I) { |
| 906 | func_D2I = Function::Create( |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 907 | /*Type=*/FuncTy_31, |
TDYa127 | a474687 | 2012-04-11 23:48:55 -0700 | [diff] [blame] | 908 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 909 | /*Name=*/"D2I", mod); // (external, no body) |
| 910 | func_D2I->setCallingConv(CallingConv::C); |
| 911 | } |
| 912 | AttrListPtr func_D2I_PAL; |
| 913 | func_D2I->setAttributes(func_D2I_PAL); |
| 914 | |
| 915 | Function* func_F2L = mod->getFunction("F2L"); |
| 916 | if (!func_F2L) { |
| 917 | func_F2L = Function::Create( |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 918 | /*Type=*/FuncTy_32, |
TDYa127 | a474687 | 2012-04-11 23:48:55 -0700 | [diff] [blame] | 919 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 920 | /*Name=*/"F2L", mod); // (external, no body) |
| 921 | func_F2L->setCallingConv(CallingConv::C); |
| 922 | } |
| 923 | AttrListPtr func_F2L_PAL; |
| 924 | func_F2L->setAttributes(func_F2L_PAL); |
| 925 | |
| 926 | Function* func_F2I = mod->getFunction("F2I"); |
| 927 | if (!func_F2I) { |
| 928 | func_F2I = Function::Create( |
TDYa127 | da83d97 | 2012-04-18 00:21:49 -0700 | [diff] [blame] | 929 | /*Type=*/FuncTy_33, |
TDYa127 | a474687 | 2012-04-11 23:48:55 -0700 | [diff] [blame] | 930 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 931 | /*Name=*/"F2I", mod); // (external, no body) |
| 932 | func_F2I->setCallingConv(CallingConv::C); |
| 933 | } |
| 934 | AttrListPtr func_F2I_PAL; |
| 935 | func_F2I->setAttributes(func_F2I_PAL); |
| 936 | |
TDYa127 | 83bb662 | 2012-04-17 02:20:34 -0700 | [diff] [blame] | 937 | Function* func_art_mark_gc_card_from_code = mod->getFunction("art_mark_gc_card_from_code"); |
| 938 | if (!func_art_mark_gc_card_from_code) { |
| 939 | func_art_mark_gc_card_from_code = Function::Create( |
TDYa127 | 706e9b6 | 2012-04-19 12:24:26 -0700 | [diff] [blame] | 940 | /*Type=*/FuncTy_5, |
TDYa127 | 83bb662 | 2012-04-17 02:20:34 -0700 | [diff] [blame] | 941 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 942 | /*Name=*/"art_mark_gc_card_from_code", mod); // (external, no body) |
| 943 | func_art_mark_gc_card_from_code->setCallingConv(CallingConv::C); |
| 944 | } |
| 945 | AttrListPtr func_art_mark_gc_card_from_code_PAL; |
| 946 | func_art_mark_gc_card_from_code->setAttributes(func_art_mark_gc_card_from_code_PAL); |
| 947 | |
TDYa127 | 0b686e5 | 2012-04-09 22:43:35 -0700 | [diff] [blame] | 948 | Function* func_art_fix_stub_from_code = mod->getFunction("art_fix_stub_from_code"); |
| 949 | if (!func_art_fix_stub_from_code) { |
| 950 | func_art_fix_stub_from_code = Function::Create( |
TDYa127 | 05fe3b6 | 2012-04-21 00:28:54 -0700 | [diff] [blame] | 951 | /*Type=*/FuncTy_34, |
TDYa127 | 8532191 | 2012-04-01 15:24:56 -0700 | [diff] [blame] | 952 | /*Linkage=*/GlobalValue::ExternalLinkage, |
TDYa127 | 0b686e5 | 2012-04-09 22:43:35 -0700 | [diff] [blame] | 953 | /*Name=*/"art_fix_stub_from_code", mod); // (external, no body) |
| 954 | func_art_fix_stub_from_code->setCallingConv(CallingConv::C); |
TDYa127 | 8532191 | 2012-04-01 15:24:56 -0700 | [diff] [blame] | 955 | } |
TDYa127 | 0b686e5 | 2012-04-09 22:43:35 -0700 | [diff] [blame] | 956 | AttrListPtr func_art_fix_stub_from_code_PAL; |
| 957 | func_art_fix_stub_from_code->setAttributes(func_art_fix_stub_from_code_PAL); |
TDYa127 | 8532191 | 2012-04-01 15:24:56 -0700 | [diff] [blame] | 958 | |
TDYa127 | 5bb8601 | 2012-04-11 05:57:28 -0700 | [diff] [blame] | 959 | Function* func_art_proxy_invoke_handler_from_code = mod->getFunction("art_proxy_invoke_handler_from_code"); |
| 960 | if (!func_art_proxy_invoke_handler_from_code) { |
| 961 | func_art_proxy_invoke_handler_from_code = Function::Create( |
TDYa127 | 05fe3b6 | 2012-04-21 00:28:54 -0700 | [diff] [blame] | 962 | /*Type=*/FuncTy_35, |
TDYa127 | 5bb8601 | 2012-04-11 05:57:28 -0700 | [diff] [blame] | 963 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 964 | /*Name=*/"art_proxy_invoke_handler_from_code", mod); // (external, no body) |
| 965 | func_art_proxy_invoke_handler_from_code->setCallingConv(CallingConv::C); |
| 966 | } |
| 967 | AttrListPtr func_art_proxy_invoke_handler_from_code_PAL; |
| 968 | func_art_proxy_invoke_handler_from_code->setAttributes(func_art_proxy_invoke_handler_from_code_PAL); |
| 969 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 970 | // Global Variable Declarations |
| 971 | |
| 972 | |
| 973 | // Constant Definitions |
| 974 | |
| 975 | // Global Variable Definitions |
| 976 | |
| 977 | // Function Definitions |
| 978 | |
| 979 | return mod; |
| 980 | |
| 981 | } |
Logan Chien | e75a8cc | 2012-02-24 12:26:43 +0800 | [diff] [blame] | 982 | |
| 983 | } // namespace compiler_llvm |
| 984 | } // namespace art |