We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
getInsertionPointLoc()
1 parent 8816034 commit 6711c90Copy full SHA for 6711c90
include/swift/SIL/SILBuilder.h
@@ -263,7 +263,10 @@ class SILBuilder {
263
bool hasValidInsertionPoint() const { return BB != nullptr; }
264
SILBasicBlock *getInsertionBB() const { return BB; }
265
SILBasicBlock::iterator getInsertionPoint() const { return InsertPt; }
266
- SILLocation getInsertionPointLoc() const { return InsertPt->getLoc(); }
+ SILLocation getInsertionPointLoc() const {
267
+ assert(!insertingAtEndOfBlock());
268
+ return InsertPt->getLoc();
269
+ }
270
271
/// insertingAtEndOfBlock - Return true if the insertion point is at the end
272
/// of the current basic block. False if we're inserting before an existing
0 commit comments