Skip to content

Commit 8e2a033

Browse files
authored
Merge pull request #77274 from xedin/attempt-to-fix-asan-failure-in-printToolandFlags
[ModuleInterface] NFC: Write `-interface-compiler-version` directly i…
2 parents cfb43d0 + 9f7f999 commit 8e2a033

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

lib/Frontend/ModuleInterfaceSupport.cpp

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,16 +124,14 @@ static void printToolVersionAndFlagsComment(raw_ostream &out,
124124
!Opts.PackageFlags.IgnorableFlags.empty())
125125
ignorableFlags.push_back(Opts.PackageFlags.IgnorableFlags);
126126

127-
ignorableFlags.push_back("-interface-compiler-version");
128-
ignorableFlags.push_back(version::getCompilerVersion());
127+
out << "// " SWIFT_MODULE_FLAGS_IGNORABLE_KEY ": ";
129128

130-
if (!ignorableFlags.empty()) {
131-
out << "// " SWIFT_MODULE_FLAGS_IGNORABLE_KEY ": ";
132-
llvm::interleave(
133-
ignorableFlags, [&out](StringRef str) { out << str; },
134-
[&out] { out << " "; });
135-
out << "\n";
136-
}
129+
llvm::interleave(
130+
ignorableFlags, [&out](StringRef str) { out << str; },
131+
[&out] { out << " "; });
132+
133+
out << " -interface-compiler-version " << version::getCompilerVersion();
134+
out << "\n";
137135
}
138136
}
139137

0 commit comments

Comments
 (0)