@@ -125,7 +125,7 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
125
125
void finalize ();
126
126
127
127
void setCurrentLoc (IRBuilder &Builder, const SILDebugScope *DS,
128
- Optional< SILLocation> Loc);
128
+ SILLocation Loc);
129
129
void clearLoc (IRBuilder &Builder);
130
130
void pushLoc ();
131
131
void popLoc ();
@@ -1555,7 +1555,7 @@ void IRGenDebugInfoImpl::finalize() {
1555
1555
1556
1556
void IRGenDebugInfoImpl::setCurrentLoc (IRBuilder &Builder,
1557
1557
const SILDebugScope *DS,
1558
- Optional< SILLocation> Loc) {
1558
+ SILLocation Loc) {
1559
1559
assert (DS && " empty scope" );
1560
1560
auto *Scope = getOrCreateScope (DS);
1561
1561
if (!Scope)
@@ -1565,7 +1565,7 @@ void IRGenDebugInfoImpl::setCurrentLoc(IRBuilder &Builder,
1565
1565
SILFunction *Fn = DS->getInlinedFunction ();
1566
1566
if (Fn && Fn->isThunk ()) {
1567
1567
L = SILLocation::getCompilerGeneratedDebugLoc ();
1568
- } else if (DS == LastScope && Loc && Loc-> isAutoGenerated ()) {
1568
+ } else if (DS == LastScope && Loc. isAutoGenerated ()) {
1569
1569
// Reuse the last source location if we are still in the same
1570
1570
// scope to get a more contiguous line table.
1571
1571
L = LastDebugLoc;
@@ -1574,7 +1574,7 @@ void IRGenDebugInfoImpl::setCurrentLoc(IRBuilder &Builder,
1574
1574
L = getDebugLocation (Loc);
1575
1575
// Otherwise use a line 0 artificial location, but the file from the
1576
1576
// location.
1577
- if (Loc && Loc-> isAutoGenerated ()) {
1577
+ if (Loc. isAutoGenerated ()) {
1578
1578
L.Line = 0 ;
1579
1579
L.Column = 0 ;
1580
1580
}
@@ -2056,7 +2056,7 @@ void IRGenDebugInfo::finalize() {
2056
2056
}
2057
2057
2058
2058
void IRGenDebugInfo::setCurrentLoc (IRBuilder &Builder, const SILDebugScope *DS,
2059
- Optional< SILLocation> Loc) {
2059
+ SILLocation Loc) {
2060
2060
static_cast <IRGenDebugInfoImpl *>(this )->setCurrentLoc (Builder, DS, Loc);
2061
2061
}
2062
2062
0 commit comments