aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-02-05 07:01:34 +0000
committerAlexey Samsonov <samsonov@google.com>2013-02-05 07:01:34 +0000
commit933b851485a32be1d22c0b14c0814427273f770e (patch)
tree1a27743ae804052116c6bd16718b0cbf780bd9bb /tools
parente1b6b5290373073c95f6865ceaf76fa7848ecf44 (diff)
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
Diffstat (limited to 'tools')
-rw-r--r--tools/llvm-symbolizer/LLVMSymbolize.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/llvm-symbolizer/LLVMSymbolize.cpp b/tools/llvm-symbolizer/LLVMSymbolize.cpp
index 42e76f8c85..227580f465 100644
--- a/tools/llvm-symbolizer/LLVMSymbolize.cpp
+++ b/tools/llvm-symbolizer/LLVMSymbolize.cpp
@@ -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());
}