[PATCH] D139219: [NFC] Moved definition of BasicBlock::Create() to BasicBlock.cpp.
Vasileios Porpodas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 2 12:04:57 PST 2022
vporpo created this revision.
vporpo added reviewers: aeubanks, asbirlea.
Herald added a subscriber: hiraditya.
Herald added a project: All.
vporpo requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D139219
Files:
llvm/include/llvm/IR/BasicBlock.h
llvm/lib/IR/BasicBlock.cpp
Index: llvm/lib/IR/BasicBlock.cpp
===================================================================
--- llvm/lib/IR/BasicBlock.cpp
+++ 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();
}
Index: llvm/include/llvm/IR/BasicBlock.h
===================================================================
--- llvm/include/llvm/IR/BasicBlock.h
+++ 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; }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139219.479708.patch
Type: text/x-patch
Size: 1234 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221202/d3455c09/attachment.bin>
More information about the llvm-commits
mailing list