Skip to content

Commit 37b8391

Browse files
committed
Remove source location workaround for autoclosures.
This patch reverts a workaround that was put into pre-1.0 Swift to avoid linetable entries for autoclosure functions. Nowadays autoclosures aren't emitted in separate functions, which makes this obsolete. The workaround also was no longer being tested by the test suite. rdar://89776340
1 parent c6ff96f commit 37b8391

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

lib/SIL/IR/SILLocation.cpp

-11
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,6 @@ SourceLoc SILLocation::getSourceLocForDebugging() const {
7979
if (isSILFile())
8080
return storage.sourceLoc;
8181

82-
if (auto *expr = getPrimaryASTNode().dyn_cast<Expr*>()) {
83-
// Code that has an autoclosure as location should not show up in
84-
// the line table (rdar://problem/14627460). Note also that the
85-
// closure function still has a valid DW_AT_decl_line. Depending
86-
// on how we decide to resolve rdar://problem/14627460, we may
87-
// want to use the regular getLoc instead and rather use the
88-
// column info.
89-
if (isa<AutoClosureExpr>(expr))
90-
return SourceLoc();
91-
}
92-
9382
if (hasASTNodeForDebugging())
9483
return getSourceLoc(storage.extendedASTNodeLoc->forDebugging);
9584

0 commit comments

Comments
 (0)