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; |
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 | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 114 | FuncTy_10_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 115 | FunctionType* FuncTy_10 = FunctionType::get( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 116 | /*Result=*/Type::getVoidTy(mod->getContext()), |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 117 | /*Params=*/FuncTy_10_args, |
| 118 | /*isVarArg=*/false); |
| 119 | |
| 120 | std::vector<Type*>FuncTy_11_args; |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 121 | FuncTy_11_args.push_back(PointerTy_1); |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [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( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 124 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
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; |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 129 | FuncTy_12_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 130 | FuncTy_12_args.push_back(PointerTy_1); |
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 | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 139 | FuncTy_13_args.push_back(IntegerType::get(mod->getContext(), 32)); |
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); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 148 | FunctionType* FuncTy_14 = FunctionType::get( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 149 | /*Result=*/Type::getVoidTy(mod->getContext()), |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 150 | /*Params=*/FuncTy_14_args, |
| 151 | /*isVarArg=*/false); |
| 152 | |
| 153 | std::vector<Type*>FuncTy_15_args; |
| 154 | FuncTy_15_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 155 | FuncTy_15_args.push_back(PointerTy_1); |
| 156 | FuncTy_15_args.push_back(PointerTy_1); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 157 | FunctionType* FuncTy_15 = FunctionType::get( |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 158 | /*Result=*/PointerTy_1, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 159 | /*Params=*/FuncTy_15_args, |
| 160 | /*isVarArg=*/false); |
| 161 | |
| 162 | std::vector<Type*>FuncTy_16_args; |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 163 | FuncTy_16_args.push_back(PointerTy_1); |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 164 | FuncTy_16_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 165 | FunctionType* FuncTy_16 = FunctionType::get( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 166 | /*Result=*/PointerTy_1, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 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 | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 173 | FuncTy_17_args.push_back(IntegerType::get(mod->getContext(), 32)); |
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 | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 182 | FuncTy_18_args.push_back(IntegerType::get(mod->getContext(), 64)); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 183 | FunctionType* FuncTy_18 = FunctionType::get( |
| 184 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
| 185 | /*Params=*/FuncTy_18_args, |
| 186 | /*isVarArg=*/false); |
| 187 | |
| 188 | std::vector<Type*>FuncTy_19_args; |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 189 | FuncTy_19_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 190 | FuncTy_19_args.push_back(PointerTy_1); |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 191 | FuncTy_19_args.push_back(PointerTy_1); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 192 | FunctionType* FuncTy_19 = FunctionType::get( |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 193 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 194 | /*Params=*/FuncTy_19_args, |
| 195 | /*isVarArg=*/false); |
| 196 | |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 197 | std::vector<Type*>FuncTy_20_args; |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 198 | FuncTy_20_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | a6b2ca6 | 2012-03-06 15:50:54 +0800 | [diff] [blame] | 199 | FuncTy_20_args.push_back(PointerTy_1); |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 200 | FunctionType* FuncTy_20 = FunctionType::get( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +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); |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 208 | FunctionType* FuncTy_21 = FunctionType::get( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 209 | /*Result=*/IntegerType::get(mod->getContext(), 64), |
Logan Chien | a6b2ca6 | 2012-03-06 15:50:54 +0800 | [diff] [blame] | 210 | /*Params=*/FuncTy_21_args, |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 211 | /*isVarArg=*/false); |
| 212 | |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 213 | std::vector<Type*>FuncTy_22_args; |
| 214 | FuncTy_22_args.push_back(IntegerType::get(mod->getContext(), 32)); |
| 215 | FuncTy_22_args.push_back(PointerTy_1); |
| 216 | FuncTy_22_args.push_back(PointerTy_1); |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 217 | FuncTy_22_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 218 | FunctionType* FuncTy_22 = FunctionType::get( |
| 219 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
| 220 | /*Params=*/FuncTy_22_args, |
| 221 | /*isVarArg=*/false); |
| 222 | |
| 223 | std::vector<Type*>FuncTy_23_args; |
| 224 | FuncTy_23_args.push_back(IntegerType::get(mod->getContext(), 32)); |
| 225 | FuncTy_23_args.push_back(PointerTy_1); |
| 226 | FuncTy_23_args.push_back(PointerTy_1); |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 227 | FuncTy_23_args.push_back(IntegerType::get(mod->getContext(), 64)); |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 228 | FunctionType* FuncTy_23 = FunctionType::get( |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 229 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 230 | /*Params=*/FuncTy_23_args, |
| 231 | /*isVarArg=*/false); |
| 232 | |
| 233 | std::vector<Type*>FuncTy_24_args; |
| 234 | FuncTy_24_args.push_back(IntegerType::get(mod->getContext(), 32)); |
| 235 | FuncTy_24_args.push_back(PointerTy_1); |
| 236 | FuncTy_24_args.push_back(PointerTy_1); |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 237 | FuncTy_24_args.push_back(PointerTy_1); |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 238 | FunctionType* FuncTy_24 = FunctionType::get( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 239 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 240 | /*Params=*/FuncTy_24_args, |
| 241 | /*isVarArg=*/false); |
| 242 | |
| 243 | std::vector<Type*>FuncTy_25_args; |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 244 | FuncTy_25_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 245 | FuncTy_25_args.push_back(PointerTy_1); |
| 246 | FuncTy_25_args.push_back(PointerTy_1); |
| 247 | FunctionType* FuncTy_25 = FunctionType::get( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 248 | /*Result=*/IntegerType::get(mod->getContext(), 64), |
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; |
| 253 | FuncTy_26_args.push_back(PointerTy_1); |
| 254 | FuncTy_26_args.push_back(PointerTy_1); |
| 255 | FunctionType* FuncTy_26 = FunctionType::get( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 256 | /*Result=*/PointerTy_1, |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 257 | /*Params=*/FuncTy_26_args, |
| 258 | /*isVarArg=*/false); |
| 259 | |
TDYa127 | 28f1a14 | 2012-03-15 21:51:52 -0700 | [diff] [blame] | 260 | std::vector<Type*>FuncTy_27_args; |
| 261 | FuncTy_27_args.push_back(PointerTy_1); |
| 262 | FuncTy_27_args.push_back(PointerTy_1); |
| 263 | FunctionType* FuncTy_27 = FunctionType::get( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 264 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
TDYa127 | 28f1a14 | 2012-03-15 21:51:52 -0700 | [diff] [blame] | 265 | /*Params=*/FuncTy_27_args, |
| 266 | /*isVarArg=*/false); |
| 267 | |
TDYa127 | 8532191 | 2012-04-01 15:24:56 -0700 | [diff] [blame] | 268 | std::vector<Type*>FuncTy_28_args; |
| 269 | FuncTy_28_args.push_back(PointerTy_1); |
| 270 | FuncTy_28_args.push_back(PointerTy_1); |
TDYa127 | 8532191 | 2012-04-01 15:24:56 -0700 | [diff] [blame] | 271 | FunctionType* FuncTy_28 = FunctionType::get( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 272 | /*Result=*/Type::getVoidTy(mod->getContext()), |
TDYa127 | 8532191 | 2012-04-01 15:24:56 -0700 | [diff] [blame] | 273 | /*Params=*/FuncTy_28_args, |
| 274 | /*isVarArg=*/false); |
| 275 | |
TDYa127 | 0b686e5 | 2012-04-09 22:43:35 -0700 | [diff] [blame] | 276 | std::vector<Type*>FuncTy_29_args; |
| 277 | FuncTy_29_args.push_back(PointerTy_1); |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 278 | FuncTy_29_args.push_back(PointerTy_1); |
| 279 | FuncTy_29_args.push_back(IntegerType::get(mod->getContext(), 32)); |
| 280 | FuncTy_29_args.push_back(IntegerType::get(mod->getContext(), 1)); |
TDYa127 | 0b686e5 | 2012-04-09 22:43:35 -0700 | [diff] [blame] | 281 | FunctionType* FuncTy_29 = FunctionType::get( |
| 282 | /*Result=*/PointerTy_1, |
| 283 | /*Params=*/FuncTy_29_args, |
| 284 | /*isVarArg=*/false); |
| 285 | |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 286 | std::vector<Type*>FuncTy_30_args; |
| 287 | FuncTy_30_args.push_back(PointerTy_1); |
| 288 | FunctionType* FuncTy_30 = FunctionType::get( |
| 289 | /*Result=*/PointerTy_1, |
| 290 | /*Params=*/FuncTy_30_args, |
| 291 | /*isVarArg=*/false); |
| 292 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 293 | |
| 294 | // Function Declarations |
| 295 | |
| 296 | Function* func___art_type_list = mod->getFunction("__art_type_list"); |
| 297 | if (!func___art_type_list) { |
| 298 | func___art_type_list = Function::Create( |
| 299 | /*Type=*/FuncTy_0, |
| 300 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 301 | /*Name=*/"__art_type_list", mod); // (external, no body) |
| 302 | func___art_type_list->setCallingConv(CallingConv::C); |
| 303 | } |
| 304 | AttrListPtr func___art_type_list_PAL; |
| 305 | func___art_type_list->setAttributes(func___art_type_list_PAL); |
| 306 | |
| 307 | Function* func_art_get_current_thread_from_code = mod->getFunction("art_get_current_thread_from_code"); |
| 308 | if (!func_art_get_current_thread_from_code) { |
| 309 | func_art_get_current_thread_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 310 | /*Type=*/FuncTy_3, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 311 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 312 | /*Name=*/"art_get_current_thread_from_code", mod); // (external, no body) |
| 313 | func_art_get_current_thread_from_code->setCallingConv(CallingConv::C); |
| 314 | } |
| 315 | AttrListPtr func_art_get_current_thread_from_code_PAL; |
| 316 | func_art_get_current_thread_from_code->setAttributes(func_art_get_current_thread_from_code_PAL); |
| 317 | |
| 318 | Function* func_art_set_current_thread_from_code = mod->getFunction("art_set_current_thread_from_code"); |
| 319 | if (!func_art_set_current_thread_from_code) { |
| 320 | func_art_set_current_thread_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 321 | /*Type=*/FuncTy_4, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 322 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 323 | /*Name=*/"art_set_current_thread_from_code", mod); // (external, no body) |
| 324 | func_art_set_current_thread_from_code->setCallingConv(CallingConv::C); |
| 325 | } |
| 326 | AttrListPtr func_art_set_current_thread_from_code_PAL; |
| 327 | func_art_set_current_thread_from_code->setAttributes(func_art_set_current_thread_from_code_PAL); |
| 328 | |
| 329 | Function* func_art_lock_object_from_code = mod->getFunction("art_lock_object_from_code"); |
| 330 | if (!func_art_lock_object_from_code) { |
| 331 | func_art_lock_object_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 332 | /*Type=*/FuncTy_4, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 333 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 334 | /*Name=*/"art_lock_object_from_code", mod); // (external, no body) |
| 335 | func_art_lock_object_from_code->setCallingConv(CallingConv::C); |
| 336 | } |
| 337 | AttrListPtr func_art_lock_object_from_code_PAL; |
| 338 | func_art_lock_object_from_code->setAttributes(func_art_lock_object_from_code_PAL); |
| 339 | |
| 340 | Function* func_art_unlock_object_from_code = mod->getFunction("art_unlock_object_from_code"); |
| 341 | if (!func_art_unlock_object_from_code) { |
| 342 | func_art_unlock_object_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 343 | /*Type=*/FuncTy_4, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 344 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 345 | /*Name=*/"art_unlock_object_from_code", mod); // (external, no body) |
| 346 | func_art_unlock_object_from_code->setCallingConv(CallingConv::C); |
| 347 | } |
| 348 | AttrListPtr func_art_unlock_object_from_code_PAL; |
| 349 | func_art_unlock_object_from_code->setAttributes(func_art_unlock_object_from_code_PAL); |
| 350 | |
| 351 | Function* func_art_test_suspend_from_code = mod->getFunction("art_test_suspend_from_code"); |
| 352 | if (!func_art_test_suspend_from_code) { |
| 353 | func_art_test_suspend_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 354 | /*Type=*/FuncTy_5, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 355 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 356 | /*Name=*/"art_test_suspend_from_code", mod); // (external, no body) |
| 357 | func_art_test_suspend_from_code->setCallingConv(CallingConv::C); |
| 358 | } |
| 359 | AttrListPtr func_art_test_suspend_from_code_PAL; |
| 360 | func_art_test_suspend_from_code->setAttributes(func_art_test_suspend_from_code_PAL); |
| 361 | |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 362 | Function* func_art_push_shadow_frame_from_code = mod->getFunction("art_push_shadow_frame_from_code"); |
| 363 | if (!func_art_push_shadow_frame_from_code) { |
| 364 | func_art_push_shadow_frame_from_code = Function::Create( |
| 365 | /*Type=*/FuncTy_6, |
| 366 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 367 | /*Name=*/"art_push_shadow_frame_from_code", mod); // (external, no body) |
| 368 | func_art_push_shadow_frame_from_code->setCallingConv(CallingConv::C); |
| 369 | } |
| 370 | AttrListPtr func_art_push_shadow_frame_from_code_PAL; |
| 371 | func_art_push_shadow_frame_from_code->setAttributes(func_art_push_shadow_frame_from_code_PAL); |
| 372 | |
| 373 | Function* func_art_pop_shadow_frame_from_code = mod->getFunction("art_pop_shadow_frame_from_code"); |
| 374 | if (!func_art_pop_shadow_frame_from_code) { |
| 375 | func_art_pop_shadow_frame_from_code = Function::Create( |
| 376 | /*Type=*/FuncTy_5, |
| 377 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 378 | /*Name=*/"art_pop_shadow_frame_from_code", mod); // (external, no body) |
| 379 | func_art_pop_shadow_frame_from_code->setCallingConv(CallingConv::C); |
| 380 | } |
| 381 | AttrListPtr func_art_pop_shadow_frame_from_code_PAL; |
| 382 | func_art_pop_shadow_frame_from_code->setAttributes(func_art_pop_shadow_frame_from_code_PAL); |
| 383 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 384 | Function* func_art_is_exception_pending_from_code = mod->getFunction("art_is_exception_pending_from_code"); |
| 385 | if (!func_art_is_exception_pending_from_code) { |
| 386 | func_art_is_exception_pending_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 387 | /*Type=*/FuncTy_7, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 388 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 389 | /*Name=*/"art_is_exception_pending_from_code", mod); // (external, no body) |
| 390 | func_art_is_exception_pending_from_code->setCallingConv(CallingConv::C); |
| 391 | } |
| 392 | AttrListPtr func_art_is_exception_pending_from_code_PAL; |
| 393 | func_art_is_exception_pending_from_code->setAttributes(func_art_is_exception_pending_from_code_PAL); |
| 394 | |
| 395 | Function* func_art_throw_div_zero_from_code = mod->getFunction("art_throw_div_zero_from_code"); |
| 396 | if (!func_art_throw_div_zero_from_code) { |
| 397 | func_art_throw_div_zero_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 398 | /*Type=*/FuncTy_5, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 399 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 400 | /*Name=*/"art_throw_div_zero_from_code", mod); // (external, no body) |
| 401 | func_art_throw_div_zero_from_code->setCallingConv(CallingConv::C); |
| 402 | } |
| 403 | AttrListPtr func_art_throw_div_zero_from_code_PAL; |
| 404 | func_art_throw_div_zero_from_code->setAttributes(func_art_throw_div_zero_from_code_PAL); |
| 405 | |
| 406 | Function* func_art_throw_array_bounds_from_code = mod->getFunction("art_throw_array_bounds_from_code"); |
| 407 | if (!func_art_throw_array_bounds_from_code) { |
| 408 | func_art_throw_array_bounds_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 409 | /*Type=*/FuncTy_8, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 410 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 411 | /*Name=*/"art_throw_array_bounds_from_code", mod); // (external, no body) |
| 412 | func_art_throw_array_bounds_from_code->setCallingConv(CallingConv::C); |
| 413 | } |
| 414 | AttrListPtr func_art_throw_array_bounds_from_code_PAL; |
| 415 | func_art_throw_array_bounds_from_code->setAttributes(func_art_throw_array_bounds_from_code_PAL); |
| 416 | |
| 417 | Function* func_art_throw_no_such_method_from_code = mod->getFunction("art_throw_no_such_method_from_code"); |
| 418 | if (!func_art_throw_no_such_method_from_code) { |
| 419 | func_art_throw_no_such_method_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 420 | /*Type=*/FuncTy_9, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 421 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 422 | /*Name=*/"art_throw_no_such_method_from_code", mod); // (external, no body) |
| 423 | func_art_throw_no_such_method_from_code->setCallingConv(CallingConv::C); |
| 424 | } |
| 425 | AttrListPtr func_art_throw_no_such_method_from_code_PAL; |
| 426 | func_art_throw_no_such_method_from_code->setAttributes(func_art_throw_no_such_method_from_code_PAL); |
| 427 | |
| 428 | Function* func_art_throw_null_pointer_exception_from_code = mod->getFunction("art_throw_null_pointer_exception_from_code"); |
| 429 | if (!func_art_throw_null_pointer_exception_from_code) { |
| 430 | func_art_throw_null_pointer_exception_from_code = Function::Create( |
TDYa127 | 3f9137d | 2012-04-08 15:59:19 -0700 | [diff] [blame] | 431 | /*Type=*/FuncTy_9, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 432 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 433 | /*Name=*/"art_throw_null_pointer_exception_from_code", mod); // (external, no body) |
| 434 | func_art_throw_null_pointer_exception_from_code->setCallingConv(CallingConv::C); |
| 435 | } |
| 436 | AttrListPtr func_art_throw_null_pointer_exception_from_code_PAL; |
| 437 | func_art_throw_null_pointer_exception_from_code->setAttributes(func_art_throw_null_pointer_exception_from_code_PAL); |
| 438 | |
| 439 | Function* func_art_throw_stack_overflow_from_code = mod->getFunction("art_throw_stack_overflow_from_code"); |
| 440 | if (!func_art_throw_stack_overflow_from_code) { |
| 441 | func_art_throw_stack_overflow_from_code = Function::Create( |
TDYa127 | 4165a83 | 2012-04-03 17:47:16 -0700 | [diff] [blame] | 442 | /*Type=*/FuncTy_5, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 443 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 444 | /*Name=*/"art_throw_stack_overflow_from_code", mod); // (external, no body) |
| 445 | func_art_throw_stack_overflow_from_code->setCallingConv(CallingConv::C); |
| 446 | } |
| 447 | AttrListPtr func_art_throw_stack_overflow_from_code_PAL; |
| 448 | func_art_throw_stack_overflow_from_code->setAttributes(func_art_throw_stack_overflow_from_code_PAL); |
| 449 | |
| 450 | Function* func_art_throw_exception_from_code = mod->getFunction("art_throw_exception_from_code"); |
| 451 | if (!func_art_throw_exception_from_code) { |
| 452 | func_art_throw_exception_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 453 | /*Type=*/FuncTy_4, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 454 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 455 | /*Name=*/"art_throw_exception_from_code", mod); // (external, no body) |
| 456 | func_art_throw_exception_from_code->setCallingConv(CallingConv::C); |
| 457 | } |
| 458 | AttrListPtr func_art_throw_exception_from_code_PAL; |
| 459 | func_art_throw_exception_from_code->setAttributes(func_art_throw_exception_from_code_PAL); |
| 460 | |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 461 | Function* func_art_throw_verification_error_from_code = mod->getFunction("art_throw_verification_error_from_code"); |
| 462 | if (!func_art_throw_verification_error_from_code) { |
| 463 | func_art_throw_verification_error_from_code = Function::Create( |
| 464 | /*Type=*/FuncTy_10, |
| 465 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 466 | /*Name=*/"art_throw_verification_error_from_code", mod); // (external, no body) |
| 467 | func_art_throw_verification_error_from_code->setCallingConv(CallingConv::C); |
| 468 | } |
| 469 | AttrListPtr func_art_throw_verification_error_from_code_PAL; |
| 470 | func_art_throw_verification_error_from_code->setAttributes(func_art_throw_verification_error_from_code_PAL); |
| 471 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 472 | Function* func_art_find_catch_block_from_code = mod->getFunction("art_find_catch_block_from_code"); |
| 473 | if (!func_art_find_catch_block_from_code) { |
| 474 | func_art_find_catch_block_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 475 | /*Type=*/FuncTy_11, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 476 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 477 | /*Name=*/"art_find_catch_block_from_code", mod); // (external, no body) |
| 478 | func_art_find_catch_block_from_code->setCallingConv(CallingConv::C); |
| 479 | } |
| 480 | AttrListPtr func_art_find_catch_block_from_code_PAL; |
| 481 | func_art_find_catch_block_from_code->setAttributes(func_art_find_catch_block_from_code_PAL); |
| 482 | |
| 483 | Function* func_art_alloc_object_from_code = mod->getFunction("art_alloc_object_from_code"); |
| 484 | if (!func_art_alloc_object_from_code) { |
| 485 | func_art_alloc_object_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 486 | /*Type=*/FuncTy_12, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 487 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 488 | /*Name=*/"art_alloc_object_from_code", mod); // (external, no body) |
| 489 | func_art_alloc_object_from_code->setCallingConv(CallingConv::C); |
| 490 | } |
| 491 | AttrListPtr func_art_alloc_object_from_code_PAL; |
| 492 | func_art_alloc_object_from_code->setAttributes(func_art_alloc_object_from_code_PAL); |
| 493 | |
| 494 | Function* func_art_alloc_object_from_code_with_access_check = mod->getFunction("art_alloc_object_from_code_with_access_check"); |
| 495 | if (!func_art_alloc_object_from_code_with_access_check) { |
| 496 | func_art_alloc_object_from_code_with_access_check = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 497 | /*Type=*/FuncTy_12, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 498 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 499 | /*Name=*/"art_alloc_object_from_code_with_access_check", mod); // (external, no body) |
| 500 | func_art_alloc_object_from_code_with_access_check->setCallingConv(CallingConv::C); |
| 501 | } |
| 502 | AttrListPtr func_art_alloc_object_from_code_with_access_check_PAL; |
| 503 | func_art_alloc_object_from_code_with_access_check->setAttributes(func_art_alloc_object_from_code_with_access_check_PAL); |
| 504 | |
| 505 | Function* func_art_alloc_array_from_code = mod->getFunction("art_alloc_array_from_code"); |
| 506 | if (!func_art_alloc_array_from_code) { |
| 507 | func_art_alloc_array_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 508 | /*Type=*/FuncTy_13, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 509 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 510 | /*Name=*/"art_alloc_array_from_code", mod); // (external, no body) |
| 511 | func_art_alloc_array_from_code->setCallingConv(CallingConv::C); |
| 512 | } |
| 513 | AttrListPtr func_art_alloc_array_from_code_PAL; |
| 514 | func_art_alloc_array_from_code->setAttributes(func_art_alloc_array_from_code_PAL); |
| 515 | |
| 516 | Function* func_art_alloc_array_from_code_with_access_check = mod->getFunction("art_alloc_array_from_code_with_access_check"); |
| 517 | if (!func_art_alloc_array_from_code_with_access_check) { |
| 518 | func_art_alloc_array_from_code_with_access_check = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 519 | /*Type=*/FuncTy_13, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 520 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 521 | /*Name=*/"art_alloc_array_from_code_with_access_check", mod); // (external, no body) |
| 522 | func_art_alloc_array_from_code_with_access_check->setCallingConv(CallingConv::C); |
| 523 | } |
| 524 | AttrListPtr func_art_alloc_array_from_code_with_access_check_PAL; |
| 525 | func_art_alloc_array_from_code_with_access_check->setAttributes(func_art_alloc_array_from_code_with_access_check_PAL); |
| 526 | |
| 527 | Function* func_art_check_and_alloc_array_from_code = mod->getFunction("art_check_and_alloc_array_from_code"); |
| 528 | if (!func_art_check_and_alloc_array_from_code) { |
| 529 | func_art_check_and_alloc_array_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 530 | /*Type=*/FuncTy_13, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 531 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 532 | /*Name=*/"art_check_and_alloc_array_from_code", mod); // (external, no body) |
| 533 | func_art_check_and_alloc_array_from_code->setCallingConv(CallingConv::C); |
| 534 | } |
| 535 | AttrListPtr func_art_check_and_alloc_array_from_code_PAL; |
| 536 | func_art_check_and_alloc_array_from_code->setAttributes(func_art_check_and_alloc_array_from_code_PAL); |
| 537 | |
| 538 | Function* func_art_check_and_alloc_array_from_code_with_access_check = mod->getFunction("art_check_and_alloc_array_from_code_with_access_check"); |
| 539 | if (!func_art_check_and_alloc_array_from_code_with_access_check) { |
| 540 | func_art_check_and_alloc_array_from_code_with_access_check = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 541 | /*Type=*/FuncTy_13, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 542 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 543 | /*Name=*/"art_check_and_alloc_array_from_code_with_access_check", mod); // (external, no body) |
| 544 | func_art_check_and_alloc_array_from_code_with_access_check->setCallingConv(CallingConv::C); |
| 545 | } |
| 546 | AttrListPtr func_art_check_and_alloc_array_from_code_with_access_check_PAL; |
| 547 | func_art_check_and_alloc_array_from_code_with_access_check->setAttributes(func_art_check_and_alloc_array_from_code_with_access_check_PAL); |
| 548 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 549 | Function* func_art_find_instance_field_from_code = mod->getFunction("art_find_instance_field_from_code"); |
| 550 | if (!func_art_find_instance_field_from_code) { |
| 551 | func_art_find_instance_field_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 552 | /*Type=*/FuncTy_14, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 553 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 554 | /*Name=*/"art_find_instance_field_from_code", mod); // (external, no body) |
| 555 | func_art_find_instance_field_from_code->setCallingConv(CallingConv::C); |
| 556 | } |
| 557 | AttrListPtr func_art_find_instance_field_from_code_PAL; |
| 558 | func_art_find_instance_field_from_code->setAttributes(func_art_find_instance_field_from_code_PAL); |
| 559 | |
| 560 | Function* func_art_find_static_field_from_code = mod->getFunction("art_find_static_field_from_code"); |
| 561 | if (!func_art_find_static_field_from_code) { |
| 562 | func_art_find_static_field_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 563 | /*Type=*/FuncTy_14, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 564 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 565 | /*Name=*/"art_find_static_field_from_code", mod); // (external, no body) |
| 566 | func_art_find_static_field_from_code->setCallingConv(CallingConv::C); |
| 567 | } |
| 568 | AttrListPtr func_art_find_static_field_from_code_PAL; |
| 569 | func_art_find_static_field_from_code->setAttributes(func_art_find_static_field_from_code_PAL); |
| 570 | |
Logan Chien | 7e7fabc | 2012-04-10 18:59:11 +0800 | [diff] [blame^] | 571 | Function* func_art_find_static_method_from_code_with_access_check = mod->getFunction("art_find_static_method_from_code_with_access_check"); |
| 572 | if (!func_art_find_static_method_from_code_with_access_check) { |
| 573 | func_art_find_static_method_from_code_with_access_check = Function::Create( |
| 574 | /*Type=*/FuncTy_15, |
| 575 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 576 | /*Name=*/"art_find_static_method_from_code_with_access_check", mod); // (external, no body) |
| 577 | func_art_find_static_method_from_code_with_access_check->setCallingConv(CallingConv::C); |
| 578 | } |
| 579 | AttrListPtr func_art_find_static_method_from_code_with_access_check_PAL; |
| 580 | func_art_find_static_method_from_code_with_access_check->setAttributes(func_art_find_static_method_from_code_with_access_check_PAL); |
| 581 | |
| 582 | Function* func_art_find_direct_method_from_code_with_access_check = mod->getFunction("art_find_direct_method_from_code_with_access_check"); |
| 583 | if (!func_art_find_direct_method_from_code_with_access_check) { |
| 584 | func_art_find_direct_method_from_code_with_access_check = Function::Create( |
| 585 | /*Type=*/FuncTy_15, |
| 586 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 587 | /*Name=*/"art_find_direct_method_from_code_with_access_check", mod); // (external, no body) |
| 588 | func_art_find_direct_method_from_code_with_access_check->setCallingConv(CallingConv::C); |
| 589 | } |
| 590 | AttrListPtr func_art_find_direct_method_from_code_with_access_check_PAL; |
| 591 | func_art_find_direct_method_from_code_with_access_check->setAttributes(func_art_find_direct_method_from_code_with_access_check_PAL); |
| 592 | |
| 593 | Function* func_art_find_virtual_method_from_code_with_access_check = mod->getFunction("art_find_virtual_method_from_code_with_access_check"); |
| 594 | if (!func_art_find_virtual_method_from_code_with_access_check) { |
| 595 | func_art_find_virtual_method_from_code_with_access_check = Function::Create( |
| 596 | /*Type=*/FuncTy_15, |
| 597 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 598 | /*Name=*/"art_find_virtual_method_from_code_with_access_check", mod); // (external, no body) |
| 599 | func_art_find_virtual_method_from_code_with_access_check->setCallingConv(CallingConv::C); |
| 600 | } |
| 601 | AttrListPtr func_art_find_virtual_method_from_code_with_access_check_PAL; |
| 602 | func_art_find_virtual_method_from_code_with_access_check->setAttributes(func_art_find_virtual_method_from_code_with_access_check_PAL); |
| 603 | |
| 604 | Function* func_art_find_super_method_from_code_with_access_check = mod->getFunction("art_find_super_method_from_code_with_access_check"); |
| 605 | if (!func_art_find_super_method_from_code_with_access_check) { |
| 606 | func_art_find_super_method_from_code_with_access_check = Function::Create( |
| 607 | /*Type=*/FuncTy_15, |
| 608 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 609 | /*Name=*/"art_find_super_method_from_code_with_access_check", mod); // (external, no body) |
| 610 | func_art_find_super_method_from_code_with_access_check->setCallingConv(CallingConv::C); |
| 611 | } |
| 612 | AttrListPtr func_art_find_super_method_from_code_with_access_check_PAL; |
| 613 | func_art_find_super_method_from_code_with_access_check->setAttributes(func_art_find_super_method_from_code_with_access_check_PAL); |
| 614 | |
| 615 | Function* func_art_find_interface_method_from_code_with_access_check = mod->getFunction("art_find_interface_method_from_code_with_access_check"); |
| 616 | if (!func_art_find_interface_method_from_code_with_access_check) { |
| 617 | func_art_find_interface_method_from_code_with_access_check = Function::Create( |
| 618 | /*Type=*/FuncTy_15, |
| 619 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 620 | /*Name=*/"art_find_interface_method_from_code_with_access_check", mod); // (external, no body) |
| 621 | func_art_find_interface_method_from_code_with_access_check->setCallingConv(CallingConv::C); |
| 622 | } |
| 623 | AttrListPtr func_art_find_interface_method_from_code_with_access_check_PAL; |
| 624 | func_art_find_interface_method_from_code_with_access_check->setAttributes(func_art_find_interface_method_from_code_with_access_check_PAL); |
| 625 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 626 | Function* func_art_find_interface_method_from_code = mod->getFunction("art_find_interface_method_from_code"); |
| 627 | if (!func_art_find_interface_method_from_code) { |
| 628 | func_art_find_interface_method_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 629 | /*Type=*/FuncTy_15, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 630 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 631 | /*Name=*/"art_find_interface_method_from_code", mod); // (external, no body) |
| 632 | func_art_find_interface_method_from_code->setCallingConv(CallingConv::C); |
| 633 | } |
| 634 | AttrListPtr func_art_find_interface_method_from_code_PAL; |
| 635 | func_art_find_interface_method_from_code->setAttributes(func_art_find_interface_method_from_code_PAL); |
| 636 | |
| 637 | Function* func_art_initialize_static_storage_from_code = mod->getFunction("art_initialize_static_storage_from_code"); |
| 638 | if (!func_art_initialize_static_storage_from_code) { |
| 639 | func_art_initialize_static_storage_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 640 | /*Type=*/FuncTy_12, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 641 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 642 | /*Name=*/"art_initialize_static_storage_from_code", mod); // (external, no body) |
| 643 | func_art_initialize_static_storage_from_code->setCallingConv(CallingConv::C); |
| 644 | } |
| 645 | AttrListPtr func_art_initialize_static_storage_from_code_PAL; |
| 646 | func_art_initialize_static_storage_from_code->setAttributes(func_art_initialize_static_storage_from_code_PAL); |
| 647 | |
| 648 | Function* func_art_initialize_type_from_code = mod->getFunction("art_initialize_type_from_code"); |
| 649 | if (!func_art_initialize_type_from_code) { |
| 650 | func_art_initialize_type_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 651 | /*Type=*/FuncTy_12, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 652 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 653 | /*Name=*/"art_initialize_type_from_code", mod); // (external, no body) |
| 654 | func_art_initialize_type_from_code->setCallingConv(CallingConv::C); |
| 655 | } |
| 656 | AttrListPtr func_art_initialize_type_from_code_PAL; |
| 657 | func_art_initialize_type_from_code->setAttributes(func_art_initialize_type_from_code_PAL); |
| 658 | |
| 659 | Function* func_art_initialize_type_and_verify_access_from_code = mod->getFunction("art_initialize_type_and_verify_access_from_code"); |
| 660 | if (!func_art_initialize_type_and_verify_access_from_code) { |
| 661 | func_art_initialize_type_and_verify_access_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 662 | /*Type=*/FuncTy_12, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 663 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 664 | /*Name=*/"art_initialize_type_and_verify_access_from_code", mod); // (external, no body) |
| 665 | func_art_initialize_type_and_verify_access_from_code->setCallingConv(CallingConv::C); |
| 666 | } |
| 667 | AttrListPtr func_art_initialize_type_and_verify_access_from_code_PAL; |
| 668 | func_art_initialize_type_and_verify_access_from_code->setAttributes(func_art_initialize_type_and_verify_access_from_code_PAL); |
| 669 | |
| 670 | Function* func_art_resolve_string_from_code = mod->getFunction("art_resolve_string_from_code"); |
| 671 | if (!func_art_resolve_string_from_code) { |
| 672 | func_art_resolve_string_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 673 | /*Type=*/FuncTy_16, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 674 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 675 | /*Name=*/"art_resolve_string_from_code", mod); // (external, no body) |
| 676 | func_art_resolve_string_from_code->setCallingConv(CallingConv::C); |
| 677 | } |
| 678 | AttrListPtr func_art_resolve_string_from_code_PAL; |
| 679 | func_art_resolve_string_from_code->setAttributes(func_art_resolve_string_from_code_PAL); |
| 680 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 681 | Function* func_art_set32_static_from_code = mod->getFunction("art_set32_static_from_code"); |
| 682 | if (!func_art_set32_static_from_code) { |
| 683 | func_art_set32_static_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 684 | /*Type=*/FuncTy_17, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 685 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 686 | /*Name=*/"art_set32_static_from_code", mod); // (external, no body) |
| 687 | func_art_set32_static_from_code->setCallingConv(CallingConv::C); |
| 688 | } |
| 689 | AttrListPtr func_art_set32_static_from_code_PAL; |
| 690 | func_art_set32_static_from_code->setAttributes(func_art_set32_static_from_code_PAL); |
| 691 | |
| 692 | Function* func_art_set64_static_from_code = mod->getFunction("art_set64_static_from_code"); |
| 693 | if (!func_art_set64_static_from_code) { |
| 694 | func_art_set64_static_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 695 | /*Type=*/FuncTy_18, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 696 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 697 | /*Name=*/"art_set64_static_from_code", mod); // (external, no body) |
| 698 | func_art_set64_static_from_code->setCallingConv(CallingConv::C); |
| 699 | } |
| 700 | AttrListPtr func_art_set64_static_from_code_PAL; |
| 701 | func_art_set64_static_from_code->setAttributes(func_art_set64_static_from_code_PAL); |
| 702 | |
| 703 | Function* func_art_set_obj_static_from_code = mod->getFunction("art_set_obj_static_from_code"); |
| 704 | if (!func_art_set_obj_static_from_code) { |
| 705 | func_art_set_obj_static_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 706 | /*Type=*/FuncTy_19, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 707 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 708 | /*Name=*/"art_set_obj_static_from_code", mod); // (external, no body) |
| 709 | func_art_set_obj_static_from_code->setCallingConv(CallingConv::C); |
| 710 | } |
| 711 | AttrListPtr func_art_set_obj_static_from_code_PAL; |
| 712 | func_art_set_obj_static_from_code->setAttributes(func_art_set_obj_static_from_code_PAL); |
| 713 | |
| 714 | Function* func_art_get32_static_from_code = mod->getFunction("art_get32_static_from_code"); |
| 715 | if (!func_art_get32_static_from_code) { |
| 716 | func_art_get32_static_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 717 | /*Type=*/FuncTy_20, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 718 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 719 | /*Name=*/"art_get32_static_from_code", mod); // (external, no body) |
| 720 | func_art_get32_static_from_code->setCallingConv(CallingConv::C); |
| 721 | } |
| 722 | AttrListPtr func_art_get32_static_from_code_PAL; |
| 723 | func_art_get32_static_from_code->setAttributes(func_art_get32_static_from_code_PAL); |
| 724 | |
| 725 | Function* func_art_get64_static_from_code = mod->getFunction("art_get64_static_from_code"); |
| 726 | if (!func_art_get64_static_from_code) { |
| 727 | func_art_get64_static_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 728 | /*Type=*/FuncTy_21, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 729 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 730 | /*Name=*/"art_get64_static_from_code", mod); // (external, no body) |
| 731 | func_art_get64_static_from_code->setCallingConv(CallingConv::C); |
| 732 | } |
| 733 | AttrListPtr func_art_get64_static_from_code_PAL; |
| 734 | func_art_get64_static_from_code->setAttributes(func_art_get64_static_from_code_PAL); |
| 735 | |
| 736 | Function* func_art_get_obj_static_from_code = mod->getFunction("art_get_obj_static_from_code"); |
| 737 | if (!func_art_get_obj_static_from_code) { |
| 738 | func_art_get_obj_static_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 739 | /*Type=*/FuncTy_12, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 740 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 741 | /*Name=*/"art_get_obj_static_from_code", mod); // (external, no body) |
| 742 | func_art_get_obj_static_from_code->setCallingConv(CallingConv::C); |
| 743 | } |
| 744 | AttrListPtr func_art_get_obj_static_from_code_PAL; |
| 745 | func_art_get_obj_static_from_code->setAttributes(func_art_get_obj_static_from_code_PAL); |
| 746 | |
| 747 | Function* func_art_set32_instance_from_code = mod->getFunction("art_set32_instance_from_code"); |
| 748 | if (!func_art_set32_instance_from_code) { |
| 749 | func_art_set32_instance_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 750 | /*Type=*/FuncTy_22, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 751 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 752 | /*Name=*/"art_set32_instance_from_code", mod); // (external, no body) |
| 753 | func_art_set32_instance_from_code->setCallingConv(CallingConv::C); |
| 754 | } |
| 755 | AttrListPtr func_art_set32_instance_from_code_PAL; |
| 756 | func_art_set32_instance_from_code->setAttributes(func_art_set32_instance_from_code_PAL); |
| 757 | |
| 758 | Function* func_art_set64_instance_from_code = mod->getFunction("art_set64_instance_from_code"); |
| 759 | if (!func_art_set64_instance_from_code) { |
| 760 | func_art_set64_instance_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 761 | /*Type=*/FuncTy_23, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 762 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 763 | /*Name=*/"art_set64_instance_from_code", mod); // (external, no body) |
| 764 | func_art_set64_instance_from_code->setCallingConv(CallingConv::C); |
| 765 | } |
| 766 | AttrListPtr func_art_set64_instance_from_code_PAL; |
| 767 | func_art_set64_instance_from_code->setAttributes(func_art_set64_instance_from_code_PAL); |
| 768 | |
| 769 | Function* func_art_set_obj_instance_from_code = mod->getFunction("art_set_obj_instance_from_code"); |
| 770 | if (!func_art_set_obj_instance_from_code) { |
| 771 | func_art_set_obj_instance_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 772 | /*Type=*/FuncTy_24, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 773 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 774 | /*Name=*/"art_set_obj_instance_from_code", mod); // (external, no body) |
| 775 | func_art_set_obj_instance_from_code->setCallingConv(CallingConv::C); |
| 776 | } |
| 777 | AttrListPtr func_art_set_obj_instance_from_code_PAL; |
| 778 | func_art_set_obj_instance_from_code->setAttributes(func_art_set_obj_instance_from_code_PAL); |
| 779 | |
| 780 | Function* func_art_get32_instance_from_code = mod->getFunction("art_get32_instance_from_code"); |
| 781 | if (!func_art_get32_instance_from_code) { |
| 782 | func_art_get32_instance_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 783 | /*Type=*/FuncTy_19, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 784 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 785 | /*Name=*/"art_get32_instance_from_code", mod); // (external, no body) |
| 786 | func_art_get32_instance_from_code->setCallingConv(CallingConv::C); |
| 787 | } |
| 788 | AttrListPtr func_art_get32_instance_from_code_PAL; |
| 789 | func_art_get32_instance_from_code->setAttributes(func_art_get32_instance_from_code_PAL); |
| 790 | |
| 791 | Function* func_art_get64_instance_from_code = mod->getFunction("art_get64_instance_from_code"); |
| 792 | if (!func_art_get64_instance_from_code) { |
| 793 | func_art_get64_instance_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 794 | /*Type=*/FuncTy_25, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 795 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 796 | /*Name=*/"art_get64_instance_from_code", mod); // (external, no body) |
| 797 | func_art_get64_instance_from_code->setCallingConv(CallingConv::C); |
| 798 | } |
| 799 | AttrListPtr func_art_get64_instance_from_code_PAL; |
| 800 | func_art_get64_instance_from_code->setAttributes(func_art_get64_instance_from_code_PAL); |
| 801 | |
| 802 | Function* func_art_get_obj_instance_from_code = mod->getFunction("art_get_obj_instance_from_code"); |
| 803 | if (!func_art_get_obj_instance_from_code) { |
| 804 | func_art_get_obj_instance_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 805 | /*Type=*/FuncTy_15, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 806 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 807 | /*Name=*/"art_get_obj_instance_from_code", mod); // (external, no body) |
| 808 | func_art_get_obj_instance_from_code->setCallingConv(CallingConv::C); |
| 809 | } |
| 810 | AttrListPtr func_art_get_obj_instance_from_code_PAL; |
| 811 | func_art_get_obj_instance_from_code->setAttributes(func_art_get_obj_instance_from_code_PAL); |
| 812 | |
TDYa127 | 28f1a14 | 2012-03-15 21:51:52 -0700 | [diff] [blame] | 813 | Function* func_art_decode_jobject_in_thread = mod->getFunction("art_decode_jobject_in_thread"); |
| 814 | if (!func_art_decode_jobject_in_thread) { |
| 815 | func_art_decode_jobject_in_thread = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 816 | /*Type=*/FuncTy_26, |
TDYa127 | 28f1a14 | 2012-03-15 21:51:52 -0700 | [diff] [blame] | 817 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 818 | /*Name=*/"art_decode_jobject_in_thread", mod); // (external, no body) |
| 819 | func_art_decode_jobject_in_thread->setCallingConv(CallingConv::C); |
| 820 | } |
| 821 | AttrListPtr func_art_decode_jobject_in_thread_PAL; |
| 822 | func_art_decode_jobject_in_thread->setAttributes(func_art_decode_jobject_in_thread_PAL); |
| 823 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 824 | Function* func_art_is_assignable_from_code = mod->getFunction("art_is_assignable_from_code"); |
| 825 | if (!func_art_is_assignable_from_code) { |
| 826 | func_art_is_assignable_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 827 | /*Type=*/FuncTy_27, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 828 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 829 | /*Name=*/"art_is_assignable_from_code", mod); // (external, no body) |
| 830 | func_art_is_assignable_from_code->setCallingConv(CallingConv::C); |
| 831 | } |
| 832 | AttrListPtr func_art_is_assignable_from_code_PAL; |
| 833 | func_art_is_assignable_from_code->setAttributes(func_art_is_assignable_from_code_PAL); |
| 834 | |
| 835 | Function* func_art_check_cast_from_code = mod->getFunction("art_check_cast_from_code"); |
| 836 | if (!func_art_check_cast_from_code) { |
| 837 | func_art_check_cast_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 838 | /*Type=*/FuncTy_28, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 839 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 840 | /*Name=*/"art_check_cast_from_code", mod); // (external, no body) |
| 841 | func_art_check_cast_from_code->setCallingConv(CallingConv::C); |
| 842 | } |
| 843 | AttrListPtr func_art_check_cast_from_code_PAL; |
| 844 | func_art_check_cast_from_code->setAttributes(func_art_check_cast_from_code_PAL); |
| 845 | |
TDYa127 | 1b86d07 | 2012-04-05 17:38:56 -0700 | [diff] [blame] | 846 | Function* func_art_check_put_array_element_from_code = mod->getFunction("art_check_put_array_element_from_code"); |
| 847 | if (!func_art_check_put_array_element_from_code) { |
| 848 | func_art_check_put_array_element_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 849 | /*Type=*/FuncTy_28, |
TDYa127 | 1b86d07 | 2012-04-05 17:38:56 -0700 | [diff] [blame] | 850 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 851 | /*Name=*/"art_check_put_array_element_from_code", mod); // (external, no body) |
| 852 | func_art_check_put_array_element_from_code->setCallingConv(CallingConv::C); |
| 853 | } |
| 854 | AttrListPtr func_art_check_put_array_element_from_code_PAL; |
| 855 | func_art_check_put_array_element_from_code->setAttributes(func_art_check_put_array_element_from_code_PAL); |
| 856 | |
TDYa127 | 8532191 | 2012-04-01 15:24:56 -0700 | [diff] [blame] | 857 | Function* func_art_ensure_resolved_from_code = mod->getFunction("art_ensure_resolved_from_code"); |
| 858 | if (!func_art_ensure_resolved_from_code) { |
| 859 | func_art_ensure_resolved_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 860 | /*Type=*/FuncTy_29, |
TDYa127 | 8532191 | 2012-04-01 15:24:56 -0700 | [diff] [blame] | 861 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 862 | /*Name=*/"art_ensure_resolved_from_code", mod); // (external, no body) |
| 863 | func_art_ensure_resolved_from_code->setCallingConv(CallingConv::C); |
| 864 | } |
| 865 | AttrListPtr func_art_ensure_resolved_from_code_PAL; |
| 866 | func_art_ensure_resolved_from_code->setAttributes(func_art_ensure_resolved_from_code_PAL); |
| 867 | |
TDYa127 | 0b686e5 | 2012-04-09 22:43:35 -0700 | [diff] [blame] | 868 | Function* func_art_fix_stub_from_code = mod->getFunction("art_fix_stub_from_code"); |
| 869 | if (!func_art_fix_stub_from_code) { |
| 870 | func_art_fix_stub_from_code = Function::Create( |
Logan Chien | 9e5f5c1 | 2012-04-10 13:51:45 +0800 | [diff] [blame] | 871 | /*Type=*/FuncTy_30, |
TDYa127 | 8532191 | 2012-04-01 15:24:56 -0700 | [diff] [blame] | 872 | /*Linkage=*/GlobalValue::ExternalLinkage, |
TDYa127 | 0b686e5 | 2012-04-09 22:43:35 -0700 | [diff] [blame] | 873 | /*Name=*/"art_fix_stub_from_code", mod); // (external, no body) |
| 874 | func_art_fix_stub_from_code->setCallingConv(CallingConv::C); |
TDYa127 | 8532191 | 2012-04-01 15:24:56 -0700 | [diff] [blame] | 875 | } |
TDYa127 | 0b686e5 | 2012-04-09 22:43:35 -0700 | [diff] [blame] | 876 | AttrListPtr func_art_fix_stub_from_code_PAL; |
| 877 | 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] | 878 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 879 | // Global Variable Declarations |
| 880 | |
| 881 | |
| 882 | // Constant Definitions |
| 883 | |
| 884 | // Global Variable Definitions |
| 885 | |
| 886 | // Function Definitions |
| 887 | |
| 888 | return mod; |
| 889 | |
| 890 | } |
Logan Chien | e75a8cc | 2012-02-24 12:26:43 +0800 | [diff] [blame] | 891 | |
| 892 | } // namespace compiler_llvm |
| 893 | } // namespace art |