[PATCH] D61532: implement of the parsing symbol table for xcoffobjfile and output as yaml format

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 16 01:12:31 PDT 2019


MaskRay added inline comments.


================
Comment at: llvm/tools/obj2yaml/xcoff2yaml.cpp:50
 
+std::error_code XCOFFDumper::dumpSymbols() {
+  std::vector<XCOFFYAML::Symbol> &Symbols = YAMLObj.Symbols;
----------------
DiggerLin wrote:
> MaskRay wrote:
> > You may want to use `Expected<...>` `Error` instead of `std::error_code`, then you can avoid conversion like `errorToErrorCode()`
> if the dumpSymbols return a value other than std::error_code, I can try to use Expected<T>,  what T should be in the this case?
> same situation for the function  std::error_code XCOFFDumper::dump() .
> 
> the even I have Expected<T>  XCOFFDumper::dump()  , the error information will still lose in function std::error_code xcoff2yaml(raw_ostream &Out,
>                            const object::XCOFFObjectFile &Obj) {
> and static std::error_code dumpObject(const ObjectFile &Obj) {
Return `Error`.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D61532





More information about the llvm-commits mailing list