Skip to content

Commit 58625d2

Browse files
authored
Merge pull request swiftlang#35459 from davezarzycki/pr35459
[stdlib] NFC: Fix three unused function warnings
2 parents e5a6de6 + df9b2d0 commit 58625d2

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

stdlib/public/runtime/Casting.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ swift_dynamicCastMetatypeUnconditionalImpl(const Metadata *sourceType,
885885
/******************************** Existentials ********************************/
886886
/******************************************************************************/
887887

888-
888+
#if SWIFT_OBJC_INTEROP
889889
static void unwrapExistential(OpaqueValue *src,
890890
const ExistentialTypeMetadata *srcType,
891891
OpaqueValue *&srcValue,
@@ -932,6 +932,7 @@ static void unwrapExistential(OpaqueValue *src,
932932
}
933933
}
934934
}
935+
#endif
935936

936937
/******************************************************************************/
937938
/****************************** Main Entrypoint *******************************/

stdlib/public/runtime/Float16Support.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -119,20 +119,6 @@ SWIFT_RUNTIME_EXPORT unsigned short __gnu_f2h_ieee(float f) {
119119

120120
#endif
121121

122-
static unsigned long long toEncoding(double d) {
123-
unsigned long long e;
124-
static_assert(sizeof e == sizeof d, "double and ull must have the same size");
125-
__builtin_memcpy(&e, &d, sizeof d);
126-
return e;
127-
}
128-
129-
static double fromEncoding(unsigned long long e) {
130-
double d;
131-
static_assert(sizeof d == sizeof e, "double and ull must have the same size");
132-
__builtin_memcpy(&d, &e, sizeof e);
133-
return d;
134-
}
135-
136122
// Input in xmm0, result in di. We can get that calling convention in C++
137123
// by returning uint16 instead of Float16, which we don't have (or else
138124
// we wouldn't need this function).

0 commit comments

Comments
 (0)