diff --git a/llvm/include/llvm/IR/BasicBlock.h b/llvm/include/llvm/IR/BasicBlock.h --- a/llvm/include/llvm/IR/BasicBlock.h +++ b/llvm/include/llvm/IR/BasicBlock.h @@ -96,9 +96,7 @@ /// before the specified basic block. static BasicBlock *Create(LLVMContext &Context, const Twine &Name = "", Function *Parent = nullptr, - BasicBlock *InsertBefore = nullptr) { - return new BasicBlock(Context, Name, Parent, InsertBefore); - } + BasicBlock *InsertBefore = nullptr); /// Return the enclosing method, or null if none. const Function *getParent() const { return Parent; } diff --git a/llvm/lib/IR/BasicBlock.cpp b/llvm/lib/IR/BasicBlock.cpp --- a/llvm/lib/IR/BasicBlock.cpp +++ b/llvm/lib/IR/BasicBlock.cpp @@ -36,6 +36,11 @@ return getType()->getContext(); } +BasicBlock *BasicBlock::Create(LLVMContext &Context, const Twine &Name, + Function *Parent, BasicBlock *InsertBefore) { + return new BasicBlock(Context, Name, Parent, InsertBefore); +} + template <> void llvm::invalidateParentIListOrdering(BasicBlock *BB) { BB->invalidateOrders(); }