Skip to content

[sil] Add a small helper to SILBuilder to get the loc of the builder's current insertion point. #34783

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions include/swift/SIL/SILBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,9 @@ class SILBuilder {
//===--------------------------------------------------------------------===//

bool hasValidInsertionPoint() const { return BB != nullptr; }
SILBasicBlock *getInsertionBB() { return BB; }
SILBasicBlock::iterator getInsertionPoint() { return InsertPt; }
SILBasicBlock *getInsertionBB() const { return BB; }
SILBasicBlock::iterator getInsertionPoint() const { return InsertPt; }
SILLocation getInsertionPointLoc() const { return InsertPt->getLoc(); }

/// insertingAtEndOfBlock - Return true if the insertion point is at the end
/// of the current basic block. False if we're inserting before an existing
Expand Down Expand Up @@ -320,8 +321,6 @@ class SILBuilder {
setInsertionPoint(&*BBIter);
}

SILBasicBlock *getInsertionPoint() const { return BB; }

//===--------------------------------------------------------------------===//
// Instruction Tracking
//===--------------------------------------------------------------------===//
Expand Down