[PATCH] D97979: [lld-macho] Check platform and version in constructor ObjFile

Vy Nguyen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 5 11:35:49 PST 2021


oontvoo added inline comments.


================
Comment at: lld/MachO/InputFiles.h:179
+template <class CommandType = llvm::MachO::load_command>
+const CommandType *findCommand(const llvm::MachO::mach_header_64 *hdr,
+                               uint32_t type) {
----------------
int3 wrote:
> nice, I like the convenient casting. But I don't think there's a need to move this function into the header
It's a templated function, so you can't put it in the cpp file.

If we put it in the cpp file, then it can only be a static local function. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97979



More information about the llvm-commits mailing list