mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[ModuleInterface] NFC: Write -interface-compiler-version directly into the output
Instead of storing it in an ignorable attributes, let's emit the option directly into the output stream to apeace ASAN checker.
This commit is contained in:
@@ -124,16 +124,14 @@ static void printToolVersionAndFlagsComment(raw_ostream &out,
|
||||
!Opts.PackageFlags.IgnorableFlags.empty())
|
||||
ignorableFlags.push_back(Opts.PackageFlags.IgnorableFlags);
|
||||
|
||||
ignorableFlags.push_back("-interface-compiler-version");
|
||||
ignorableFlags.push_back(version::getCompilerVersion());
|
||||
out << "// " SWIFT_MODULE_FLAGS_IGNORABLE_KEY ": ";
|
||||
|
||||
if (!ignorableFlags.empty()) {
|
||||
out << "// " SWIFT_MODULE_FLAGS_IGNORABLE_KEY ": ";
|
||||
llvm::interleave(
|
||||
ignorableFlags, [&out](StringRef str) { out << str; },
|
||||
[&out] { out << " "; });
|
||||
out << "\n";
|
||||
}
|
||||
llvm::interleave(
|
||||
ignorableFlags, [&out](StringRef str) { out << str; },
|
||||
[&out] { out << " "; });
|
||||
|
||||
out << " -interface-compiler-version " << version::getCompilerVersion();
|
||||
out << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user