[lld] r178268 - [Driver] Don't open files multiple times.
Michael J. Spencer
bigcheesegs at gmail.com
Thu Mar 28 11:58:36 PDT 2013
Author: mspencer
Date: Thu Mar 28 13:58:35 2013
New Revision: 178268
URL: http://llvm.org/viewvc/llvm-project?rev=178268&view=rev
Log:
[Driver] Don't open files multiple times.
Modified:
lld/trunk/lib/Driver/LinkerInvocation.cpp
Modified: lld/trunk/lib/Driver/LinkerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/LinkerInvocation.cpp?rev=178268&r1=178267&r2=178268&view=diff
==============================================================================
--- lld/trunk/lib/Driver/LinkerInvocation.cpp (original)
+++ lld/trunk/lib/Driver/LinkerInvocation.cpp Thu Mar 28 13:58:35 2013
@@ -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;
More information about the llvm-commits
mailing list