Print error messages from MemoryBuffer::getFile() in llvm-symbolizer

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174346 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Alexey Samsonov 2013-02-05 07:01:34 +00:00
parent e1b6b52903
commit 933b851485

View File

@ -181,7 +181,8 @@ static bool getObjectEndianness(const ObjectFile *Obj,
static ObjectFile *getObjectFile(const std::string &Path) {
OwningPtr<MemoryBuffer> Buff;
MemoryBuffer::getFile(Path, Buff);
if (error_code ec = MemoryBuffer::getFile(Path, Buff))
error(ec);
return ObjectFile::createObjectFile(Buff.take());
}