[PATCH] D63735: [MachOObjectFile]Added Valid Architecture Function

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 27 09:41:33 PDT 2019


smeenai added inline comments.


================
Comment at: llvm/include/llvm/Object/MachO.h:574
   static bool isValidArch(StringRef ArchFlag);
+  static ArrayRef<StringRef> getValidArchs();
   static Triple getHostArch();
----------------
smeenai wrote:
> mtrent wrote:
> > Super duper nitty nit: consider "getKnownArchs" instead of "getValidArchs". I'm wrestling with the idea of what makes an arch "valid", considering the list supported here is only the subset of archs that llvm knows about. E.g., is m68k an invalid Mach-O file? And so on. I readily concede this is the most pedantic of concerns.
> > 
> > I can see how an argument can be invalid, and so have no concerns over llvm-lipo's validateArchitectureName function name.
> We went with "valid" because that's the terminology the existing `isValidArch` was using. Should we rename that to `isKnownArch` as well?
Ping @mtrent on the renaming question :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63735





More information about the llvm-commits mailing list