mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-13 23:18:58 +00:00
[llvm-readobj] report_error() does not return, so we can simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254868 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9eb92586b2
commit
3aa1034794
@ -296,10 +296,8 @@ static std::error_code createDumper(const ObjectFile *Obj, StreamWriter &Writer,
|
||||
static void dumpObject(const ObjectFile *Obj) {
|
||||
StreamWriter Writer(outs());
|
||||
std::unique_ptr<ObjDumper> Dumper;
|
||||
if (std::error_code EC = createDumper(Obj, Writer, Dumper)) {
|
||||
if (std::error_code EC = createDumper(Obj, Writer, Dumper))
|
||||
reportError(Obj->getFileName(), EC);
|
||||
return;
|
||||
}
|
||||
|
||||
outs() << '\n';
|
||||
outs() << "File: " << Obj->getFileName() << "\n";
|
||||
@ -414,10 +412,8 @@ static void dumpInput(StringRef File) {
|
||||
|
||||
// Attempt to open the binary.
|
||||
ErrorOr<OwningBinary<Binary>> BinaryOrErr = createBinary(File);
|
||||
if (std::error_code EC = BinaryOrErr.getError()) {
|
||||
if (std::error_code EC = BinaryOrErr.getError())
|
||||
reportError(File, EC);
|
||||
return;
|
||||
}
|
||||
Binary &Binary = *BinaryOrErr.get().getBinary();
|
||||
|
||||
if (Archive *Arc = dyn_cast<Archive>(&Binary))
|
||||
|
Loading…
Reference in New Issue
Block a user