Skip to content

Commit d44edf4

Browse files
authored
[ModuleInterface] Change swift-tools-version to swift-compiler-version (#25160)
swift-tools-version as used by SwiftPM is an actual, parsed field with semantic meaning. swift-compiler-version as used when generating module interfaces is just to record what version of the compiler generated the interface. They shouldn't have the same name.
1 parent e9d4687 commit d44edf4

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

include/swift/Frontend/ParseableInterfaceSupport.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include "llvm/Support/Regex.h"
1919

2020
#define SWIFT_INTERFACE_FORMAT_VERSION_KEY "swift-interface-format-version"
21-
#define SWIFT_TOOLS_VERSION_KEY "swift-tools-version"
21+
#define SWIFT_COMPILER_VERSION_KEY "swift-compiler-version"
2222
#define SWIFT_MODULE_FLAGS_KEY "swift-module-flags"
2323

2424
namespace swift {

lib/Frontend/ParseableInterfaceSupport.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ static void printToolVersionAndFlagsComment(raw_ostream &out,
6666
Ctx.LangOpts.EffectiveLanguageVersion);
6767
out << "// " SWIFT_INTERFACE_FORMAT_VERSION_KEY ": "
6868
<< InterfaceFormatVersion << "\n";
69-
out << "// " SWIFT_TOOLS_VERSION_KEY ": "
69+
out << "// " SWIFT_COMPILER_VERSION_KEY ": "
7070
<< ToolsVersion << "\n";
7171
out << "// " SWIFT_MODULE_FLAGS_KEY ": "
7272
<< Opts.ParseableInterfaceFlags << "\n";

test/ParseableInterface/Conformances.swiftinterface

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 4.0
1+
// swift-compiler-version: Swift 4.0
22
// swift-module-flags:
33

44
// RUN: %empty-directory(%t)

test/ParseableInterface/DefaultArgs.swiftinterface

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 4.0
1+
// swift-compiler-version: Swift 4.0
22
// swift-module-flags:
33

44
// RUN: %target-swift-frontend -emit-silgen %s | %FileCheck %s

0 commit comments

Comments
 (0)