diff --git a/extension/apple/ExecuTorch/Exported/ExecuTorchLog.h b/extension/apple/ExecuTorch/Exported/ExecuTorchLog.h index a71591c7ba7..17d9f339618 100644 --- a/extension/apple/ExecuTorch/Exported/ExecuTorchLog.h +++ b/extension/apple/ExecuTorch/Exported/ExecuTorchLog.h @@ -49,6 +49,7 @@ NS_SWIFT_NAME(LogSink) * A singleton class for managing log sinks and dispatching log messages. */ NS_SWIFT_NAME(Log) +__attribute__((objc_subclassing_restricted)) @interface ExecuTorchLog : NSObject /// The shared singleton log instance. diff --git a/extension/apple/ExecuTorch/Exported/ExecuTorchModule.h b/extension/apple/ExecuTorch/Exported/ExecuTorchModule.h index 9cc1b71249d..cda9a914bc3 100644 --- a/extension/apple/ExecuTorch/Exported/ExecuTorchModule.h +++ b/extension/apple/ExecuTorch/Exported/ExecuTorchModule.h @@ -16,6 +16,7 @@ NS_ASSUME_NONNULL_BEGIN * and its debug name. */ NS_SWIFT_NAME(TensorMetadata) +__attribute__((objc_subclassing_restricted)) @interface ExecuTorchTensorMetadata : NSObject /** The size of each dimension. */ @@ -46,6 +47,7 @@ NS_SWIFT_NAME(TensorMetadata) * per-tensor metadata, buffer sizes, backends, and instruction count. */ NS_SWIFT_NAME(MethodMetadata) +__attribute__((objc_subclassing_restricted)) @interface ExecuTorchMethodMetadata : NSObject /** The method’s name. */