aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm-symbolizer
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-06-03 14:12:39 +0000
committerAlexey Samsonov <samsonov@google.com>2013-06-03 14:12:39 +0000
commit625b109916a6c8eaf77dd56cdce74aaea08ee731 (patch)
tree8a3eeaff1891df7b541a57e80820ed0d6c43be6c /tools/llvm-symbolizer
parentabff3aa8217049cffe6da77c91e510c66b8c2313 (diff)
downloadexternal_llvm-625b109916a6c8eaf77dd56cdce74aaea08ee731.zip
external_llvm-625b109916a6c8eaf77dd56cdce74aaea08ee731.tar.gz
external_llvm-625b109916a6c8eaf77dd56cdce74aaea08ee731.tar.bz2
Correct handling invalid filename in llvm-symbolizer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183102 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-symbolizer')
-rw-r--r--tools/llvm-symbolizer/LLVMSymbolize.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/llvm-symbolizer/LLVMSymbolize.cpp b/tools/llvm-symbolizer/LLVMSymbolize.cpp
index 29d91a0..2596a4e 100644
--- a/tools/llvm-symbolizer/LLVMSymbolize.cpp
+++ b/tools/llvm-symbolizer/LLVMSymbolize.cpp
@@ -200,8 +200,8 @@ static bool getObjectEndianness(const ObjectFile *Obj, bool &IsLittleEndian) {
static ObjectFile *getObjectFile(const std::string &Path) {
OwningPtr<MemoryBuffer> Buff;
- if (error_code ec = MemoryBuffer::getFile(Path, Buff))
- error(ec);
+ if (error(MemoryBuffer::getFile(Path, Buff)))
+ return 0;
return ObjectFile::createObjectFile(Buff.take());
}