Skip to content

Commit b7e5137

Browse files
authored
Merge pull request #18586 from huonw/tbd-abi-version
[TBDGen] Swift ABI Version can be a constant, not a magic number.
2 parents 8c5ff31 + 942320f commit b7e5137

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

include/swift/TBDGen/TBDGen.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ namespace swift {
2323
class FileUnit;
2424
class ModuleDecl;
2525

26+
/// \brief The current ABI version of Swift, as tapi labels it.
27+
const uint8_t TAPI_SWIFT_ABI_VERSION = 5;
28+
2629
/// \brief Options for controlling the exact set of symbols included in the TBD
2730
/// output.
2831
struct TBDGenOptions {

lib/TBDGen/TBDGen.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,7 @@ static void enumeratePublicSymbolsAndWrite(ModuleDecl *M, FileUnit *singleFile,
418418
file.setInstallName(opts.InstallName);
419419
// FIXME: proper version
420420
file.setCurrentVersion(tapi::internal::PackedVersion(1, 0, 0));
421-
// FIXME: pull this out of moduleformat?
422-
file.setSwiftABIVersion(5);
421+
file.setSwiftABIVersion(TAPI_SWIFT_ABI_VERSION);
423422
file.setPlatform(tapi::internal::mapToSinglePlatform(target));
424423
auto arch = tapi::internal::getArchType(target.getArchName());
425424
file.setArch(arch);

0 commit comments

Comments
 (0)