Skip to content

Commit a87f343

Browse files
committed
Rename SILFunction::entryBB to getEntryBlock
1 parent 4773e89 commit a87f343

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

include/swift/SIL/SILFunction.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,8 +618,8 @@ class SILFunction
618618
SILBasicBlock &front() { return *begin(); }
619619
const SILBasicBlock &front() const { return *begin(); }
620620

621-
SILBasicBlock *entryBB() { return &front(); }
622-
const SILBasicBlock *entryBB() const { return &front(); }
621+
SILBasicBlock *getEntryBlock() { return &front(); }
622+
const SILBasicBlock *getEntryBlock() const { return &front(); }
623623

624624
SILBasicBlock *createBasicBlock();
625625
SILBasicBlock *createBasicBlock(SILBasicBlock *After);

lib/IRGen/AllocStackHoisting.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ void Partition::assignStackLocation(
119119
auto *AssignedLoc = Elts[0];
120120

121121
// Move this assigned location to the beginning of the entry block.
122-
auto *EntryBB = AssignedLoc->getFunction()->entryBB();
122+
auto *EntryBB = AssignedLoc->getFunction()->getEntryBlock();
123123
AssignedLoc->removeFromParent();
124124
EntryBB->push_front(AssignedLoc);
125125

@@ -382,7 +382,7 @@ void HoistAllocStack::hoist() {
382382
Merger.mergeSlots();
383383
} else {
384384
// Hoist alloc_stacks to the entry block and delete dealloc_stacks.
385-
auto *EntryBB = F->entryBB();
385+
auto *EntryBB = F->getEntryBlock();
386386
for (auto *AllocStack : AllocStackToHoist) {
387387
// Insert at the beginning of the entry block.
388388
AllocStack->removeFromParent();

lib/IRGen/IRGenSIL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3530,7 +3530,7 @@ void IRGenSILFunction::visitAllocStackInst(swift::AllocStackInst *i) {
35303530
(void) Decl;
35313531

35323532
bool isEntryBlock =
3533-
i->getParentBlock() == i->getFunction()->entryBB();
3533+
i->getParentBlock() == i->getFunction()->getEntryBlock();
35343534
auto addr =
35353535
type.allocateStack(*this, i->getElementType(), isEntryBlock, dbgname);
35363536

0 commit comments

Comments
 (0)