diff options
author | James Y Knight <jyknight@google.com> | 2019-01-13 16:09:28 +0000 |
---|---|---|
committer | James Y Knight <jyknight@google.com> | 2019-01-13 16:09:28 +0000 |
commit | c0044118c8ec4889ff1490179d5d70549cb7621c (patch) | |
tree | 603011e7fc7b0e9f30d4446f96262726a0addb37 /llvm/unittests/ExecutionEngine/Orc/RemoteObjectLayerTest.cpp | |
parent | 06e3950561a5cd59b1295ed66071c8a53af8067a (diff) | |
download | bcm5719-llvm-c0044118c8ec4889ff1490179d5d70549cb7621c.tar.gz bcm5719-llvm-c0044118c8ec4889ff1490179d5d70549cb7621c.zip |
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
Diffstat (limited to 'llvm/unittests/ExecutionEngine/Orc/RemoteObjectLayerTest.cpp')
-rw-r--r-- | llvm/unittests/ExecutionEngine/Orc/RemoteObjectLayerTest.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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<void(int, char**)>("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)); |