mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[next] Convert const char * fields to StringRef
llvm/llvm-project d0262c2394f46bb7da2a75529413d625c70908e5 added a new default bool param to the two constructors in `SmallVectorMemoryBuffer`. Since `options.OutputPath` is a `const char *` and that can be promoted to a `bool`, the constructor being called was changed to the first constructor (with a default buffer name) - promotion is preferred over conversion. Convert the various output paths to a `StringRef` - all their uses converted to `StringRef` anyway. Also specify the default parameter in order to maintain the old behaviour, which didn't require a null terminator.
This commit is contained in:
@@ -273,7 +273,7 @@ bool ModuleInterfaceBuilder::buildSwiftModuleInternal(
|
||||
// optimization pipeline.
|
||||
SerializationOptions SerializationOpts;
|
||||
std::string OutPathStr = OutPath.str();
|
||||
SerializationOpts.OutputPath = OutPathStr.c_str();
|
||||
SerializationOpts.OutputPath = OutPathStr;
|
||||
SerializationOpts.ModuleLinkName = FEOpts.ModuleLinkName;
|
||||
SerializationOpts.AutolinkForceLoad =
|
||||
!subInvocation.getIRGenOptions().ForceLoadSymbolName.empty();
|
||||
|
||||
Reference in New Issue
Block a user