Logan Chien | e75a8cc | 2012-02-24 12:26:43 +0800 | [diff] [blame] | 1 | // Generated with ../tools/gen_art_module_cc.sh |
| 2 | |
| 3 | |
| 4 | #pragma GCC diagnostic ignored "-Wframe-larger-than=" |
| 5 | // TODO: Remove this pragma after llc can generate makeLLVMModuleContents() |
| 6 | // with smaller frame size. |
| 7 | |
| 8 | #include <llvm/DerivedTypes.h> |
| 9 | #include <llvm/Function.h> |
| 10 | #include <llvm/Module.h> |
| 11 | #include <llvm/Type.h> |
| 12 | |
| 13 | #include <vector> |
| 14 | |
| 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 | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 42 | StructType *StructTy_ArtFrame = mod->getTypeByName("ArtFrame"); |
| 43 | if (!StructTy_ArtFrame) { |
| 44 | StructTy_ArtFrame = StructType::create(mod->getContext(), "ArtFrame"); |
| 45 | } |
| 46 | std::vector<Type*>StructTy_ArtFrame_fields; |
| 47 | PointerType* PointerTy_2 = PointerType::get(StructTy_ArtFrame, 0); |
| 48 | |
| 49 | StructTy_ArtFrame_fields.push_back(PointerTy_2); |
| 50 | StructTy_ArtFrame_fields.push_back(PointerTy_1); |
| 51 | StructTy_ArtFrame_fields.push_back(IntegerType::get(mod->getContext(), 32)); |
| 52 | StructTy_ArtFrame_fields.push_back(IntegerType::get(mod->getContext(), 32)); |
| 53 | if (StructTy_ArtFrame->isOpaque()) { |
| 54 | StructTy_ArtFrame->setBody(StructTy_ArtFrame_fields, /*isPacked=*/false); |
| 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; |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 78 | FunctionType* FuncTy_5 = FunctionType::get( |
| 79 | /*Result=*/Type::getVoidTy(mod->getContext()), |
| 80 | /*Params=*/FuncTy_5_args, |
| 81 | /*isVarArg=*/false); |
| 82 | |
| 83 | std::vector<Type*>FuncTy_6_args; |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 84 | FuncTy_6_args.push_back(PointerTy_2); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 85 | FunctionType* FuncTy_6 = FunctionType::get( |
| 86 | /*Result=*/Type::getVoidTy(mod->getContext()), |
| 87 | /*Params=*/FuncTy_6_args, |
| 88 | /*isVarArg=*/false); |
| 89 | |
| 90 | std::vector<Type*>FuncTy_7_args; |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 91 | FunctionType* FuncTy_7 = FunctionType::get( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 92 | /*Result=*/IntegerType::get(mod->getContext(), 1), |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 93 | /*Params=*/FuncTy_7_args, |
| 94 | /*isVarArg=*/false); |
| 95 | |
| 96 | std::vector<Type*>FuncTy_8_args; |
| 97 | FuncTy_8_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 98 | FuncTy_8_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 99 | FunctionType* FuncTy_8 = FunctionType::get( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 100 | /*Result=*/Type::getVoidTy(mod->getContext()), |
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)); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 106 | FunctionType* FuncTy_9 = FunctionType::get( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 107 | /*Result=*/Type::getVoidTy(mod->getContext()), |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 108 | /*Params=*/FuncTy_9_args, |
| 109 | /*isVarArg=*/false); |
| 110 | |
| 111 | std::vector<Type*>FuncTy_10_args; |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 112 | FuncTy_10_args.push_back(PointerTy_1); |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +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 | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 115 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
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 | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 120 | FuncTy_11_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 121 | FuncTy_11_args.push_back(PointerTy_1); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 122 | FunctionType* FuncTy_11 = FunctionType::get( |
| 123 | /*Result=*/PointerTy_1, |
| 124 | /*Params=*/FuncTy_11_args, |
| 125 | /*isVarArg=*/false); |
| 126 | |
| 127 | std::vector<Type*>FuncTy_12_args; |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 128 | FuncTy_12_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 129 | FuncTy_12_args.push_back(PointerTy_1); |
| 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( |
| 132 | /*Result=*/PointerTy_1, |
| 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); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 139 | FunctionType* FuncTy_13 = FunctionType::get( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 140 | /*Result=*/Type::getVoidTy(mod->getContext()), |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 141 | /*Params=*/FuncTy_13_args, |
| 142 | /*isVarArg=*/false); |
| 143 | |
| 144 | std::vector<Type*>FuncTy_14_args; |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 145 | FuncTy_14_args.push_back(PointerTy_1); |
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 | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 147 | FunctionType* FuncTy_14 = FunctionType::get( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 148 | /*Result=*/PointerTy_1, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 149 | /*Params=*/FuncTy_14_args, |
| 150 | /*isVarArg=*/false); |
| 151 | |
| 152 | std::vector<Type*>FuncTy_15_args; |
Logan Chien | a6b2ca6 | 2012-03-06 15:50:54 +0800 | [diff] [blame] | 153 | FuncTy_15_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 154 | FuncTy_15_args.push_back(PointerTy_1); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 155 | FuncTy_15_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 156 | FunctionType* FuncTy_15 = FunctionType::get( |
Logan Chien | a6b2ca6 | 2012-03-06 15:50:54 +0800 | [diff] [blame] | 157 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 158 | /*Params=*/FuncTy_15_args, |
| 159 | /*isVarArg=*/false); |
| 160 | |
| 161 | std::vector<Type*>FuncTy_16_args; |
| 162 | FuncTy_16_args.push_back(IntegerType::get(mod->getContext(), 32)); |
| 163 | FuncTy_16_args.push_back(PointerTy_1); |
Logan Chien | a6b2ca6 | 2012-03-06 15:50:54 +0800 | [diff] [blame] | 164 | FuncTy_16_args.push_back(IntegerType::get(mod->getContext(), 64)); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 165 | FunctionType* FuncTy_16 = FunctionType::get( |
| 166 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
| 167 | /*Params=*/FuncTy_16_args, |
| 168 | /*isVarArg=*/false); |
| 169 | |
| 170 | std::vector<Type*>FuncTy_17_args; |
| 171 | FuncTy_17_args.push_back(IntegerType::get(mod->getContext(), 32)); |
| 172 | FuncTy_17_args.push_back(PointerTy_1); |
Logan Chien | a6b2ca6 | 2012-03-06 15:50:54 +0800 | [diff] [blame] | 173 | FuncTy_17_args.push_back(PointerTy_1); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 174 | FunctionType* FuncTy_17 = FunctionType::get( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 175 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 176 | /*Params=*/FuncTy_17_args, |
| 177 | /*isVarArg=*/false); |
| 178 | |
| 179 | std::vector<Type*>FuncTy_18_args; |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 180 | FuncTy_18_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 181 | FuncTy_18_args.push_back(PointerTy_1); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 182 | FunctionType* FuncTy_18 = FunctionType::get( |
| 183 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
| 184 | /*Params=*/FuncTy_18_args, |
| 185 | /*isVarArg=*/false); |
| 186 | |
| 187 | std::vector<Type*>FuncTy_19_args; |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 188 | FuncTy_19_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 189 | FuncTy_19_args.push_back(PointerTy_1); |
| 190 | FunctionType* FuncTy_19 = FunctionType::get( |
Logan Chien | a6b2ca6 | 2012-03-06 15:50:54 +0800 | [diff] [blame] | 191 | /*Result=*/IntegerType::get(mod->getContext(), 64), |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 192 | /*Params=*/FuncTy_19_args, |
| 193 | /*isVarArg=*/false); |
| 194 | |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 195 | std::vector<Type*>FuncTy_20_args; |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 196 | FuncTy_20_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | a6b2ca6 | 2012-03-06 15:50:54 +0800 | [diff] [blame] | 197 | FuncTy_20_args.push_back(PointerTy_1); |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 198 | FuncTy_20_args.push_back(PointerTy_1); |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 199 | FuncTy_20_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 200 | FunctionType* FuncTy_20 = FunctionType::get( |
Logan Chien | a6b2ca6 | 2012-03-06 15:50:54 +0800 | [diff] [blame] | 201 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 202 | /*Params=*/FuncTy_20_args, |
| 203 | /*isVarArg=*/false); |
| 204 | |
| 205 | std::vector<Type*>FuncTy_21_args; |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 206 | FuncTy_21_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 207 | FuncTy_21_args.push_back(PointerTy_1); |
| 208 | FuncTy_21_args.push_back(PointerTy_1); |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 209 | FuncTy_21_args.push_back(IntegerType::get(mod->getContext(), 64)); |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 210 | FunctionType* FuncTy_21 = FunctionType::get( |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 211 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
Logan Chien | a6b2ca6 | 2012-03-06 15:50:54 +0800 | [diff] [blame] | 212 | /*Params=*/FuncTy_21_args, |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 213 | /*isVarArg=*/false); |
| 214 | |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 215 | std::vector<Type*>FuncTy_22_args; |
| 216 | FuncTy_22_args.push_back(IntegerType::get(mod->getContext(), 32)); |
| 217 | FuncTy_22_args.push_back(PointerTy_1); |
| 218 | FuncTy_22_args.push_back(PointerTy_1); |
| 219 | FuncTy_22_args.push_back(PointerTy_1); |
| 220 | FunctionType* FuncTy_22 = FunctionType::get( |
| 221 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
| 222 | /*Params=*/FuncTy_22_args, |
| 223 | /*isVarArg=*/false); |
| 224 | |
| 225 | std::vector<Type*>FuncTy_23_args; |
| 226 | FuncTy_23_args.push_back(IntegerType::get(mod->getContext(), 32)); |
| 227 | FuncTy_23_args.push_back(PointerTy_1); |
| 228 | FuncTy_23_args.push_back(PointerTy_1); |
| 229 | FunctionType* FuncTy_23 = FunctionType::get( |
| 230 | /*Result=*/IntegerType::get(mod->getContext(), 64), |
| 231 | /*Params=*/FuncTy_23_args, |
| 232 | /*isVarArg=*/false); |
| 233 | |
| 234 | std::vector<Type*>FuncTy_24_args; |
| 235 | FuncTy_24_args.push_back(IntegerType::get(mod->getContext(), 32)); |
| 236 | FuncTy_24_args.push_back(PointerTy_1); |
| 237 | FuncTy_24_args.push_back(PointerTy_1); |
| 238 | FunctionType* FuncTy_24 = FunctionType::get( |
| 239 | /*Result=*/PointerTy_1, |
| 240 | /*Params=*/FuncTy_24_args, |
| 241 | /*isVarArg=*/false); |
| 242 | |
| 243 | std::vector<Type*>FuncTy_25_args; |
| 244 | FuncTy_25_args.push_back(PointerTy_1); |
| 245 | FuncTy_25_args.push_back(PointerTy_1); |
| 246 | FunctionType* FuncTy_25 = FunctionType::get( |
| 247 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
| 248 | /*Params=*/FuncTy_25_args, |
| 249 | /*isVarArg=*/false); |
| 250 | |
| 251 | std::vector<Type*>FuncTy_26_args; |
| 252 | FuncTy_26_args.push_back(PointerTy_1); |
| 253 | FuncTy_26_args.push_back(PointerTy_1); |
| 254 | FunctionType* FuncTy_26 = FunctionType::get( |
| 255 | /*Result=*/Type::getVoidTy(mod->getContext()), |
| 256 | /*Params=*/FuncTy_26_args, |
| 257 | /*isVarArg=*/false); |
| 258 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 259 | |
| 260 | // Function Declarations |
| 261 | |
| 262 | Function* func___art_type_list = mod->getFunction("__art_type_list"); |
| 263 | if (!func___art_type_list) { |
| 264 | func___art_type_list = Function::Create( |
| 265 | /*Type=*/FuncTy_0, |
| 266 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 267 | /*Name=*/"__art_type_list", mod); // (external, no body) |
| 268 | func___art_type_list->setCallingConv(CallingConv::C); |
| 269 | } |
| 270 | AttrListPtr func___art_type_list_PAL; |
| 271 | func___art_type_list->setAttributes(func___art_type_list_PAL); |
| 272 | |
| 273 | Function* func_art_get_current_thread_from_code = mod->getFunction("art_get_current_thread_from_code"); |
| 274 | if (!func_art_get_current_thread_from_code) { |
| 275 | func_art_get_current_thread_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 276 | /*Type=*/FuncTy_3, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 277 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 278 | /*Name=*/"art_get_current_thread_from_code", mod); // (external, no body) |
| 279 | func_art_get_current_thread_from_code->setCallingConv(CallingConv::C); |
| 280 | } |
| 281 | AttrListPtr func_art_get_current_thread_from_code_PAL; |
| 282 | func_art_get_current_thread_from_code->setAttributes(func_art_get_current_thread_from_code_PAL); |
| 283 | |
| 284 | Function* func_art_set_current_thread_from_code = mod->getFunction("art_set_current_thread_from_code"); |
| 285 | if (!func_art_set_current_thread_from_code) { |
| 286 | func_art_set_current_thread_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 287 | /*Type=*/FuncTy_4, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 288 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 289 | /*Name=*/"art_set_current_thread_from_code", mod); // (external, no body) |
| 290 | func_art_set_current_thread_from_code->setCallingConv(CallingConv::C); |
| 291 | } |
| 292 | AttrListPtr func_art_set_current_thread_from_code_PAL; |
| 293 | func_art_set_current_thread_from_code->setAttributes(func_art_set_current_thread_from_code_PAL); |
| 294 | |
| 295 | Function* func_art_lock_object_from_code = mod->getFunction("art_lock_object_from_code"); |
| 296 | if (!func_art_lock_object_from_code) { |
| 297 | func_art_lock_object_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 298 | /*Type=*/FuncTy_4, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 299 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 300 | /*Name=*/"art_lock_object_from_code", mod); // (external, no body) |
| 301 | func_art_lock_object_from_code->setCallingConv(CallingConv::C); |
| 302 | } |
| 303 | AttrListPtr func_art_lock_object_from_code_PAL; |
| 304 | func_art_lock_object_from_code->setAttributes(func_art_lock_object_from_code_PAL); |
| 305 | |
| 306 | Function* func_art_unlock_object_from_code = mod->getFunction("art_unlock_object_from_code"); |
| 307 | if (!func_art_unlock_object_from_code) { |
| 308 | func_art_unlock_object_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 309 | /*Type=*/FuncTy_4, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 310 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 311 | /*Name=*/"art_unlock_object_from_code", mod); // (external, no body) |
| 312 | func_art_unlock_object_from_code->setCallingConv(CallingConv::C); |
| 313 | } |
| 314 | AttrListPtr func_art_unlock_object_from_code_PAL; |
| 315 | func_art_unlock_object_from_code->setAttributes(func_art_unlock_object_from_code_PAL); |
| 316 | |
| 317 | Function* func_art_test_suspend_from_code = mod->getFunction("art_test_suspend_from_code"); |
| 318 | if (!func_art_test_suspend_from_code) { |
| 319 | func_art_test_suspend_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 320 | /*Type=*/FuncTy_5, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 321 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 322 | /*Name=*/"art_test_suspend_from_code", mod); // (external, no body) |
| 323 | func_art_test_suspend_from_code->setCallingConv(CallingConv::C); |
| 324 | } |
| 325 | AttrListPtr func_art_test_suspend_from_code_PAL; |
| 326 | func_art_test_suspend_from_code->setAttributes(func_art_test_suspend_from_code_PAL); |
| 327 | |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 328 | Function* func_art_push_shadow_frame_from_code = mod->getFunction("art_push_shadow_frame_from_code"); |
| 329 | if (!func_art_push_shadow_frame_from_code) { |
| 330 | func_art_push_shadow_frame_from_code = Function::Create( |
| 331 | /*Type=*/FuncTy_6, |
| 332 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 333 | /*Name=*/"art_push_shadow_frame_from_code", mod); // (external, no body) |
| 334 | func_art_push_shadow_frame_from_code->setCallingConv(CallingConv::C); |
| 335 | } |
| 336 | AttrListPtr func_art_push_shadow_frame_from_code_PAL; |
| 337 | func_art_push_shadow_frame_from_code->setAttributes(func_art_push_shadow_frame_from_code_PAL); |
| 338 | |
| 339 | Function* func_art_pop_shadow_frame_from_code = mod->getFunction("art_pop_shadow_frame_from_code"); |
| 340 | if (!func_art_pop_shadow_frame_from_code) { |
| 341 | func_art_pop_shadow_frame_from_code = Function::Create( |
| 342 | /*Type=*/FuncTy_5, |
| 343 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 344 | /*Name=*/"art_pop_shadow_frame_from_code", mod); // (external, no body) |
| 345 | func_art_pop_shadow_frame_from_code->setCallingConv(CallingConv::C); |
| 346 | } |
| 347 | AttrListPtr func_art_pop_shadow_frame_from_code_PAL; |
| 348 | func_art_pop_shadow_frame_from_code->setAttributes(func_art_pop_shadow_frame_from_code_PAL); |
| 349 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 350 | Function* func_art_is_exception_pending_from_code = mod->getFunction("art_is_exception_pending_from_code"); |
| 351 | if (!func_art_is_exception_pending_from_code) { |
| 352 | func_art_is_exception_pending_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 353 | /*Type=*/FuncTy_7, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 354 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 355 | /*Name=*/"art_is_exception_pending_from_code", mod); // (external, no body) |
| 356 | func_art_is_exception_pending_from_code->setCallingConv(CallingConv::C); |
| 357 | } |
| 358 | AttrListPtr func_art_is_exception_pending_from_code_PAL; |
| 359 | func_art_is_exception_pending_from_code->setAttributes(func_art_is_exception_pending_from_code_PAL); |
| 360 | |
| 361 | Function* func_art_throw_div_zero_from_code = mod->getFunction("art_throw_div_zero_from_code"); |
| 362 | if (!func_art_throw_div_zero_from_code) { |
| 363 | func_art_throw_div_zero_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 364 | /*Type=*/FuncTy_5, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 365 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 366 | /*Name=*/"art_throw_div_zero_from_code", mod); // (external, no body) |
| 367 | func_art_throw_div_zero_from_code->setCallingConv(CallingConv::C); |
| 368 | } |
| 369 | AttrListPtr func_art_throw_div_zero_from_code_PAL; |
| 370 | func_art_throw_div_zero_from_code->setAttributes(func_art_throw_div_zero_from_code_PAL); |
| 371 | |
| 372 | Function* func_art_throw_array_bounds_from_code = mod->getFunction("art_throw_array_bounds_from_code"); |
| 373 | if (!func_art_throw_array_bounds_from_code) { |
| 374 | func_art_throw_array_bounds_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 375 | /*Type=*/FuncTy_8, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 376 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 377 | /*Name=*/"art_throw_array_bounds_from_code", mod); // (external, no body) |
| 378 | func_art_throw_array_bounds_from_code->setCallingConv(CallingConv::C); |
| 379 | } |
| 380 | AttrListPtr func_art_throw_array_bounds_from_code_PAL; |
| 381 | func_art_throw_array_bounds_from_code->setAttributes(func_art_throw_array_bounds_from_code_PAL); |
| 382 | |
| 383 | Function* func_art_throw_no_such_method_from_code = mod->getFunction("art_throw_no_such_method_from_code"); |
| 384 | if (!func_art_throw_no_such_method_from_code) { |
| 385 | func_art_throw_no_such_method_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 386 | /*Type=*/FuncTy_9, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 387 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 388 | /*Name=*/"art_throw_no_such_method_from_code", mod); // (external, no body) |
| 389 | func_art_throw_no_such_method_from_code->setCallingConv(CallingConv::C); |
| 390 | } |
| 391 | AttrListPtr func_art_throw_no_such_method_from_code_PAL; |
| 392 | func_art_throw_no_such_method_from_code->setAttributes(func_art_throw_no_such_method_from_code_PAL); |
| 393 | |
| 394 | Function* func_art_throw_null_pointer_exception_from_code = mod->getFunction("art_throw_null_pointer_exception_from_code"); |
| 395 | if (!func_art_throw_null_pointer_exception_from_code) { |
| 396 | func_art_throw_null_pointer_exception_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 397 | /*Type=*/FuncTy_5, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 398 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 399 | /*Name=*/"art_throw_null_pointer_exception_from_code", mod); // (external, no body) |
| 400 | func_art_throw_null_pointer_exception_from_code->setCallingConv(CallingConv::C); |
| 401 | } |
| 402 | AttrListPtr func_art_throw_null_pointer_exception_from_code_PAL; |
| 403 | func_art_throw_null_pointer_exception_from_code->setAttributes(func_art_throw_null_pointer_exception_from_code_PAL); |
| 404 | |
| 405 | Function* func_art_throw_stack_overflow_from_code = mod->getFunction("art_throw_stack_overflow_from_code"); |
| 406 | if (!func_art_throw_stack_overflow_from_code) { |
| 407 | func_art_throw_stack_overflow_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 408 | /*Type=*/FuncTy_4, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 409 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 410 | /*Name=*/"art_throw_stack_overflow_from_code", mod); // (external, no body) |
| 411 | func_art_throw_stack_overflow_from_code->setCallingConv(CallingConv::C); |
| 412 | } |
| 413 | AttrListPtr func_art_throw_stack_overflow_from_code_PAL; |
| 414 | func_art_throw_stack_overflow_from_code->setAttributes(func_art_throw_stack_overflow_from_code_PAL); |
| 415 | |
| 416 | Function* func_art_throw_exception_from_code = mod->getFunction("art_throw_exception_from_code"); |
| 417 | if (!func_art_throw_exception_from_code) { |
| 418 | func_art_throw_exception_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 419 | /*Type=*/FuncTy_4, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 420 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 421 | /*Name=*/"art_throw_exception_from_code", mod); // (external, no body) |
| 422 | func_art_throw_exception_from_code->setCallingConv(CallingConv::C); |
| 423 | } |
| 424 | AttrListPtr func_art_throw_exception_from_code_PAL; |
| 425 | func_art_throw_exception_from_code->setAttributes(func_art_throw_exception_from_code_PAL); |
| 426 | |
| 427 | Function* func_art_find_catch_block_from_code = mod->getFunction("art_find_catch_block_from_code"); |
| 428 | if (!func_art_find_catch_block_from_code) { |
| 429 | func_art_find_catch_block_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 430 | /*Type=*/FuncTy_10, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 431 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 432 | /*Name=*/"art_find_catch_block_from_code", mod); // (external, no body) |
| 433 | func_art_find_catch_block_from_code->setCallingConv(CallingConv::C); |
| 434 | } |
| 435 | AttrListPtr func_art_find_catch_block_from_code_PAL; |
| 436 | func_art_find_catch_block_from_code->setAttributes(func_art_find_catch_block_from_code_PAL); |
| 437 | |
| 438 | Function* func_art_alloc_object_from_code = mod->getFunction("art_alloc_object_from_code"); |
| 439 | if (!func_art_alloc_object_from_code) { |
| 440 | func_art_alloc_object_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 441 | /*Type=*/FuncTy_11, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 442 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 443 | /*Name=*/"art_alloc_object_from_code", mod); // (external, no body) |
| 444 | func_art_alloc_object_from_code->setCallingConv(CallingConv::C); |
| 445 | } |
| 446 | AttrListPtr func_art_alloc_object_from_code_PAL; |
| 447 | func_art_alloc_object_from_code->setAttributes(func_art_alloc_object_from_code_PAL); |
| 448 | |
| 449 | Function* func_art_alloc_object_from_code_with_access_check = mod->getFunction("art_alloc_object_from_code_with_access_check"); |
| 450 | if (!func_art_alloc_object_from_code_with_access_check) { |
| 451 | func_art_alloc_object_from_code_with_access_check = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 452 | /*Type=*/FuncTy_11, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 453 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 454 | /*Name=*/"art_alloc_object_from_code_with_access_check", mod); // (external, no body) |
| 455 | func_art_alloc_object_from_code_with_access_check->setCallingConv(CallingConv::C); |
| 456 | } |
| 457 | AttrListPtr func_art_alloc_object_from_code_with_access_check_PAL; |
| 458 | func_art_alloc_object_from_code_with_access_check->setAttributes(func_art_alloc_object_from_code_with_access_check_PAL); |
| 459 | |
| 460 | Function* func_art_alloc_array_from_code = mod->getFunction("art_alloc_array_from_code"); |
| 461 | if (!func_art_alloc_array_from_code) { |
| 462 | func_art_alloc_array_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 463 | /*Type=*/FuncTy_12, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 464 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 465 | /*Name=*/"art_alloc_array_from_code", mod); // (external, no body) |
| 466 | func_art_alloc_array_from_code->setCallingConv(CallingConv::C); |
| 467 | } |
| 468 | AttrListPtr func_art_alloc_array_from_code_PAL; |
| 469 | func_art_alloc_array_from_code->setAttributes(func_art_alloc_array_from_code_PAL); |
| 470 | |
| 471 | Function* func_art_alloc_array_from_code_with_access_check = mod->getFunction("art_alloc_array_from_code_with_access_check"); |
| 472 | if (!func_art_alloc_array_from_code_with_access_check) { |
| 473 | func_art_alloc_array_from_code_with_access_check = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 474 | /*Type=*/FuncTy_12, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 475 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 476 | /*Name=*/"art_alloc_array_from_code_with_access_check", mod); // (external, no body) |
| 477 | func_art_alloc_array_from_code_with_access_check->setCallingConv(CallingConv::C); |
| 478 | } |
| 479 | AttrListPtr func_art_alloc_array_from_code_with_access_check_PAL; |
| 480 | func_art_alloc_array_from_code_with_access_check->setAttributes(func_art_alloc_array_from_code_with_access_check_PAL); |
| 481 | |
| 482 | Function* func_art_check_and_alloc_array_from_code = mod->getFunction("art_check_and_alloc_array_from_code"); |
| 483 | if (!func_art_check_and_alloc_array_from_code) { |
| 484 | func_art_check_and_alloc_array_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 485 | /*Type=*/FuncTy_12, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 486 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 487 | /*Name=*/"art_check_and_alloc_array_from_code", mod); // (external, no body) |
| 488 | func_art_check_and_alloc_array_from_code->setCallingConv(CallingConv::C); |
| 489 | } |
| 490 | AttrListPtr func_art_check_and_alloc_array_from_code_PAL; |
| 491 | func_art_check_and_alloc_array_from_code->setAttributes(func_art_check_and_alloc_array_from_code_PAL); |
| 492 | |
| 493 | Function* func_art_check_and_alloc_array_from_code_with_access_check = mod->getFunction("art_check_and_alloc_array_from_code_with_access_check"); |
| 494 | if (!func_art_check_and_alloc_array_from_code_with_access_check) { |
| 495 | func_art_check_and_alloc_array_from_code_with_access_check = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 496 | /*Type=*/FuncTy_12, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 497 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 498 | /*Name=*/"art_check_and_alloc_array_from_code_with_access_check", mod); // (external, no body) |
| 499 | func_art_check_and_alloc_array_from_code_with_access_check->setCallingConv(CallingConv::C); |
| 500 | } |
| 501 | AttrListPtr func_art_check_and_alloc_array_from_code_with_access_check_PAL; |
| 502 | func_art_check_and_alloc_array_from_code_with_access_check->setAttributes(func_art_check_and_alloc_array_from_code_with_access_check_PAL); |
| 503 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 504 | Function* func_art_find_instance_field_from_code = mod->getFunction("art_find_instance_field_from_code"); |
| 505 | if (!func_art_find_instance_field_from_code) { |
| 506 | func_art_find_instance_field_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 507 | /*Type=*/FuncTy_13, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 508 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 509 | /*Name=*/"art_find_instance_field_from_code", mod); // (external, no body) |
| 510 | func_art_find_instance_field_from_code->setCallingConv(CallingConv::C); |
| 511 | } |
| 512 | AttrListPtr func_art_find_instance_field_from_code_PAL; |
| 513 | func_art_find_instance_field_from_code->setAttributes(func_art_find_instance_field_from_code_PAL); |
| 514 | |
| 515 | Function* func_art_find_static_field_from_code = mod->getFunction("art_find_static_field_from_code"); |
| 516 | if (!func_art_find_static_field_from_code) { |
| 517 | func_art_find_static_field_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 518 | /*Type=*/FuncTy_13, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 519 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 520 | /*Name=*/"art_find_static_field_from_code", mod); // (external, no body) |
| 521 | func_art_find_static_field_from_code->setCallingConv(CallingConv::C); |
| 522 | } |
| 523 | AttrListPtr func_art_find_static_field_from_code_PAL; |
| 524 | func_art_find_static_field_from_code->setAttributes(func_art_find_static_field_from_code_PAL); |
| 525 | |
| 526 | Function* func_art_find_interface_method_from_code = mod->getFunction("art_find_interface_method_from_code"); |
| 527 | if (!func_art_find_interface_method_from_code) { |
| 528 | func_art_find_interface_method_from_code = Function::Create( |
Shih-wei Liao | 399ed3f | 2012-03-08 01:27:04 -0800 | [diff] [blame^] | 529 | /*Type=*/FuncTy_24, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 530 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 531 | /*Name=*/"art_find_interface_method_from_code", mod); // (external, no body) |
| 532 | func_art_find_interface_method_from_code->setCallingConv(CallingConv::C); |
| 533 | } |
| 534 | AttrListPtr func_art_find_interface_method_from_code_PAL; |
| 535 | func_art_find_interface_method_from_code->setAttributes(func_art_find_interface_method_from_code_PAL); |
| 536 | |
Shih-wei Liao | 399ed3f | 2012-03-08 01:27:04 -0800 | [diff] [blame^] | 537 | Function* func_art_find_virtual_method_from_code = mod->getFunction("art_find_virtual_method_from_code"); |
| 538 | if (!func_art_find_virtual_method_from_code) { |
| 539 | func_art_find_virtual_method_from_code = Function::Create( |
| 540 | /*Type=*/FuncTy_24, |
| 541 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 542 | /*Name=*/"art_find_virtual_method_from_code", mod); // (external, no body) |
| 543 | func_art_find_virtual_method_from_code->setCallingConv(CallingConv::C); |
| 544 | } |
| 545 | AttrListPtr func_art_find_virtual_method_from_code_PAL; |
| 546 | func_art_find_virtual_method_from_code->setAttributes(func_art_find_virtual_method_from_code_PAL); |
| 547 | |
| 548 | Function* func_art_find_super_method_from_code = mod->getFunction("art_find_super_method_from_code"); |
| 549 | if (!func_art_find_super_method_from_code) { |
| 550 | func_art_find_super_method_from_code = Function::Create( |
| 551 | /*Type=*/FuncTy_24, |
| 552 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 553 | /*Name=*/"art_find_super_method_from_code", mod); // (external, no body) |
| 554 | func_art_find_super_method_from_code->setCallingConv(CallingConv::C); |
| 555 | } |
| 556 | AttrListPtr func_art_find_super_method_from_code_PAL; |
| 557 | func_art_find_super_method_from_code->setAttributes(func_art_find_super_method_from_code_PAL); |
| 558 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 559 | Function* func_art_initialize_static_storage_from_code = mod->getFunction("art_initialize_static_storage_from_code"); |
| 560 | if (!func_art_initialize_static_storage_from_code) { |
| 561 | func_art_initialize_static_storage_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 562 | /*Type=*/FuncTy_11, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 563 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 564 | /*Name=*/"art_initialize_static_storage_from_code", mod); // (external, no body) |
| 565 | func_art_initialize_static_storage_from_code->setCallingConv(CallingConv::C); |
| 566 | } |
| 567 | AttrListPtr func_art_initialize_static_storage_from_code_PAL; |
| 568 | func_art_initialize_static_storage_from_code->setAttributes(func_art_initialize_static_storage_from_code_PAL); |
| 569 | |
| 570 | Function* func_art_initialize_type_from_code = mod->getFunction("art_initialize_type_from_code"); |
| 571 | if (!func_art_initialize_type_from_code) { |
| 572 | func_art_initialize_type_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 573 | /*Type=*/FuncTy_11, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 574 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 575 | /*Name=*/"art_initialize_type_from_code", mod); // (external, no body) |
| 576 | func_art_initialize_type_from_code->setCallingConv(CallingConv::C); |
| 577 | } |
| 578 | AttrListPtr func_art_initialize_type_from_code_PAL; |
| 579 | func_art_initialize_type_from_code->setAttributes(func_art_initialize_type_from_code_PAL); |
| 580 | |
| 581 | Function* func_art_initialize_type_and_verify_access_from_code = mod->getFunction("art_initialize_type_and_verify_access_from_code"); |
| 582 | if (!func_art_initialize_type_and_verify_access_from_code) { |
| 583 | func_art_initialize_type_and_verify_access_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 584 | /*Type=*/FuncTy_11, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 585 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 586 | /*Name=*/"art_initialize_type_and_verify_access_from_code", mod); // (external, no body) |
| 587 | func_art_initialize_type_and_verify_access_from_code->setCallingConv(CallingConv::C); |
| 588 | } |
| 589 | AttrListPtr func_art_initialize_type_and_verify_access_from_code_PAL; |
| 590 | func_art_initialize_type_and_verify_access_from_code->setAttributes(func_art_initialize_type_and_verify_access_from_code_PAL); |
| 591 | |
| 592 | Function* func_art_resolve_string_from_code = mod->getFunction("art_resolve_string_from_code"); |
| 593 | if (!func_art_resolve_string_from_code) { |
| 594 | func_art_resolve_string_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 595 | /*Type=*/FuncTy_14, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 596 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 597 | /*Name=*/"art_resolve_string_from_code", mod); // (external, no body) |
| 598 | func_art_resolve_string_from_code->setCallingConv(CallingConv::C); |
| 599 | } |
| 600 | AttrListPtr func_art_resolve_string_from_code_PAL; |
| 601 | func_art_resolve_string_from_code->setAttributes(func_art_resolve_string_from_code_PAL); |
| 602 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 603 | Function* func_art_set32_static_from_code = mod->getFunction("art_set32_static_from_code"); |
| 604 | if (!func_art_set32_static_from_code) { |
| 605 | func_art_set32_static_from_code = Function::Create( |
Logan Chien | a6b2ca6 | 2012-03-06 15:50:54 +0800 | [diff] [blame] | 606 | /*Type=*/FuncTy_15, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 607 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 608 | /*Name=*/"art_set32_static_from_code", mod); // (external, no body) |
| 609 | func_art_set32_static_from_code->setCallingConv(CallingConv::C); |
| 610 | } |
| 611 | AttrListPtr func_art_set32_static_from_code_PAL; |
| 612 | func_art_set32_static_from_code->setAttributes(func_art_set32_static_from_code_PAL); |
| 613 | |
| 614 | Function* func_art_set64_static_from_code = mod->getFunction("art_set64_static_from_code"); |
| 615 | if (!func_art_set64_static_from_code) { |
| 616 | func_art_set64_static_from_code = Function::Create( |
Logan Chien | a6b2ca6 | 2012-03-06 15:50:54 +0800 | [diff] [blame] | 617 | /*Type=*/FuncTy_16, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 618 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 619 | /*Name=*/"art_set64_static_from_code", mod); // (external, no body) |
| 620 | func_art_set64_static_from_code->setCallingConv(CallingConv::C); |
| 621 | } |
| 622 | AttrListPtr func_art_set64_static_from_code_PAL; |
| 623 | func_art_set64_static_from_code->setAttributes(func_art_set64_static_from_code_PAL); |
| 624 | |
| 625 | Function* func_art_set_obj_static_from_code = mod->getFunction("art_set_obj_static_from_code"); |
| 626 | if (!func_art_set_obj_static_from_code) { |
| 627 | func_art_set_obj_static_from_code = Function::Create( |
Logan Chien | a6b2ca6 | 2012-03-06 15:50:54 +0800 | [diff] [blame] | 628 | /*Type=*/FuncTy_17, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 629 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 630 | /*Name=*/"art_set_obj_static_from_code", mod); // (external, no body) |
| 631 | func_art_set_obj_static_from_code->setCallingConv(CallingConv::C); |
| 632 | } |
| 633 | AttrListPtr func_art_set_obj_static_from_code_PAL; |
| 634 | func_art_set_obj_static_from_code->setAttributes(func_art_set_obj_static_from_code_PAL); |
| 635 | |
| 636 | Function* func_art_get32_static_from_code = mod->getFunction("art_get32_static_from_code"); |
| 637 | if (!func_art_get32_static_from_code) { |
| 638 | func_art_get32_static_from_code = Function::Create( |
Logan Chien | a6b2ca6 | 2012-03-06 15:50:54 +0800 | [diff] [blame] | 639 | /*Type=*/FuncTy_18, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 640 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 641 | /*Name=*/"art_get32_static_from_code", mod); // (external, no body) |
| 642 | func_art_get32_static_from_code->setCallingConv(CallingConv::C); |
| 643 | } |
| 644 | AttrListPtr func_art_get32_static_from_code_PAL; |
| 645 | func_art_get32_static_from_code->setAttributes(func_art_get32_static_from_code_PAL); |
| 646 | |
| 647 | Function* func_art_get64_static_from_code = mod->getFunction("art_get64_static_from_code"); |
| 648 | if (!func_art_get64_static_from_code) { |
| 649 | func_art_get64_static_from_code = Function::Create( |
Logan Chien | a6b2ca6 | 2012-03-06 15:50:54 +0800 | [diff] [blame] | 650 | /*Type=*/FuncTy_19, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 651 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 652 | /*Name=*/"art_get64_static_from_code", mod); // (external, no body) |
| 653 | func_art_get64_static_from_code->setCallingConv(CallingConv::C); |
| 654 | } |
| 655 | AttrListPtr func_art_get64_static_from_code_PAL; |
| 656 | func_art_get64_static_from_code->setAttributes(func_art_get64_static_from_code_PAL); |
| 657 | |
| 658 | Function* func_art_get_obj_static_from_code = mod->getFunction("art_get_obj_static_from_code"); |
| 659 | if (!func_art_get_obj_static_from_code) { |
| 660 | func_art_get_obj_static_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 661 | /*Type=*/FuncTy_11, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 662 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 663 | /*Name=*/"art_get_obj_static_from_code", mod); // (external, no body) |
| 664 | func_art_get_obj_static_from_code->setCallingConv(CallingConv::C); |
| 665 | } |
| 666 | AttrListPtr func_art_get_obj_static_from_code_PAL; |
| 667 | func_art_get_obj_static_from_code->setAttributes(func_art_get_obj_static_from_code_PAL); |
| 668 | |
| 669 | Function* func_art_set32_instance_from_code = mod->getFunction("art_set32_instance_from_code"); |
| 670 | if (!func_art_set32_instance_from_code) { |
| 671 | func_art_set32_instance_from_code = Function::Create( |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 672 | /*Type=*/FuncTy_20, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 673 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 674 | /*Name=*/"art_set32_instance_from_code", mod); // (external, no body) |
| 675 | func_art_set32_instance_from_code->setCallingConv(CallingConv::C); |
| 676 | } |
| 677 | AttrListPtr func_art_set32_instance_from_code_PAL; |
| 678 | func_art_set32_instance_from_code->setAttributes(func_art_set32_instance_from_code_PAL); |
| 679 | |
| 680 | Function* func_art_set64_instance_from_code = mod->getFunction("art_set64_instance_from_code"); |
| 681 | if (!func_art_set64_instance_from_code) { |
| 682 | func_art_set64_instance_from_code = Function::Create( |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 683 | /*Type=*/FuncTy_21, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 684 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 685 | /*Name=*/"art_set64_instance_from_code", mod); // (external, no body) |
| 686 | func_art_set64_instance_from_code->setCallingConv(CallingConv::C); |
| 687 | } |
| 688 | AttrListPtr func_art_set64_instance_from_code_PAL; |
| 689 | func_art_set64_instance_from_code->setAttributes(func_art_set64_instance_from_code_PAL); |
| 690 | |
| 691 | Function* func_art_set_obj_instance_from_code = mod->getFunction("art_set_obj_instance_from_code"); |
| 692 | if (!func_art_set_obj_instance_from_code) { |
| 693 | func_art_set_obj_instance_from_code = Function::Create( |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 694 | /*Type=*/FuncTy_22, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 695 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 696 | /*Name=*/"art_set_obj_instance_from_code", mod); // (external, no body) |
| 697 | func_art_set_obj_instance_from_code->setCallingConv(CallingConv::C); |
| 698 | } |
| 699 | AttrListPtr func_art_set_obj_instance_from_code_PAL; |
| 700 | func_art_set_obj_instance_from_code->setAttributes(func_art_set_obj_instance_from_code_PAL); |
| 701 | |
| 702 | Function* func_art_get32_instance_from_code = mod->getFunction("art_get32_instance_from_code"); |
| 703 | if (!func_art_get32_instance_from_code) { |
| 704 | func_art_get32_instance_from_code = Function::Create( |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 705 | /*Type=*/FuncTy_17, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 706 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 707 | /*Name=*/"art_get32_instance_from_code", mod); // (external, no body) |
| 708 | func_art_get32_instance_from_code->setCallingConv(CallingConv::C); |
| 709 | } |
| 710 | AttrListPtr func_art_get32_instance_from_code_PAL; |
| 711 | func_art_get32_instance_from_code->setAttributes(func_art_get32_instance_from_code_PAL); |
| 712 | |
| 713 | Function* func_art_get64_instance_from_code = mod->getFunction("art_get64_instance_from_code"); |
| 714 | if (!func_art_get64_instance_from_code) { |
| 715 | func_art_get64_instance_from_code = Function::Create( |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 716 | /*Type=*/FuncTy_23, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 717 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 718 | /*Name=*/"art_get64_instance_from_code", mod); // (external, no body) |
| 719 | func_art_get64_instance_from_code->setCallingConv(CallingConv::C); |
| 720 | } |
| 721 | AttrListPtr func_art_get64_instance_from_code_PAL; |
| 722 | func_art_get64_instance_from_code->setAttributes(func_art_get64_instance_from_code_PAL); |
| 723 | |
| 724 | Function* func_art_get_obj_instance_from_code = mod->getFunction("art_get_obj_instance_from_code"); |
| 725 | if (!func_art_get_obj_instance_from_code) { |
| 726 | func_art_get_obj_instance_from_code = Function::Create( |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 727 | /*Type=*/FuncTy_24, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 728 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 729 | /*Name=*/"art_get_obj_instance_from_code", mod); // (external, no body) |
| 730 | func_art_get_obj_instance_from_code->setCallingConv(CallingConv::C); |
| 731 | } |
| 732 | AttrListPtr func_art_get_obj_instance_from_code_PAL; |
| 733 | func_art_get_obj_instance_from_code->setAttributes(func_art_get_obj_instance_from_code_PAL); |
| 734 | |
| 735 | Function* func_art_is_assignable_from_code = mod->getFunction("art_is_assignable_from_code"); |
| 736 | if (!func_art_is_assignable_from_code) { |
| 737 | func_art_is_assignable_from_code = Function::Create( |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 738 | /*Type=*/FuncTy_25, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 739 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 740 | /*Name=*/"art_is_assignable_from_code", mod); // (external, no body) |
| 741 | func_art_is_assignable_from_code->setCallingConv(CallingConv::C); |
| 742 | } |
| 743 | AttrListPtr func_art_is_assignable_from_code_PAL; |
| 744 | func_art_is_assignable_from_code->setAttributes(func_art_is_assignable_from_code_PAL); |
| 745 | |
| 746 | Function* func_art_check_cast_from_code = mod->getFunction("art_check_cast_from_code"); |
| 747 | if (!func_art_check_cast_from_code) { |
| 748 | func_art_check_cast_from_code = Function::Create( |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 749 | /*Type=*/FuncTy_26, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 750 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 751 | /*Name=*/"art_check_cast_from_code", mod); // (external, no body) |
| 752 | func_art_check_cast_from_code->setCallingConv(CallingConv::C); |
| 753 | } |
| 754 | AttrListPtr func_art_check_cast_from_code_PAL; |
| 755 | func_art_check_cast_from_code->setAttributes(func_art_check_cast_from_code_PAL); |
| 756 | |
| 757 | // Global Variable Declarations |
| 758 | |
| 759 | |
| 760 | // Constant Definitions |
| 761 | |
| 762 | // Global Variable Definitions |
| 763 | |
| 764 | // Function Definitions |
| 765 | |
| 766 | return mod; |
| 767 | |
| 768 | } |
Logan Chien | e75a8cc | 2012-02-24 12:26:43 +0800 | [diff] [blame] | 769 | |
| 770 | } // namespace compiler_llvm |
| 771 | } // namespace art |