Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/swift/Frontend/Frontend.h
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ class CompilerInvocation {
/// serialization options.
///
/// FIXME: The \p module parameter supports the
/// \c SerializeOptionsForDebugging hack.
/// \c SerializeOptions hack.
SerializationOptions
computeSerializationOptions(const SupplementaryOutputPaths &outs,
const ModuleDecl *module) const;
Expand All @@ -406,7 +406,7 @@ class CompilerInvocation {
///
/// FIXME: The scope of this computation should be limited entirely to
/// PrintAsObjC. Unfortunately, it has been co-opted to support the
/// \c SerializeOptionsForDebugging hack. Once this information can be
/// \c SerializeOptions hack. Once this information can be
/// transferred from module files to the dSYMs, remove this.
bool isModuleExternallyConsumed(const ModuleDecl *mod) const;
};
Expand Down
6 changes: 3 additions & 3 deletions include/swift/Frontend/FrontendOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ class FrontendOptions {
bool IgnoreSwiftSourceInfo = false;

/// When true, emitted module files will always contain options for the
/// debugger to use. When unset, the options will only be present if the
/// module appears to not be a public module.
Optional<bool> SerializeOptionsForDebugging;
/// debugger and LTO plugin to use. When unset, the options will only be
/// present if the module appears to not be a public module.
Optional<bool> SerializeOptions;

/// When true, check if all required SwiftOnoneSupport symbols are present in
/// the module.
Expand Down
2 changes: 1 addition & 1 deletion include/swift/Serialization/SerializationOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ namespace swift {

bool AutolinkForceLoad = false;
bool SerializeAllSIL = false;
bool SerializeOptionsForDebugging = false;
bool SerializeOptions = false;
bool IsSIB = false;
};

Expand Down
2 changes: 1 addition & 1 deletion lib/Frontend/ArgsToFrontendOptionsConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ bool ArgsToFrontendOptionsConverter::convert(

if (const Arg *A = Args.getLastArg(OPT_serialize_debugging_options,
OPT_no_serialize_debugging_options)) {
Opts.SerializeOptionsForDebugging =
Opts.SerializeOptions =
A->getOption().matches(OPT_serialize_debugging_options);
}

Expand Down
5 changes: 2 additions & 3 deletions lib/Frontend/Frontend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,8 @@ SerializationOptions CompilerInvocation::computeSerializationOptions(
// Options contain information about the developer's computer,
// so only serialize them if the module isn't going to be shipped to
// the public.
serializationOpts.SerializeOptionsForDebugging =
opts.SerializeOptionsForDebugging.getValueOr(
!isModuleExternallyConsumed(module));
serializationOpts.SerializeOptions =
opts.SerializeOptions.getValueOr(!isModuleExternallyConsumed(module));

return serializationOpts;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/Serialization/Serialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ void Serializer::writeHeader(const SerializationOptions &options) {
Strategy.emit(ScratchRecord, unsigned(M->getResilienceStrategy()));
}

if (options.SerializeOptionsForDebugging) {
if (options.SerializeOptions) {
options_block::SDKPathLayout SDKPath(Out);
options_block::XCCLayout XCC(Out);

Expand Down Expand Up @@ -981,7 +981,7 @@ void Serializer::writeInputBlock(const SerializationOptions &options) {
input_block::DependencyDirectoryLayout DependencyDirectory(Out);
input_block::ModuleInterfaceLayout ModuleInterface(Out);

if (options.SerializeOptionsForDebugging) {
if (options.SerializeOptions) {
const SearchPathOptions &searchPathOpts = M->getASTContext().SearchPathOpts;
// Put the framework search paths first so that they'll be preferred upon
// deserialization.
Expand Down