File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ ID file_types::lookupTypeForName(StringRef Name) {
6161#define TYPE (NAME, ID, EXTENSION, FLAGS ) \
6262 .Case (NAME, TY_##ID)
6363#include " swift/Basic/FileTypes.def"
64+ .Case (" objc-header" , TY_ClangHeader)
6465 .Default (TY_INVALID);
6566}
6667
Original file line number Diff line number Diff line change 1313// RUN: %check-in-clang %t/enums.WMO.h
1414// RUN: %check-in-clang -fno-modules -Qunused-arguments %t/enums.WMO.h -include ctypes.h -include CoreFoundation.h
1515
16+ // Ensure that providing the output header path via the supplementary output
17+ // file map also works.
18+
19+ // RUN: echo "{\"%s\": {\"objc-header\": \"%t/enums-supplemental.h\"}}" > %t-output-file-map.json
20+ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -parse-as-library %s -enable-source-import -typecheck -supplementary-output-file-map %t-output-file-map.json -import-objc-header %S/Inputs/enums.h -disable-objc-attr-requires-foundation-module
21+ // RUN: %FileCheck -check-prefix CHECK-SUPPLEMENTAL %s < %t/enums-supplemental.h
22+
1623// REQUIRES: objc_interop
1724
1825import Foundation
@@ -23,6 +30,9 @@ import Foundation
2330// CHECK-LABEL: enum NegativeValues : int16_t;
2431// CHECK-LABEL: enum ObjcEnumNamed : NSInteger;
2532
33+ // CHECK-SUPPLEMENTAL: enum NegativeValues : int16_t;
34+ // CHECK-SUPPLEMENTAL: enum ObjcEnumNamed : NSInteger;
35+
2636// CHECK-LABEL: @interface AnEnumMethod
2737// CHECK-NEXT: - (enum NegativeValues)takeAndReturnEnum:(enum FooComments)foo SWIFT_WARN_UNUSED_RESULT;
2838// CHECK-NEXT: - (void)acceptPlainEnum:(enum NSMalformedEnumMissingTypedef)_;
You can’t perform that action at this time.
0 commit comments