Skip to content

Commit 0b25742

Browse files
committed
[SIL] Remove SILDeclRef::isAnyThunk
This perfectly duplicates the logic in `SILDeclRef::isThunk`.
1 parent c9d96bc commit 0b25742

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

include/swift/SIL/SILDeclRef.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,9 +483,6 @@ struct SILDeclRef {
483483
return result;
484484
}
485485

486-
/// True is the decl ref references any kind of thunk.
487-
bool isAnyThunk() const;
488-
489486
/// True if the decl ref references a thunk from a natively foreign
490487
/// declaration to Swift calling convention.
491488
bool isForeignToNativeThunk() const;

lib/SIL/IR/SILDeclRef.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -933,11 +933,6 @@ bool SILDeclRef::isBackDeployed() const {
933933
return false;
934934
}
935935

936-
bool SILDeclRef::isAnyThunk() const {
937-
return isForeignToNativeThunk() || isNativeToForeignThunk() ||
938-
isDistributedThunk() || isBackDeploymentThunk();
939-
}
940-
941936
bool SILDeclRef::isForeignToNativeThunk() const {
942937
// If this isn't a native entry-point, it's not a foreign-to-native thunk.
943938
if (isForeign)
@@ -1101,7 +1096,7 @@ std::string SILDeclRef::mangle(ManglingKind MKind) const {
11011096
// Use the SILGen name only for the original non-thunked, non-curried entry
11021097
// point.
11031098
if (auto NameA = getDecl()->getAttrs().getAttribute<SILGenNameAttr>())
1104-
if (!NameA->Name.empty() && !isAnyThunk()) {
1099+
if (!NameA->Name.empty() && !isThunk()) {
11051100
return NameA->Name.str();
11061101
}
11071102

0 commit comments

Comments
 (0)