| 386 | } |
| 387 | |
| 388 | llvm::Constant* Engine::CreateGlobalStringPtr(const std::string& string) { |
| 389 | auto gloval_variable = ir_builder()->CreateGlobalString(string); |
| 390 | auto zero = llvm::ConstantInt::get(llvm::Type::getInt32Ty(*context()), 0); |
| 391 | llvm::Constant* indices[] = {zero, zero}; |
| 392 | return llvm::ConstantExpr::getInBoundsGetElementPtr(gloval_variable->getValueType(), |
| 393 | gloval_variable, indices); |
| 394 | } |
| 395 | |
| 396 | /// factory method to construct the engine. |
| 397 | Result<std::unique_ptr<Engine>> Engine::Make( |
nothing calls this directly
no test coverage detected