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) {
61
61
#define TYPE (NAME, ID, EXTENSION, FLAGS ) \
62
62
.Case (NAME, TY_##ID)
63
63
#include " swift/Basic/FileTypes.def"
64
+ .Case (" objc-header" , TY_ClangHeader)
64
65
.Default (TY_INVALID);
65
66
}
66
67
Original file line number Diff line number Diff line change 13
13
// RUN: %check-in-clang %t/enums.WMO.h
14
14
// RUN: %check-in-clang -fno-modules -Qunused-arguments %t/enums.WMO.h -include ctypes.h -include CoreFoundation.h
15
15
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
+
16
23
// REQUIRES: objc_interop
17
24
18
25
import Foundation
@@ -23,6 +30,9 @@ import Foundation
23
30
// CHECK-LABEL: enum NegativeValues : int16_t;
24
31
// CHECK-LABEL: enum ObjcEnumNamed : NSInteger;
25
32
33
+ // CHECK-SUPPLEMENTAL: enum NegativeValues : int16_t;
34
+ // CHECK-SUPPLEMENTAL: enum ObjcEnumNamed : NSInteger;
35
+
26
36
// CHECK-LABEL: @interface AnEnumMethod
27
37
// CHECK-NEXT: - (enum NegativeValues)takeAndReturnEnum:(enum FooComments)foo SWIFT_WARN_UNUSED_RESULT;
28
38
// CHECK-NEXT: - (void)acceptPlainEnum:(enum NSMalformedEnumMissingTypedef)_;
You can’t perform that action at this time.
0 commit comments