Skip to content

Commit c073797

Browse files
rmazfacebook-github-bot
authored andcommitted
fix Swift compiler assert
Summary: Asserts toolchains are crashing on compiling this header: ``` (struct_type decl="ObjectiveC.(file).ObjCBool") (type_alias_type decl="ExecuTorch.(file).BoolValue@buck-out/v2/gen/fbsource/b60f3548330a4950/xplat/executorch/extension/apple/__ExecuTorch__/ExecuTorch_symlink_tree/ExecuTorch/ExecuTorchValue.h:37:14" (underlying=struct_type decl="Swift.(file).Bool")) swift-frontend: /data/sandcastle/boxes/trunk-grepo-llvm-c2-grepo/external/swift/lib/ClangImporter/ImportType.cpp:928: ImportResult (anonymous namespace)::SwiftTypeConverter::VisitTypedefType(const clang::TypedefType *): Assertion `underlyingResult.AbstractType->isEqual(mappedType) && "typedef without special typedef kind was mapped " "differently from its underlying type?"' failed. ``` Remove `NS_SWIFT_BRIDGED_TYPEDEF` to mitigate. Differential Revision: D74737507
1 parent e1738cc commit c073797

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

extension/apple/ExecuTorch/Exported/ExecuTorchValue.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ typedef NSNumber *ExecuTorchScalarValue
3434
NS_SWIFT_BRIDGED_TYPEDEF NS_SWIFT_NAME(ScalarValue);
3535
typedef NSString *ExecuTorchStringValue
3636
NS_SWIFT_BRIDGED_TYPEDEF NS_SWIFT_NAME(StringValue);
37-
typedef BOOL ExecuTorchBooleanValue
38-
NS_SWIFT_BRIDGED_TYPEDEF NS_SWIFT_NAME(BoolValue);
37+
typedef BOOL ExecuTorchBooleanValue NS_SWIFT_NAME(BoolValue);
3938
typedef NSInteger ExecuTorchIntegerValue
4039
NS_SWIFT_BRIDGED_TYPEDEF NS_SWIFT_NAME(IntegerValue);
4140
typedef double ExecuTorchDoubleValue

0 commit comments

Comments
 (0)