Transfer the buffer for the module documentation file only when it exists.

More fallout from LLVM r212408.

Swift SVN r19613
This commit is contained in:
Doug Gregor
2014-07-07 15:31:55 +00:00
parent b20abdfcbe
commit a885d1b3bd
2 changed files with 4 additions and 2 deletions

View File

@@ -61,7 +61,8 @@ openModuleFiles(StringRef DirName, StringRef ModuleFilename,
return ModuleDocOrErr.getError();
}
ModuleBuffer = std::move(ModuleOrErr.get());
ModuleDocBuffer = std::move(ModuleDocOrErr.get());
if (ModuleDocOrErr)
ModuleDocBuffer = std::move(ModuleDocOrErr.get());
return std::error_code();
}