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/LegacyRTDyldObjectLinkingLayerTest.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/LegacyRTDyldObjectLinkingLayerTest.cpp')
-rw-r--r-- | llvm/unittests/ExecutionEngine/Orc/LegacyRTDyldObjectLinkingLayerTest.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/llvm/unittests/ExecutionEngine/Orc/LegacyRTDyldObjectLinkingLayerTest.cpp b/llvm/unittests/ExecutionEngine/Orc/LegacyRTDyldObjectLinkingLayerTest.cpp index 8c9c958cc42..b3696c6ca4a 100644 --- a/llvm/unittests/ExecutionEngine/Orc/LegacyRTDyldObjectLinkingLayerTest.cpp +++ b/llvm/unittests/ExecutionEngine/Orc/LegacyRTDyldObjectLinkingLayerTest.cpp @@ -123,6 +123,8 @@ TEST_F(LegacyRTDyldObjectLinkingLayerExecutionTest, NoDuplicateFinalization) { if (!SupportsJIT) return; + Type *Int32Ty = IntegerType::get(Context, 32); + ExecutionSession ES; auto MM = std::make_shared<SectionMemoryManagerWrapper>(); @@ -153,7 +155,8 @@ TEST_F(LegacyRTDyldObjectLinkingLayerExecutionTest, NoDuplicateFinalization) { ModuleBuilder MB1(Context, "", "dummy"); { MB1.getModule()->setDataLayout(TM->createDataLayout()); - Function *BarImpl = MB1.createFunctionDecl<int32_t(void)>("bar"); + Function *BarImpl = + MB1.createFunctionDecl(FunctionType::get(Int32Ty, {}, false), "bar"); BasicBlock *BarEntry = BasicBlock::Create(Context, "entry", BarImpl); IRBuilder<> Builder(BarEntry); IntegerType *Int32Ty = IntegerType::get(Context, 32); @@ -166,8 +169,10 @@ TEST_F(LegacyRTDyldObjectLinkingLayerExecutionTest, NoDuplicateFinalization) { ModuleBuilder MB2(Context, "", "dummy"); { MB2.getModule()->setDataLayout(TM->createDataLayout()); - Function *BarDecl = MB2.createFunctionDecl<int32_t(void)>("bar"); - Function *FooImpl = MB2.createFunctionDecl<int32_t(void)>("foo"); + Function *BarDecl = + MB2.createFunctionDecl(FunctionType::get(Int32Ty, {}, false), "bar"); + Function *FooImpl = + MB2.createFunctionDecl(FunctionType::get(Int32Ty, {}, false), "foo"); BasicBlock *FooEntry = BasicBlock::Create(Context, "entry", FooImpl); IRBuilder<> Builder(FooEntry); Builder.CreateRet(Builder.CreateCall(BarDecl)); @@ -207,6 +212,8 @@ TEST_F(LegacyRTDyldObjectLinkingLayerExecutionTest, NoPrematureAllocation) { if (!SupportsJIT) return; + Type *Int32Ty = IntegerType::get(Context, 32); + ExecutionSession ES; auto MM = std::make_shared<SectionMemoryManagerWrapper>(); @@ -233,7 +240,8 @@ TEST_F(LegacyRTDyldObjectLinkingLayerExecutionTest, NoPrematureAllocation) { ModuleBuilder MB1(Context, "", "dummy"); { MB1.getModule()->setDataLayout(TM->createDataLayout()); - Function *BarImpl = MB1.createFunctionDecl<int32_t(void)>("foo"); + Function *BarImpl = + MB1.createFunctionDecl(FunctionType::get(Int32Ty, {}, false), "foo"); BasicBlock *BarEntry = BasicBlock::Create(Context, "entry", BarImpl); IRBuilder<> Builder(BarEntry); IntegerType *Int32Ty = IntegerType::get(Context, 32); @@ -246,7 +254,8 @@ TEST_F(LegacyRTDyldObjectLinkingLayerExecutionTest, NoPrematureAllocation) { ModuleBuilder MB2(Context, "", "dummy"); { MB2.getModule()->setDataLayout(TM->createDataLayout()); - Function *BarImpl = MB2.createFunctionDecl<int32_t(void)>("bar"); + Function *BarImpl = + MB2.createFunctionDecl(FunctionType::get(Int32Ty, {}, false), "bar"); BasicBlock *BarEntry = BasicBlock::Create(Context, "entry", BarImpl); IRBuilder<> Builder(BarEntry); IntegerType *Int32Ty = IntegerType::get(Context, 32); |