[PATCH] D78342: [lld] Add archive file support to Mach-O backend

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 13 15:52:07 PDT 2020


int3 added inline comments.


================
Comment at: lld/MachO/Driver.cpp:113
+    if (!file->isEmpty() && !file->hasSymbolTable()) {
+      error(mbref.getBufferIdentifier() +
+            ": archive has no index; run ranlib to add one");
----------------
Ktwu wrote:
> int3 wrote:
> > s/mbref.getBufferIdentifier()/file->getName()/
> > 
> > nit: drop `if` curly braces
> I copied this from the wasm driver :o
> 
> If we want to follow the ELF driver, I should use path instead....
`file->getName()` is just a wrapper around `mbref.getBufferIdentifier()`. Just suggesting it since it saves a few characters :p but not a big deal either way


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78342





More information about the llvm-commits mailing list