| 365 | } |
| 366 | |
| 367 | llvm::Constant* Engine::CreateGlobalStringPtr(const std::string& string) { |
| 368 | auto gloval_variable = ir_builder()->CreateGlobalString(string); |
| 369 | auto zero = llvm::ConstantInt::get(llvm::Type::getInt32Ty(*context()), 0); |
| 370 | llvm::Constant* indices[] = {zero, zero}; |
| 371 | return llvm::ConstantExpr::getInBoundsGetElementPtr(gloval_variable->getValueType(), |
| 372 | gloval_variable, indices); |
| 373 | } |
| 374 | |
| 375 | /// factory method to construct the engine. |
| 376 | Result<std::unique_ptr<Engine>> Engine::Make( |
nothing calls this directly
no test coverage detected