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
This commit is contained in:
Eric Miotto
2023-10-12 12:44:06 -07:00
committed by GitHub
parent bbd15fce69
commit 7870afb78a
2 changed files with 11 additions and 1 deletions

View File

@@ -98,7 +98,7 @@ TYPE("pch", PCH, "pch", "")
TYPE("none", Nothing, "", "")
TYPE("abi-baseline-json", SwiftABIDescriptor, "abi.json", "")
TYPE("api-json", SwiftAPIDescriptor, "", "")
TYPE("api-descriptor-json", SwiftAPIDescriptor, "", "")
TYPE("fixit", SwiftFixIt, "", "")
TYPE("module-semantic-info", ModuleSemanticInfo, "", "")
TYPE("cached-diagnostics", CachedDiagnostics, "", "")

View File

@@ -0,0 +1,10 @@
// RUN: %empty-directory(%t)
// RUN: echo 'print("Hello, World!")' >%t/main.swift
// RUN: cd %t
// RUN: %target-swift-frontend -emit-module -emit-api-descriptor-path %t/main.api.json %t/main.swift
// RUN: test -f %t/main.api.json
// RUN: echo '"%/t/main.swift": { api-descriptor-json: "%/t/foo.api.json" }' > %/t/filemap.yaml
// RUN: %target-swift-frontend -emit-module -supplementary-output-file-map %/t/filemap.yaml %/t/main.swift
// RUN: test -f %t/foo.api.json