[PATCH] D86536: [obj2yaml] - Cleanup error reporting (remove Error.cpp/.h files)

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 25 06:58:21 PDT 2020


jhenderson accepted this revision.
jhenderson added a comment.

LGTM, with @Higuoxing's nit.



================
Comment at: llvm/tools/obj2yaml/macho2yaml.cpp:648
 
-  return errorCodeToError(obj2yaml_error::unsupported_obj_file_format);
+  llvm_unreachable("unexpected MachO file format");
 }
----------------
grimar wrote:
> Higuoxing wrote:
> > I think it should be `Mach-O`?
> I am not sure honestly. For example, llvm-readobj options has `MachO`:
> 
> ```
>   cl::opt<bool>
>   MachOSegment("macho-segment",
>                   cl::desc("Display MachO Segment command"));
> 
>   // --macho-version-min
>   cl::opt<bool>
>   MachOVersionMin("macho-version-min",
>                   cl::desc("Display MachO version min command"));
> 
>   // --macho-dysymtab
>   cl::opt<bool>
>   MachODysymtab("macho-dysymtab",
>                   cl::desc("Display MachO Dysymtab command"));
> ```
I agree with @Higuoxing - the first half-dozen search results for "MachO" actually use "Mach-O". I didn't look further. I think "Mach-O" is the canonical file format name.


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

https://reviews.llvm.org/D86536



More information about the llvm-commits mailing list