Skip to content

Commit 3709e1f

Browse files
committed
runtime: remove unused variables from the non-ObjC SwiftError
1 parent 990350e commit 3709e1f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

stdlib/public/runtime/ErrorObject.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ struct SwiftError : SwiftErrorHeader {
7878
/// This member is only available for native Swift errors.
7979
const WitnessTable *errorConformance;
8080

81+
#if SWIFT_OBJC_INTEROP
8182
/// The base type that introduces the `Hashable` conformance.
8283
/// This member is only available for native Swift errors.
8384
/// This member is lazily-initialized.
@@ -89,6 +90,7 @@ struct SwiftError : SwiftErrorHeader {
8990
/// This member is lazily-initialized.
9091
/// Instead of using it directly, call `getHashableConformance()`.
9192
mutable std::atomic<const hashable_support::HashableWitnessTable *> hashableConformance;
93+
#endif
9294

9395
/// Get a pointer to the value contained inside the indirectly-referenced
9496
/// box reference.
@@ -143,13 +145,15 @@ struct SwiftError : SwiftErrorHeader {
143145
const WitnessTable *getErrorConformance() const { return errorConformance; }
144146
#endif
145147

148+
#if SWIFT_OBJC_INTEROP
146149
/// Get the base type that conforms to `Hashable`.
147150
/// Returns NULL if the type does not conform.
148151
const Metadata *getHashableBaseType() const;
149152

150153
/// Get the `Hashable` protocol witness table for the contained type.
151154
/// Returns NULL if the type does not conform.
152155
const hashable_support::HashableWitnessTable *getHashableConformance() const;
156+
#endif
153157

154158
// Don't copy or move, please.
155159
SwiftError(const SwiftError &) = delete;

0 commit comments

Comments
 (0)