Fix warning about unused variable.

llvm-svn: 266232
This commit is contained in:
Rafael Espindola 2016-04-13 19:09:48 +00:00
parent ab14c88984
commit 3fa7352fc7
1 changed files with 2 additions and 3 deletions

View File

@ -135,10 +135,9 @@ void LinkerDriver::addFile(StringRef Path) {
Optional<MemoryBufferRef> LinkerDriver::readFile(StringRef Path) {
auto MBOrErr = MemoryBuffer::getFile(Path);
if (std::error_code EC = MBOrErr.getError()) {
error(MBOrErr, "cannot open " + Path);
error(MBOrErr, "cannot open " + Path);
if (HasError)
return None;
}
std::unique_ptr<MemoryBuffer> &MB = *MBOrErr;
MemoryBufferRef MBRef = MB->getMemBufferRef();
OwningMBs.push_back(std::move(MB)); // take MB ownership