mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
FrontendInputs data structure redo.
- Outlaw duplicate input files, fix driver, fix tests, and add test. - Reflect that no buffer is present without a (possibly pseudo) named file. - Reflect fact that every input has a (possible pseudo) name. - Break up CompilerInstance::setup. Don't bail on dups.
This commit is contained in:
@@ -67,7 +67,7 @@ openModuleFiles(StringRef DirName, StringRef ModuleFilename,
|
||||
Scratch.clear();
|
||||
llvm::sys::path::append(Scratch, DirName, ModuleDocFilename);
|
||||
llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> ModuleDocOrErr =
|
||||
llvm::MemoryBuffer::getFile(StringRef(Scratch.data(), Scratch.size()));
|
||||
llvm::MemoryBuffer::getFile(StringRef(Scratch.data(), Scratch.size()));
|
||||
if (!ModuleDocOrErr &&
|
||||
ModuleDocOrErr.getError() != std::errc::no_such_file_or_directory) {
|
||||
return ModuleDocOrErr.getError();
|
||||
|
||||
Reference in New Issue
Block a user