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 | 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 | |
TDYa127 | 28f1a14 | 2012-03-15 21:51:52 -0700 | [diff] [blame^] | 49 | StructTy_ShadowFrame_fields.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 50 | StructTy_ShadowFrame_fields.push_back(PointerTy_2); |
| 51 | StructTy_ShadowFrame_fields.push_back(PointerTy_1); |
| 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 | 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 | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 145 | FuncTy_14_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 146 | FuncTy_14_args.push_back(PointerTy_1); |
| 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 | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 149 | /*Result=*/PointerTy_1, |
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; |
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 | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 157 | /*Result=*/PointerTy_1, |
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 | 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( |
| 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 | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 173 | FuncTy_17_args.push_back(IntegerType::get(mod->getContext(), 64)); |
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 | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 182 | FuncTy_18_args.push_back(PointerTy_1); |
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); |
| 191 | FunctionType* FuncTy_19 = FunctionType::get( |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 192 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 193 | /*Params=*/FuncTy_19_args, |
| 194 | /*isVarArg=*/false); |
| 195 | |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 196 | std::vector<Type*>FuncTy_20_args; |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 197 | FuncTy_20_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | a6b2ca6 | 2012-03-06 15:50:54 +0800 | [diff] [blame] | 198 | FuncTy_20_args.push_back(PointerTy_1); |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 199 | FunctionType* FuncTy_20 = FunctionType::get( |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 200 | /*Result=*/IntegerType::get(mod->getContext(), 64), |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 201 | /*Params=*/FuncTy_20_args, |
| 202 | /*isVarArg=*/false); |
| 203 | |
| 204 | std::vector<Type*>FuncTy_21_args; |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 205 | FuncTy_21_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 206 | FuncTy_21_args.push_back(PointerTy_1); |
| 207 | FuncTy_21_args.push_back(PointerTy_1); |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 208 | FuncTy_21_args.push_back(IntegerType::get(mod->getContext(), 32)); |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 209 | FunctionType* FuncTy_21 = FunctionType::get( |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 210 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
Logan Chien | a6b2ca6 | 2012-03-06 15:50:54 +0800 | [diff] [blame] | 211 | /*Params=*/FuncTy_21_args, |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 212 | /*isVarArg=*/false); |
| 213 | |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 214 | std::vector<Type*>FuncTy_22_args; |
| 215 | FuncTy_22_args.push_back(IntegerType::get(mod->getContext(), 32)); |
| 216 | FuncTy_22_args.push_back(PointerTy_1); |
| 217 | FuncTy_22_args.push_back(PointerTy_1); |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 218 | FuncTy_22_args.push_back(IntegerType::get(mod->getContext(), 64)); |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 219 | FunctionType* FuncTy_22 = FunctionType::get( |
| 220 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
| 221 | /*Params=*/FuncTy_22_args, |
| 222 | /*isVarArg=*/false); |
| 223 | |
| 224 | std::vector<Type*>FuncTy_23_args; |
| 225 | FuncTy_23_args.push_back(IntegerType::get(mod->getContext(), 32)); |
| 226 | FuncTy_23_args.push_back(PointerTy_1); |
| 227 | FuncTy_23_args.push_back(PointerTy_1); |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 228 | FuncTy_23_args.push_back(PointerTy_1); |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 229 | FunctionType* FuncTy_23 = FunctionType::get( |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 230 | /*Result=*/IntegerType::get(mod->getContext(), 32), |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 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( |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 239 | /*Result=*/IntegerType::get(mod->getContext(), 64), |
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; |
| 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 | |
TDYa127 | 28f1a14 | 2012-03-15 21:51:52 -0700 | [diff] [blame^] | 259 | std::vector<Type*>FuncTy_27_args; |
| 260 | FuncTy_27_args.push_back(PointerTy_1); |
| 261 | FuncTy_27_args.push_back(PointerTy_1); |
| 262 | FunctionType* FuncTy_27 = FunctionType::get( |
| 263 | /*Result=*/PointerTy_1, |
| 264 | /*Params=*/FuncTy_27_args, |
| 265 | /*isVarArg=*/false); |
| 266 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 267 | |
| 268 | // Function Declarations |
| 269 | |
| 270 | Function* func___art_type_list = mod->getFunction("__art_type_list"); |
| 271 | if (!func___art_type_list) { |
| 272 | func___art_type_list = Function::Create( |
| 273 | /*Type=*/FuncTy_0, |
| 274 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 275 | /*Name=*/"__art_type_list", mod); // (external, no body) |
| 276 | func___art_type_list->setCallingConv(CallingConv::C); |
| 277 | } |
| 278 | AttrListPtr func___art_type_list_PAL; |
| 279 | func___art_type_list->setAttributes(func___art_type_list_PAL); |
| 280 | |
| 281 | Function* func_art_get_current_thread_from_code = mod->getFunction("art_get_current_thread_from_code"); |
| 282 | if (!func_art_get_current_thread_from_code) { |
| 283 | func_art_get_current_thread_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 284 | /*Type=*/FuncTy_3, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 285 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 286 | /*Name=*/"art_get_current_thread_from_code", mod); // (external, no body) |
| 287 | func_art_get_current_thread_from_code->setCallingConv(CallingConv::C); |
| 288 | } |
| 289 | AttrListPtr func_art_get_current_thread_from_code_PAL; |
| 290 | func_art_get_current_thread_from_code->setAttributes(func_art_get_current_thread_from_code_PAL); |
| 291 | |
| 292 | Function* func_art_set_current_thread_from_code = mod->getFunction("art_set_current_thread_from_code"); |
| 293 | if (!func_art_set_current_thread_from_code) { |
| 294 | func_art_set_current_thread_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 295 | /*Type=*/FuncTy_4, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 296 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 297 | /*Name=*/"art_set_current_thread_from_code", mod); // (external, no body) |
| 298 | func_art_set_current_thread_from_code->setCallingConv(CallingConv::C); |
| 299 | } |
| 300 | AttrListPtr func_art_set_current_thread_from_code_PAL; |
| 301 | func_art_set_current_thread_from_code->setAttributes(func_art_set_current_thread_from_code_PAL); |
| 302 | |
| 303 | Function* func_art_lock_object_from_code = mod->getFunction("art_lock_object_from_code"); |
| 304 | if (!func_art_lock_object_from_code) { |
| 305 | func_art_lock_object_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 306 | /*Type=*/FuncTy_4, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 307 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 308 | /*Name=*/"art_lock_object_from_code", mod); // (external, no body) |
| 309 | func_art_lock_object_from_code->setCallingConv(CallingConv::C); |
| 310 | } |
| 311 | AttrListPtr func_art_lock_object_from_code_PAL; |
| 312 | func_art_lock_object_from_code->setAttributes(func_art_lock_object_from_code_PAL); |
| 313 | |
| 314 | Function* func_art_unlock_object_from_code = mod->getFunction("art_unlock_object_from_code"); |
| 315 | if (!func_art_unlock_object_from_code) { |
| 316 | func_art_unlock_object_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 317 | /*Type=*/FuncTy_4, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 318 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 319 | /*Name=*/"art_unlock_object_from_code", mod); // (external, no body) |
| 320 | func_art_unlock_object_from_code->setCallingConv(CallingConv::C); |
| 321 | } |
| 322 | AttrListPtr func_art_unlock_object_from_code_PAL; |
| 323 | func_art_unlock_object_from_code->setAttributes(func_art_unlock_object_from_code_PAL); |
| 324 | |
| 325 | Function* func_art_test_suspend_from_code = mod->getFunction("art_test_suspend_from_code"); |
| 326 | if (!func_art_test_suspend_from_code) { |
| 327 | func_art_test_suspend_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 328 | /*Type=*/FuncTy_5, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 329 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 330 | /*Name=*/"art_test_suspend_from_code", mod); // (external, no body) |
| 331 | func_art_test_suspend_from_code->setCallingConv(CallingConv::C); |
| 332 | } |
| 333 | AttrListPtr func_art_test_suspend_from_code_PAL; |
| 334 | func_art_test_suspend_from_code->setAttributes(func_art_test_suspend_from_code_PAL); |
| 335 | |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 336 | Function* func_art_push_shadow_frame_from_code = mod->getFunction("art_push_shadow_frame_from_code"); |
| 337 | if (!func_art_push_shadow_frame_from_code) { |
| 338 | func_art_push_shadow_frame_from_code = Function::Create( |
| 339 | /*Type=*/FuncTy_6, |
| 340 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 341 | /*Name=*/"art_push_shadow_frame_from_code", mod); // (external, no body) |
| 342 | func_art_push_shadow_frame_from_code->setCallingConv(CallingConv::C); |
| 343 | } |
| 344 | AttrListPtr func_art_push_shadow_frame_from_code_PAL; |
| 345 | func_art_push_shadow_frame_from_code->setAttributes(func_art_push_shadow_frame_from_code_PAL); |
| 346 | |
| 347 | Function* func_art_pop_shadow_frame_from_code = mod->getFunction("art_pop_shadow_frame_from_code"); |
| 348 | if (!func_art_pop_shadow_frame_from_code) { |
| 349 | func_art_pop_shadow_frame_from_code = Function::Create( |
| 350 | /*Type=*/FuncTy_5, |
| 351 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 352 | /*Name=*/"art_pop_shadow_frame_from_code", mod); // (external, no body) |
| 353 | func_art_pop_shadow_frame_from_code->setCallingConv(CallingConv::C); |
| 354 | } |
| 355 | AttrListPtr func_art_pop_shadow_frame_from_code_PAL; |
| 356 | func_art_pop_shadow_frame_from_code->setAttributes(func_art_pop_shadow_frame_from_code_PAL); |
| 357 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 358 | Function* func_art_is_exception_pending_from_code = mod->getFunction("art_is_exception_pending_from_code"); |
| 359 | if (!func_art_is_exception_pending_from_code) { |
| 360 | func_art_is_exception_pending_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 361 | /*Type=*/FuncTy_7, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 362 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 363 | /*Name=*/"art_is_exception_pending_from_code", mod); // (external, no body) |
| 364 | func_art_is_exception_pending_from_code->setCallingConv(CallingConv::C); |
| 365 | } |
| 366 | AttrListPtr func_art_is_exception_pending_from_code_PAL; |
| 367 | func_art_is_exception_pending_from_code->setAttributes(func_art_is_exception_pending_from_code_PAL); |
| 368 | |
| 369 | Function* func_art_throw_div_zero_from_code = mod->getFunction("art_throw_div_zero_from_code"); |
| 370 | if (!func_art_throw_div_zero_from_code) { |
| 371 | func_art_throw_div_zero_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 372 | /*Type=*/FuncTy_5, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 373 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 374 | /*Name=*/"art_throw_div_zero_from_code", mod); // (external, no body) |
| 375 | func_art_throw_div_zero_from_code->setCallingConv(CallingConv::C); |
| 376 | } |
| 377 | AttrListPtr func_art_throw_div_zero_from_code_PAL; |
| 378 | func_art_throw_div_zero_from_code->setAttributes(func_art_throw_div_zero_from_code_PAL); |
| 379 | |
| 380 | Function* func_art_throw_array_bounds_from_code = mod->getFunction("art_throw_array_bounds_from_code"); |
| 381 | if (!func_art_throw_array_bounds_from_code) { |
| 382 | func_art_throw_array_bounds_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 383 | /*Type=*/FuncTy_8, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 384 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 385 | /*Name=*/"art_throw_array_bounds_from_code", mod); // (external, no body) |
| 386 | func_art_throw_array_bounds_from_code->setCallingConv(CallingConv::C); |
| 387 | } |
| 388 | AttrListPtr func_art_throw_array_bounds_from_code_PAL; |
| 389 | func_art_throw_array_bounds_from_code->setAttributes(func_art_throw_array_bounds_from_code_PAL); |
| 390 | |
| 391 | Function* func_art_throw_no_such_method_from_code = mod->getFunction("art_throw_no_such_method_from_code"); |
| 392 | if (!func_art_throw_no_such_method_from_code) { |
| 393 | func_art_throw_no_such_method_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 394 | /*Type=*/FuncTy_9, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 395 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 396 | /*Name=*/"art_throw_no_such_method_from_code", mod); // (external, no body) |
| 397 | func_art_throw_no_such_method_from_code->setCallingConv(CallingConv::C); |
| 398 | } |
| 399 | AttrListPtr func_art_throw_no_such_method_from_code_PAL; |
| 400 | func_art_throw_no_such_method_from_code->setAttributes(func_art_throw_no_such_method_from_code_PAL); |
| 401 | |
| 402 | Function* func_art_throw_null_pointer_exception_from_code = mod->getFunction("art_throw_null_pointer_exception_from_code"); |
| 403 | if (!func_art_throw_null_pointer_exception_from_code) { |
| 404 | func_art_throw_null_pointer_exception_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 405 | /*Type=*/FuncTy_5, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 406 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 407 | /*Name=*/"art_throw_null_pointer_exception_from_code", mod); // (external, no body) |
| 408 | func_art_throw_null_pointer_exception_from_code->setCallingConv(CallingConv::C); |
| 409 | } |
| 410 | AttrListPtr func_art_throw_null_pointer_exception_from_code_PAL; |
| 411 | func_art_throw_null_pointer_exception_from_code->setAttributes(func_art_throw_null_pointer_exception_from_code_PAL); |
| 412 | |
| 413 | Function* func_art_throw_stack_overflow_from_code = mod->getFunction("art_throw_stack_overflow_from_code"); |
| 414 | if (!func_art_throw_stack_overflow_from_code) { |
| 415 | func_art_throw_stack_overflow_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 416 | /*Type=*/FuncTy_4, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 417 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 418 | /*Name=*/"art_throw_stack_overflow_from_code", mod); // (external, no body) |
| 419 | func_art_throw_stack_overflow_from_code->setCallingConv(CallingConv::C); |
| 420 | } |
| 421 | AttrListPtr func_art_throw_stack_overflow_from_code_PAL; |
| 422 | func_art_throw_stack_overflow_from_code->setAttributes(func_art_throw_stack_overflow_from_code_PAL); |
| 423 | |
| 424 | Function* func_art_throw_exception_from_code = mod->getFunction("art_throw_exception_from_code"); |
| 425 | if (!func_art_throw_exception_from_code) { |
| 426 | func_art_throw_exception_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 427 | /*Type=*/FuncTy_4, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 428 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 429 | /*Name=*/"art_throw_exception_from_code", mod); // (external, no body) |
| 430 | func_art_throw_exception_from_code->setCallingConv(CallingConv::C); |
| 431 | } |
| 432 | AttrListPtr func_art_throw_exception_from_code_PAL; |
| 433 | func_art_throw_exception_from_code->setAttributes(func_art_throw_exception_from_code_PAL); |
| 434 | |
| 435 | Function* func_art_find_catch_block_from_code = mod->getFunction("art_find_catch_block_from_code"); |
| 436 | if (!func_art_find_catch_block_from_code) { |
| 437 | func_art_find_catch_block_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 438 | /*Type=*/FuncTy_10, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 439 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 440 | /*Name=*/"art_find_catch_block_from_code", mod); // (external, no body) |
| 441 | func_art_find_catch_block_from_code->setCallingConv(CallingConv::C); |
| 442 | } |
| 443 | AttrListPtr func_art_find_catch_block_from_code_PAL; |
| 444 | func_art_find_catch_block_from_code->setAttributes(func_art_find_catch_block_from_code_PAL); |
| 445 | |
| 446 | Function* func_art_alloc_object_from_code = mod->getFunction("art_alloc_object_from_code"); |
| 447 | if (!func_art_alloc_object_from_code) { |
| 448 | func_art_alloc_object_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 449 | /*Type=*/FuncTy_11, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 450 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 451 | /*Name=*/"art_alloc_object_from_code", mod); // (external, no body) |
| 452 | func_art_alloc_object_from_code->setCallingConv(CallingConv::C); |
| 453 | } |
| 454 | AttrListPtr func_art_alloc_object_from_code_PAL; |
| 455 | func_art_alloc_object_from_code->setAttributes(func_art_alloc_object_from_code_PAL); |
| 456 | |
| 457 | Function* func_art_alloc_object_from_code_with_access_check = mod->getFunction("art_alloc_object_from_code_with_access_check"); |
| 458 | if (!func_art_alloc_object_from_code_with_access_check) { |
| 459 | func_art_alloc_object_from_code_with_access_check = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 460 | /*Type=*/FuncTy_11, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 461 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 462 | /*Name=*/"art_alloc_object_from_code_with_access_check", mod); // (external, no body) |
| 463 | func_art_alloc_object_from_code_with_access_check->setCallingConv(CallingConv::C); |
| 464 | } |
| 465 | AttrListPtr func_art_alloc_object_from_code_with_access_check_PAL; |
| 466 | func_art_alloc_object_from_code_with_access_check->setAttributes(func_art_alloc_object_from_code_with_access_check_PAL); |
| 467 | |
| 468 | Function* func_art_alloc_array_from_code = mod->getFunction("art_alloc_array_from_code"); |
| 469 | if (!func_art_alloc_array_from_code) { |
| 470 | func_art_alloc_array_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 471 | /*Type=*/FuncTy_12, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 472 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 473 | /*Name=*/"art_alloc_array_from_code", mod); // (external, no body) |
| 474 | func_art_alloc_array_from_code->setCallingConv(CallingConv::C); |
| 475 | } |
| 476 | AttrListPtr func_art_alloc_array_from_code_PAL; |
| 477 | func_art_alloc_array_from_code->setAttributes(func_art_alloc_array_from_code_PAL); |
| 478 | |
| 479 | Function* func_art_alloc_array_from_code_with_access_check = mod->getFunction("art_alloc_array_from_code_with_access_check"); |
| 480 | if (!func_art_alloc_array_from_code_with_access_check) { |
| 481 | func_art_alloc_array_from_code_with_access_check = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 482 | /*Type=*/FuncTy_12, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 483 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 484 | /*Name=*/"art_alloc_array_from_code_with_access_check", mod); // (external, no body) |
| 485 | func_art_alloc_array_from_code_with_access_check->setCallingConv(CallingConv::C); |
| 486 | } |
| 487 | AttrListPtr func_art_alloc_array_from_code_with_access_check_PAL; |
| 488 | func_art_alloc_array_from_code_with_access_check->setAttributes(func_art_alloc_array_from_code_with_access_check_PAL); |
| 489 | |
| 490 | Function* func_art_check_and_alloc_array_from_code = mod->getFunction("art_check_and_alloc_array_from_code"); |
| 491 | if (!func_art_check_and_alloc_array_from_code) { |
| 492 | func_art_check_and_alloc_array_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 493 | /*Type=*/FuncTy_12, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 494 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 495 | /*Name=*/"art_check_and_alloc_array_from_code", mod); // (external, no body) |
| 496 | func_art_check_and_alloc_array_from_code->setCallingConv(CallingConv::C); |
| 497 | } |
| 498 | AttrListPtr func_art_check_and_alloc_array_from_code_PAL; |
| 499 | func_art_check_and_alloc_array_from_code->setAttributes(func_art_check_and_alloc_array_from_code_PAL); |
| 500 | |
| 501 | Function* func_art_check_and_alloc_array_from_code_with_access_check = mod->getFunction("art_check_and_alloc_array_from_code_with_access_check"); |
| 502 | if (!func_art_check_and_alloc_array_from_code_with_access_check) { |
| 503 | 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] | 504 | /*Type=*/FuncTy_12, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 505 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 506 | /*Name=*/"art_check_and_alloc_array_from_code_with_access_check", mod); // (external, no body) |
| 507 | func_art_check_and_alloc_array_from_code_with_access_check->setCallingConv(CallingConv::C); |
| 508 | } |
| 509 | AttrListPtr func_art_check_and_alloc_array_from_code_with_access_check_PAL; |
| 510 | func_art_check_and_alloc_array_from_code_with_access_check->setAttributes(func_art_check_and_alloc_array_from_code_with_access_check_PAL); |
| 511 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 512 | Function* func_art_find_instance_field_from_code = mod->getFunction("art_find_instance_field_from_code"); |
| 513 | if (!func_art_find_instance_field_from_code) { |
| 514 | func_art_find_instance_field_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 515 | /*Type=*/FuncTy_13, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 516 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 517 | /*Name=*/"art_find_instance_field_from_code", mod); // (external, no body) |
| 518 | func_art_find_instance_field_from_code->setCallingConv(CallingConv::C); |
| 519 | } |
| 520 | AttrListPtr func_art_find_instance_field_from_code_PAL; |
| 521 | func_art_find_instance_field_from_code->setAttributes(func_art_find_instance_field_from_code_PAL); |
| 522 | |
| 523 | Function* func_art_find_static_field_from_code = mod->getFunction("art_find_static_field_from_code"); |
| 524 | if (!func_art_find_static_field_from_code) { |
| 525 | func_art_find_static_field_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 526 | /*Type=*/FuncTy_13, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 527 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 528 | /*Name=*/"art_find_static_field_from_code", mod); // (external, no body) |
| 529 | func_art_find_static_field_from_code->setCallingConv(CallingConv::C); |
| 530 | } |
| 531 | AttrListPtr func_art_find_static_field_from_code_PAL; |
| 532 | func_art_find_static_field_from_code->setAttributes(func_art_find_static_field_from_code_PAL); |
| 533 | |
| 534 | Function* func_art_find_interface_method_from_code = mod->getFunction("art_find_interface_method_from_code"); |
| 535 | if (!func_art_find_interface_method_from_code) { |
| 536 | func_art_find_interface_method_from_code = Function::Create( |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 537 | /*Type=*/FuncTy_14, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 538 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 539 | /*Name=*/"art_find_interface_method_from_code", mod); // (external, no body) |
| 540 | func_art_find_interface_method_from_code->setCallingConv(CallingConv::C); |
| 541 | } |
| 542 | AttrListPtr func_art_find_interface_method_from_code_PAL; |
| 543 | func_art_find_interface_method_from_code->setAttributes(func_art_find_interface_method_from_code_PAL); |
| 544 | |
Shih-wei Liao | 399ed3f | 2012-03-08 01:27:04 -0800 | [diff] [blame] | 545 | Function* func_art_find_virtual_method_from_code = mod->getFunction("art_find_virtual_method_from_code"); |
| 546 | if (!func_art_find_virtual_method_from_code) { |
| 547 | func_art_find_virtual_method_from_code = Function::Create( |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 548 | /*Type=*/FuncTy_14, |
Shih-wei Liao | 399ed3f | 2012-03-08 01:27:04 -0800 | [diff] [blame] | 549 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 550 | /*Name=*/"art_find_virtual_method_from_code", mod); // (external, no body) |
| 551 | func_art_find_virtual_method_from_code->setCallingConv(CallingConv::C); |
| 552 | } |
| 553 | AttrListPtr func_art_find_virtual_method_from_code_PAL; |
| 554 | func_art_find_virtual_method_from_code->setAttributes(func_art_find_virtual_method_from_code_PAL); |
| 555 | |
| 556 | Function* func_art_find_super_method_from_code = mod->getFunction("art_find_super_method_from_code"); |
| 557 | if (!func_art_find_super_method_from_code) { |
| 558 | func_art_find_super_method_from_code = Function::Create( |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 559 | /*Type=*/FuncTy_14, |
Shih-wei Liao | 399ed3f | 2012-03-08 01:27:04 -0800 | [diff] [blame] | 560 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 561 | /*Name=*/"art_find_super_method_from_code", mod); // (external, no body) |
| 562 | func_art_find_super_method_from_code->setCallingConv(CallingConv::C); |
| 563 | } |
| 564 | AttrListPtr func_art_find_super_method_from_code_PAL; |
| 565 | func_art_find_super_method_from_code->setAttributes(func_art_find_super_method_from_code_PAL); |
| 566 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 567 | Function* func_art_initialize_static_storage_from_code = mod->getFunction("art_initialize_static_storage_from_code"); |
| 568 | if (!func_art_initialize_static_storage_from_code) { |
| 569 | func_art_initialize_static_storage_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 570 | /*Type=*/FuncTy_11, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 571 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 572 | /*Name=*/"art_initialize_static_storage_from_code", mod); // (external, no body) |
| 573 | func_art_initialize_static_storage_from_code->setCallingConv(CallingConv::C); |
| 574 | } |
| 575 | AttrListPtr func_art_initialize_static_storage_from_code_PAL; |
| 576 | func_art_initialize_static_storage_from_code->setAttributes(func_art_initialize_static_storage_from_code_PAL); |
| 577 | |
| 578 | Function* func_art_initialize_type_from_code = mod->getFunction("art_initialize_type_from_code"); |
| 579 | if (!func_art_initialize_type_from_code) { |
| 580 | func_art_initialize_type_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 581 | /*Type=*/FuncTy_11, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 582 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 583 | /*Name=*/"art_initialize_type_from_code", mod); // (external, no body) |
| 584 | func_art_initialize_type_from_code->setCallingConv(CallingConv::C); |
| 585 | } |
| 586 | AttrListPtr func_art_initialize_type_from_code_PAL; |
| 587 | func_art_initialize_type_from_code->setAttributes(func_art_initialize_type_from_code_PAL); |
| 588 | |
| 589 | Function* func_art_initialize_type_and_verify_access_from_code = mod->getFunction("art_initialize_type_and_verify_access_from_code"); |
| 590 | if (!func_art_initialize_type_and_verify_access_from_code) { |
| 591 | func_art_initialize_type_and_verify_access_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 592 | /*Type=*/FuncTy_11, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 593 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 594 | /*Name=*/"art_initialize_type_and_verify_access_from_code", mod); // (external, no body) |
| 595 | func_art_initialize_type_and_verify_access_from_code->setCallingConv(CallingConv::C); |
| 596 | } |
| 597 | AttrListPtr func_art_initialize_type_and_verify_access_from_code_PAL; |
| 598 | func_art_initialize_type_and_verify_access_from_code->setAttributes(func_art_initialize_type_and_verify_access_from_code_PAL); |
| 599 | |
| 600 | Function* func_art_resolve_string_from_code = mod->getFunction("art_resolve_string_from_code"); |
| 601 | if (!func_art_resolve_string_from_code) { |
| 602 | func_art_resolve_string_from_code = Function::Create( |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 603 | /*Type=*/FuncTy_15, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 604 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 605 | /*Name=*/"art_resolve_string_from_code", mod); // (external, no body) |
| 606 | func_art_resolve_string_from_code->setCallingConv(CallingConv::C); |
| 607 | } |
| 608 | AttrListPtr func_art_resolve_string_from_code_PAL; |
| 609 | func_art_resolve_string_from_code->setAttributes(func_art_resolve_string_from_code_PAL); |
| 610 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 611 | Function* func_art_set32_static_from_code = mod->getFunction("art_set32_static_from_code"); |
| 612 | if (!func_art_set32_static_from_code) { |
| 613 | func_art_set32_static_from_code = Function::Create( |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 614 | /*Type=*/FuncTy_16, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 615 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 616 | /*Name=*/"art_set32_static_from_code", mod); // (external, no body) |
| 617 | func_art_set32_static_from_code->setCallingConv(CallingConv::C); |
| 618 | } |
| 619 | AttrListPtr func_art_set32_static_from_code_PAL; |
| 620 | func_art_set32_static_from_code->setAttributes(func_art_set32_static_from_code_PAL); |
| 621 | |
| 622 | Function* func_art_set64_static_from_code = mod->getFunction("art_set64_static_from_code"); |
| 623 | if (!func_art_set64_static_from_code) { |
| 624 | func_art_set64_static_from_code = Function::Create( |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 625 | /*Type=*/FuncTy_17, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 626 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 627 | /*Name=*/"art_set64_static_from_code", mod); // (external, no body) |
| 628 | func_art_set64_static_from_code->setCallingConv(CallingConv::C); |
| 629 | } |
| 630 | AttrListPtr func_art_set64_static_from_code_PAL; |
| 631 | func_art_set64_static_from_code->setAttributes(func_art_set64_static_from_code_PAL); |
| 632 | |
| 633 | Function* func_art_set_obj_static_from_code = mod->getFunction("art_set_obj_static_from_code"); |
| 634 | if (!func_art_set_obj_static_from_code) { |
| 635 | func_art_set_obj_static_from_code = Function::Create( |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 636 | /*Type=*/FuncTy_18, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 637 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 638 | /*Name=*/"art_set_obj_static_from_code", mod); // (external, no body) |
| 639 | func_art_set_obj_static_from_code->setCallingConv(CallingConv::C); |
| 640 | } |
| 641 | AttrListPtr func_art_set_obj_static_from_code_PAL; |
| 642 | func_art_set_obj_static_from_code->setAttributes(func_art_set_obj_static_from_code_PAL); |
| 643 | |
| 644 | Function* func_art_get32_static_from_code = mod->getFunction("art_get32_static_from_code"); |
| 645 | if (!func_art_get32_static_from_code) { |
| 646 | func_art_get32_static_from_code = Function::Create( |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 647 | /*Type=*/FuncTy_19, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 648 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 649 | /*Name=*/"art_get32_static_from_code", mod); // (external, no body) |
| 650 | func_art_get32_static_from_code->setCallingConv(CallingConv::C); |
| 651 | } |
| 652 | AttrListPtr func_art_get32_static_from_code_PAL; |
| 653 | func_art_get32_static_from_code->setAttributes(func_art_get32_static_from_code_PAL); |
| 654 | |
| 655 | Function* func_art_get64_static_from_code = mod->getFunction("art_get64_static_from_code"); |
| 656 | if (!func_art_get64_static_from_code) { |
| 657 | func_art_get64_static_from_code = Function::Create( |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 658 | /*Type=*/FuncTy_20, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 659 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 660 | /*Name=*/"art_get64_static_from_code", mod); // (external, no body) |
| 661 | func_art_get64_static_from_code->setCallingConv(CallingConv::C); |
| 662 | } |
| 663 | AttrListPtr func_art_get64_static_from_code_PAL; |
| 664 | func_art_get64_static_from_code->setAttributes(func_art_get64_static_from_code_PAL); |
| 665 | |
| 666 | Function* func_art_get_obj_static_from_code = mod->getFunction("art_get_obj_static_from_code"); |
| 667 | if (!func_art_get_obj_static_from_code) { |
| 668 | func_art_get_obj_static_from_code = Function::Create( |
Logan Chien | 3f71e70 | 2012-02-17 18:45:27 +0800 | [diff] [blame] | 669 | /*Type=*/FuncTy_11, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 670 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 671 | /*Name=*/"art_get_obj_static_from_code", mod); // (external, no body) |
| 672 | func_art_get_obj_static_from_code->setCallingConv(CallingConv::C); |
| 673 | } |
| 674 | AttrListPtr func_art_get_obj_static_from_code_PAL; |
| 675 | func_art_get_obj_static_from_code->setAttributes(func_art_get_obj_static_from_code_PAL); |
| 676 | |
| 677 | Function* func_art_set32_instance_from_code = mod->getFunction("art_set32_instance_from_code"); |
| 678 | if (!func_art_set32_instance_from_code) { |
| 679 | func_art_set32_instance_from_code = Function::Create( |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 680 | /*Type=*/FuncTy_21, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 681 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 682 | /*Name=*/"art_set32_instance_from_code", mod); // (external, no body) |
| 683 | func_art_set32_instance_from_code->setCallingConv(CallingConv::C); |
| 684 | } |
| 685 | AttrListPtr func_art_set32_instance_from_code_PAL; |
| 686 | func_art_set32_instance_from_code->setAttributes(func_art_set32_instance_from_code_PAL); |
| 687 | |
| 688 | Function* func_art_set64_instance_from_code = mod->getFunction("art_set64_instance_from_code"); |
| 689 | if (!func_art_set64_instance_from_code) { |
| 690 | func_art_set64_instance_from_code = Function::Create( |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 691 | /*Type=*/FuncTy_22, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 692 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 693 | /*Name=*/"art_set64_instance_from_code", mod); // (external, no body) |
| 694 | func_art_set64_instance_from_code->setCallingConv(CallingConv::C); |
| 695 | } |
| 696 | AttrListPtr func_art_set64_instance_from_code_PAL; |
| 697 | func_art_set64_instance_from_code->setAttributes(func_art_set64_instance_from_code_PAL); |
| 698 | |
| 699 | Function* func_art_set_obj_instance_from_code = mod->getFunction("art_set_obj_instance_from_code"); |
| 700 | if (!func_art_set_obj_instance_from_code) { |
| 701 | func_art_set_obj_instance_from_code = Function::Create( |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 702 | /*Type=*/FuncTy_23, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 703 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 704 | /*Name=*/"art_set_obj_instance_from_code", mod); // (external, no body) |
| 705 | func_art_set_obj_instance_from_code->setCallingConv(CallingConv::C); |
| 706 | } |
| 707 | AttrListPtr func_art_set_obj_instance_from_code_PAL; |
| 708 | func_art_set_obj_instance_from_code->setAttributes(func_art_set_obj_instance_from_code_PAL); |
| 709 | |
| 710 | Function* func_art_get32_instance_from_code = mod->getFunction("art_get32_instance_from_code"); |
| 711 | if (!func_art_get32_instance_from_code) { |
| 712 | func_art_get32_instance_from_code = Function::Create( |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 713 | /*Type=*/FuncTy_18, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 714 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 715 | /*Name=*/"art_get32_instance_from_code", mod); // (external, no body) |
| 716 | func_art_get32_instance_from_code->setCallingConv(CallingConv::C); |
| 717 | } |
| 718 | AttrListPtr func_art_get32_instance_from_code_PAL; |
| 719 | func_art_get32_instance_from_code->setAttributes(func_art_get32_instance_from_code_PAL); |
| 720 | |
| 721 | Function* func_art_get64_instance_from_code = mod->getFunction("art_get64_instance_from_code"); |
| 722 | if (!func_art_get64_instance_from_code) { |
| 723 | func_art_get64_instance_from_code = Function::Create( |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 724 | /*Type=*/FuncTy_24, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 725 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 726 | /*Name=*/"art_get64_instance_from_code", mod); // (external, no body) |
| 727 | func_art_get64_instance_from_code->setCallingConv(CallingConv::C); |
| 728 | } |
| 729 | AttrListPtr func_art_get64_instance_from_code_PAL; |
| 730 | func_art_get64_instance_from_code->setAttributes(func_art_get64_instance_from_code_PAL); |
| 731 | |
| 732 | Function* func_art_get_obj_instance_from_code = mod->getFunction("art_get_obj_instance_from_code"); |
| 733 | if (!func_art_get_obj_instance_from_code) { |
| 734 | func_art_get_obj_instance_from_code = Function::Create( |
Logan Chien | 1b0a1b7 | 2012-03-15 06:20:17 +0800 | [diff] [blame] | 735 | /*Type=*/FuncTy_14, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 736 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 737 | /*Name=*/"art_get_obj_instance_from_code", mod); // (external, no body) |
| 738 | func_art_get_obj_instance_from_code->setCallingConv(CallingConv::C); |
| 739 | } |
| 740 | AttrListPtr func_art_get_obj_instance_from_code_PAL; |
| 741 | func_art_get_obj_instance_from_code->setAttributes(func_art_get_obj_instance_from_code_PAL); |
| 742 | |
TDYa127 | 28f1a14 | 2012-03-15 21:51:52 -0700 | [diff] [blame^] | 743 | Function* func_art_decode_jobject_in_thread = mod->getFunction("art_decode_jobject_in_thread"); |
| 744 | if (!func_art_decode_jobject_in_thread) { |
| 745 | func_art_decode_jobject_in_thread = Function::Create( |
| 746 | /*Type=*/FuncTy_27, |
| 747 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 748 | /*Name=*/"art_decode_jobject_in_thread", mod); // (external, no body) |
| 749 | func_art_decode_jobject_in_thread->setCallingConv(CallingConv::C); |
| 750 | } |
| 751 | AttrListPtr func_art_decode_jobject_in_thread_PAL; |
| 752 | func_art_decode_jobject_in_thread->setAttributes(func_art_decode_jobject_in_thread_PAL); |
| 753 | |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 754 | Function* func_art_is_assignable_from_code = mod->getFunction("art_is_assignable_from_code"); |
| 755 | if (!func_art_is_assignable_from_code) { |
| 756 | func_art_is_assignable_from_code = Function::Create( |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 757 | /*Type=*/FuncTy_25, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 758 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 759 | /*Name=*/"art_is_assignable_from_code", mod); // (external, no body) |
| 760 | func_art_is_assignable_from_code->setCallingConv(CallingConv::C); |
| 761 | } |
| 762 | AttrListPtr func_art_is_assignable_from_code_PAL; |
| 763 | func_art_is_assignable_from_code->setAttributes(func_art_is_assignable_from_code_PAL); |
| 764 | |
| 765 | Function* func_art_check_cast_from_code = mod->getFunction("art_check_cast_from_code"); |
| 766 | if (!func_art_check_cast_from_code) { |
| 767 | func_art_check_cast_from_code = Function::Create( |
Logan Chien | 3b2b2e7 | 2012-03-06 16:11:45 +0800 | [diff] [blame] | 768 | /*Type=*/FuncTy_26, |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 769 | /*Linkage=*/GlobalValue::ExternalLinkage, |
| 770 | /*Name=*/"art_check_cast_from_code", mod); // (external, no body) |
| 771 | func_art_check_cast_from_code->setCallingConv(CallingConv::C); |
| 772 | } |
| 773 | AttrListPtr func_art_check_cast_from_code_PAL; |
| 774 | func_art_check_cast_from_code->setAttributes(func_art_check_cast_from_code_PAL); |
| 775 | |
| 776 | // Global Variable Declarations |
| 777 | |
| 778 | |
| 779 | // Constant Definitions |
| 780 | |
| 781 | // Global Variable Definitions |
| 782 | |
| 783 | // Function Definitions |
| 784 | |
| 785 | return mod; |
| 786 | |
| 787 | } |
Logan Chien | e75a8cc | 2012-02-24 12:26:43 +0800 | [diff] [blame] | 788 | |
| 789 | } // namespace compiler_llvm |
| 790 | } // namespace art |