Skip to content

Commit 7870afb

Browse files
authored
TDBGen: amend file type for SwiftAPIDescriptor (#69150)
This is to match the one SwiftDriver expects, so that we generate API descriptors when they are specified in supplementary output files. Addresses rdar://116809713
1 parent bbd15fc commit 7870afb

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

include/swift/Basic/FileTypes.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ TYPE("pch", PCH, "pch", "")
9898
TYPE("none", Nothing, "", "")
9999

100100
TYPE("abi-baseline-json", SwiftABIDescriptor, "abi.json", "")
101-
TYPE("api-json", SwiftAPIDescriptor, "", "")
101+
TYPE("api-descriptor-json", SwiftAPIDescriptor, "", "")
102102
TYPE("fixit", SwiftFixIt, "", "")
103103
TYPE("module-semantic-info", ModuleSemanticInfo, "", "")
104104
TYPE("cached-diagnostics", CachedDiagnostics, "", "")
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: echo 'print("Hello, World!")' >%t/main.swift
3+
// RUN: cd %t
4+
5+
// RUN: %target-swift-frontend -emit-module -emit-api-descriptor-path %t/main.api.json %t/main.swift
6+
// RUN: test -f %t/main.api.json
7+
8+
// RUN: echo '"%/t/main.swift": { api-descriptor-json: "%/t/foo.api.json" }' > %/t/filemap.yaml
9+
// RUN: %target-swift-frontend -emit-module -supplementary-output-file-map %/t/filemap.yaml %/t/main.swift
10+
// RUN: test -f %t/foo.api.json

0 commit comments

Comments
 (0)