Skip to content

Commit cf0357a

Browse files
committed
[BasicBlockUtils] Fix typo in API name (NFC)
detatch -> detach. As this requires touching all uses, also lower-case it in accordance with the style guide.
1 parent 8a4293f commit cf0357a

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ class Value;
4646
/// instruction. If \p Updates is specified, collect all necessary DT updates
4747
/// into this vector. If \p KeepOneInputPHIs is true, one-input Phis in
4848
/// successors of blocks being deleted will be preserved.
49-
void DetatchDeadBlocks(ArrayRef <BasicBlock *> BBs,
50-
SmallVectorImpl<DominatorTree::UpdateType> *Updates,
51-
bool KeepOneInputPHIs = false);
49+
void detachDeadBlocks(ArrayRef <BasicBlock *> BBs,
50+
SmallVectorImpl<DominatorTree::UpdateType> *Updates,
51+
bool KeepOneInputPHIs = false);
5252

5353
/// Delete the specified block, which must have no predecessors.
5454
void DeleteDeadBlock(BasicBlock *BB, DomTreeUpdater *DTU = nullptr,

llvm/lib/Transforms/IPO/Attributor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1792,7 +1792,7 @@ ChangeStatus Attributor::cleanupIR() {
17921792
// Actually we do not delete the blocks but squash them into a single
17931793
// unreachable but untangling branches that jump here is something we need
17941794
// to do in a more generic way.
1795-
DetatchDeadBlocks(ToBeDeletedBBs, nullptr);
1795+
detachDeadBlocks(ToBeDeletedBBs, nullptr);
17961796
}
17971797

17981798
identifyDeadInternalFunctions();

llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ class ConstantTerminatorFoldingImpl {
468468
LI.removeBlock(BB);
469469
}
470470

471-
DetatchDeadBlocks(DeadLoopBlocks, &DTUpdates, /*KeepOneInputPHIs*/true);
471+
detachDeadBlocks(DeadLoopBlocks, &DTUpdates, /*KeepOneInputPHIs*/true);
472472
DTU.applyUpdates(DTUpdates);
473473
DTUpdates.clear();
474474
for (auto *BB : DeadLoopBlocks)

llvm/lib/Transforms/Utils/BasicBlockUtils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static cl::opt<unsigned> MaxDeoptOrUnreachableSuccessorCheckDepth(
5959
"is followed by a block that either has a terminating "
6060
"deoptimizing call or is terminated with an unreachable"));
6161

62-
void llvm::DetatchDeadBlocks(
62+
void llvm::detachDeadBlocks(
6363
ArrayRef<BasicBlock *> BBs,
6464
SmallVectorImpl<DominatorTree::UpdateType> *Updates,
6565
bool KeepOneInputPHIs) {
@@ -110,7 +110,7 @@ void llvm::DeleteDeadBlocks(ArrayRef <BasicBlock *> BBs, DomTreeUpdater *DTU,
110110
#endif
111111

112112
SmallVector<DominatorTree::UpdateType, 4> Updates;
113-
DetatchDeadBlocks(BBs, DTU ? &Updates : nullptr, KeepOneInputPHIs);
113+
detachDeadBlocks(BBs, DTU ? &Updates : nullptr, KeepOneInputPHIs);
114114

115115
if (DTU)
116116
DTU->applyUpdates(Updates);

0 commit comments

Comments
 (0)