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

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 16 11:24:09 PDT 2019


smeenai added a comment.

In D63735#1587999 <https://reviews.llvm.org/D63735#1587999>, @steven_wu wrote:

> This adds an unnecessary static initializer to the MachOObject.cpp. Can you move the array of validArchs into filescope? You can declare it in getValidArchs() and use getValidArchs() in isValidArchs.


I was hoping that `std::array` wouldn't necessitate a static initializer, since it's just supposed to be a zero-cost wrapper around a C array.

Could you clarify what you mean by file scope? It's already a `static const` inside MachOObjectFile.cpp; do you mean moving the declaration into `getValidArchs()`?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D63735





More information about the llvm-commits mailing list