mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Frontend] Switch -interface-compiler-version to Version
`SWIFT_COMPILER_VERSION` has more than 4 components and it's easier to use `Version` API over `VersionTuple` as well.
This commit is contained in:
@@ -1142,11 +1142,16 @@ void Serializer::writeHeader() {
|
||||
PublicModuleName.emit(ScratchRecord, publicModuleName.str());
|
||||
}
|
||||
|
||||
llvm::VersionTuple compilerVersion =
|
||||
M->getSwiftInterfaceCompilerVersion();
|
||||
if (compilerVersion) {
|
||||
version::Version compilerVersion = M->getSwiftInterfaceCompilerVersion();
|
||||
if (!compilerVersion.empty()) {
|
||||
options_block::SwiftInterfaceCompilerVersionLayout Version(Out);
|
||||
Version.emit(ScratchRecord, compilerVersion.getAsString());
|
||||
|
||||
SmallString<32> versionBuf;
|
||||
llvm::raw_svector_ostream OS(versionBuf);
|
||||
|
||||
OS << compilerVersion;
|
||||
|
||||
Version.emit(ScratchRecord, OS.str());
|
||||
}
|
||||
|
||||
if (M->isConcurrencyChecked()) {
|
||||
|
||||
Reference in New Issue
Block a user