Skip to content

Commit 942320f

Browse files
committed
[TBDGen] Swift ABI Version can be a constant, not a magic number.
1 parent e23c681 commit 942320f

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
@@ -419,8 +419,7 @@ static void enumeratePublicSymbolsAndWrite(ModuleDecl *M, FileUnit *singleFile,
419419
file.setInstallName(opts.InstallName);
420420
// FIXME: proper version
421421
file.setCurrentVersion(tapi::internal::PackedVersion(1, 0, 0));
422-
// FIXME: pull this out of moduleformat?
423-
file.setSwiftABIVersion(5);
422+
file.setSwiftABIVersion(TAPI_SWIFT_ABI_VERSION);
424423
file.setPlatform(tapi::internal::mapToSinglePlatform(target));
425424
auto arch = tapi::internal::getArchType(target.getArchName());
426425
file.setArch(arch);

0 commit comments

Comments
 (0)