mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Frontend: fix after #27464
try to invoke a std::unique_ptr<>'s copy constructor, which is deleted. Either move the unique_ptr or pass along a nullptr. This should repair the Windows build.
This commit is contained in:
@@ -511,11 +511,11 @@ Optional<CompilerInstance::ModuleBuffers> CompilerInstance::getInputBuffersIfPre
|
||||
if (!serialization::isSerializedAST((*inputFileOrErr)->getBuffer()))
|
||||
return ModuleBuffers(std::move(*inputFileOrErr));
|
||||
|
||||
return ModuleBuffers(
|
||||
std::move(*inputFileOrErr),
|
||||
openModuleDoc(input).getValueOr(nullptr),
|
||||
openModuleSourceInfo(input).getValueOr(nullptr)
|
||||
);
|
||||
auto swiftdoc = openModuleDoc(input);
|
||||
auto sourceinfo = openModuleSourceInfo(input);
|
||||
return ModuleBuffers(std::move(*inputFileOrErr),
|
||||
swiftdoc.hasValue() ? std::move(swiftdoc.getValue()) : nullptr,
|
||||
sourceinfo.hasValue() ? std::move(sourceinfo.getValue()) : nullptr);
|
||||
}
|
||||
|
||||
Optional<std::unique_ptr<llvm::MemoryBuffer>>
|
||||
|
||||
Reference in New Issue
Block a user