forked from OSchip/llvm-project
[Driver] Don't open files multiple times.
llvm-svn: 178268
This commit is contained in:
parent
e00e6f23d3
commit
1067ff61e6
|
@ -66,8 +66,7 @@ void LinkerInvocation::operator()() {
|
|||
}
|
||||
|
||||
std::vector<std::unique_ptr<File>> files;
|
||||
if (llvm::error_code ec = reader->readFile(
|
||||
buffer->getBufferIdentifier(), files)) {
|
||||
if (llvm::error_code ec = reader->parseFile(std::unique_ptr<MemoryBuffer>(MemoryBuffer::getMemBuffer(buffer->getBuffer(), buffer->getBufferIdentifier())), files)) {
|
||||
llvm::errs() << "Failed to read file: " << input.getPath() << ": "
|
||||
<< ec.message() << "\n";
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue