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/IR/CFGBuilder.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/IR/CFGBuilder.cpp')
| -rw-r--r-- | llvm/unittests/IR/CFGBuilder.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/unittests/IR/CFGBuilder.cpp b/llvm/unittests/IR/CFGBuilder.cpp index 0f9fb8b18cc..886ab8a9de2 100644 --- a/llvm/unittests/IR/CFGBuilder.cpp +++ b/llvm/unittests/IR/CFGBuilder.cpp @@ -11,7 +11,6 @@ #include "llvm/IR/IRBuilder.h" #include "llvm/IR/LLVMContext.h" -#include "llvm/IR/TypeBuilder.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" #include "gtest/gtest.h" @@ -23,7 +22,7 @@ using namespace llvm; CFGHolder::CFGHolder(StringRef ModuleName, StringRef FunctionName) : Context(llvm::make_unique<LLVMContext>()), M(llvm::make_unique<Module>(ModuleName, *Context)) { - FunctionType *FTy = TypeBuilder<void(), false>::get(*Context); + FunctionType *FTy = FunctionType::get(Type::getVoidTy(*Context), {}, false); F = cast<Function>(M->getOrInsertFunction(FunctionName, FTy)); } CFGHolder::~CFGHolder() = default; |

