From c0044118c8ec4889ff1490179d5d70549cb7621c Mon Sep 17 00:00:00 2001 From: James Y Knight Date: Sun, 13 Jan 2019 16:09:28 +0000 Subject: Remove TypeBuilder.h, and fix the few locations using it. This shortcut mechanism for creating types was added 10 years ago, but has seen almost no uptake since then, neither internally nor in external projects. The very small number of characters saved by using it does not seem worth the mental overhead of an additional type-creation API, so, delete it. Differential Revision: https://reviews.llvm.org/D56573 llvm-svn: 351020 --- llvm/unittests/ExecutionEngine/Orc/RemoteObjectLayerTest.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'llvm/unittests/ExecutionEngine/Orc/RemoteObjectLayerTest.cpp') diff --git a/llvm/unittests/ExecutionEngine/Orc/RemoteObjectLayerTest.cpp b/llvm/unittests/ExecutionEngine/Orc/RemoteObjectLayerTest.cpp index 09224c289b4..4ffd7416a4a 100644 --- a/llvm/unittests/ExecutionEngine/Orc/RemoteObjectLayerTest.cpp +++ b/llvm/unittests/ExecutionEngine/Orc/RemoteObjectLayerTest.cpp @@ -95,7 +95,12 @@ MockObjectLayer::ObjectPtr createTestObject() { LLVMContext Ctx; ModuleBuilder MB(Ctx, TM->getTargetTriple().str(), "TestModule"); MB.getModule()->setDataLayout(TM->createDataLayout()); - auto *Main = MB.createFunctionDecl("main"); + auto *Main = MB.createFunctionDecl( + FunctionType::get(Type::getInt32Ty(Ctx), + {Type::getInt32Ty(Ctx), + Type::getInt8PtrTy(Ctx)->getPointerTo()}, + false), + "main"); Main->getBasicBlockList().push_back(BasicBlock::Create(Ctx)); IRBuilder<> B(&Main->back()); B.CreateRet(ConstantInt::getSigned(Type::getInt32Ty(Ctx), 42)); -- cgit v1.2.3