From c4a2f261a72e3eefb9f0d24716134cff83044a56 Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Tue, 5 Feb 2013 07:01:34 +0000 Subject: [PATCH] Print error messages from MemoryBuffer::getFile() in llvm-symbolizer llvm-svn: 174346 --- tools/llvm-symbolizer/LLVMSymbolize.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/llvm-symbolizer/LLVMSymbolize.cpp b/tools/llvm-symbolizer/LLVMSymbolize.cpp index 42e76f8c859..227580f4659 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 Buff; - MemoryBuffer::getFile(Path, Buff); + if (error_code ec = MemoryBuffer::getFile(Path, Buff)) + error(ec); return ObjectFile::createObjectFile(Buff.take()); }