mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 02:52:53 +02:00
Correct handling invalid filename in llvm-symbolizer
llvm-svn: 183102
This commit is contained in:
parent
77c6916919
commit
a4e889ae51
@ -23,3 +23,6 @@ CHECK-NEXT: dwarfdump-inl-test.cc:
|
|||||||
|
|
||||||
CHECK: _Z3do1v
|
CHECK: _Z3do1v
|
||||||
CHECK-NEXT: dwarfdump-test3-decl.h:7
|
CHECK-NEXT: dwarfdump-test3-decl.h:7
|
||||||
|
|
||||||
|
RUN: echo "unexisting-file 0x1234" > %t.input2
|
||||||
|
RUN: llvm-symbolizer < %t.input2
|
||||||
|
@ -200,8 +200,8 @@ static bool getObjectEndianness(const ObjectFile *Obj, bool &IsLittleEndian) {
|
|||||||
|
|
||||||
static ObjectFile *getObjectFile(const std::string &Path) {
|
static ObjectFile *getObjectFile(const std::string &Path) {
|
||||||
OwningPtr<MemoryBuffer> Buff;
|
OwningPtr<MemoryBuffer> Buff;
|
||||||
if (error_code ec = MemoryBuffer::getFile(Path, Buff))
|
if (error(MemoryBuffer::getFile(Path, Buff)))
|
||||||
error(ec);
|
return 0;
|
||||||
return ObjectFile::createObjectFile(Buff.take());
|
return ObjectFile::createObjectFile(Buff.take());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user