Skip to content

Commit 0efa7f9

Browse files
committed
[cxx-interop][SwiftCompilerSources] Do not use SWIFT_IMPORT_UNSAFE with SILDebugLocation
`SWIFT_IMPORT_UNSAFE` is an escape hatch that can be used to make the Swift compiler ignore its usual safety heuristics for C++ types. `SILDebugLocation` is better described as a self-contained Swift type. Similar to 35263ef.
1 parent 6c92f3f commit 0efa7f9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

include/swift/SIL/SILLocation.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,6 @@ class SILDebugLocation {
766766
bool isAutoGenerated() const { return location.isAutoGenerated(); }
767767
operator bool() const { return bool(location) && debugScope; }
768768

769-
SWIFT_IMPORT_UNSAFE
770769
SILDebugLocation getAutogeneratedLocation() const {
771770
SILDebugLocation autoGenLoc(RegularLocation::getAutoGeneratedLocation(), getScope());
772771
return autoGenLoc;
@@ -784,7 +783,7 @@ class SILDebugLocation {
784783
static SILDebugLocation getArtificialUnreachableLocation() {
785784
return SILDebugLocation(ArtificialUnreachableLocation(), nullptr);
786785
}
787-
};
786+
} SWIFT_SELF_CONTAINED;
788787

789788
} // end swift namespace
790789

0 commit comments

Comments
 (0)