[PATCH] D67445: [yaml2obj/ObjectYAML] - Cleanup the error reporting API, add custom errors handlers.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 13 01:17:16 PDT 2019


grimar marked an inline comment as done.
grimar added inline comments.


================
Comment at: lib/ObjectYAML/MachOEmitter.cpp:69
+  writeLoadCommands(OS);
+  writeSectionData(OS);
 }
----------------
sbc100 wrote:
> So it seems like this isn't quiet a NFC since the writers in general now always continue to try to write part of the object file even after an error occurs?   This seems slightly worse, although I can't think of case where it would be real problem.    Assuming that is the desired effect and the consequences have been considered then I'm OK with change in general since it does seem the make the core simpler.
> So it seems like this isn't quiet a NFC since the writers in general now always continue to try to write part of the object file even after an error occurs? 

For now this change is NFC, because writers never return anything rather than `Error::success()`.
If we will need to stop writing on error in future, we might add something like

```
if (HasError)
  return;
```

to any place we want.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67445/new/

https://reviews.llvm.org/D67445





More information about the llvm-commits mailing list