[PATCH] D92624: [mac/lld] Add support for the LC_LINKER_OPTION load command in o files
    Jez Ng via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Dec  3 21:37:14 PST 2020
    
    
  
int3 added inline comments.
================
Comment at: lld/MachO/Driver.cpp:355
+
+void macho::parseLCLinkerOption(InputFile* f, unsigned argc, StringRef data) {
+  SmallVector<const char *, 4> argv;
----------------
would be good to have a short comment about what `LC_LINKER_OPTION` contains
================
Comment at: lld/MachO/Driver.cpp:370-371
+    fatal(Twine(args.getArgString(missingIndex)) + ": missing argument");
+  for (auto *arg : args.filtered(OPT_UNKNOWN))
+    error("ignoring unknown argument: " + arg->getAsString(args));
+
----------------
is this necessary given that we are going to error out anyway at line 382 below?
================
Comment at: lld/test/MachO/lc-linker-option.ll:21
+# RUN: not %lld %t/invalid.o -o /dev/null 2>&1 | FileCheck --check-prefix=INVALID %s
+# INVALID: -why_load is not allowed in LC_LINKER_OPTION
+
----------------
nit: the other tests generally include the "error: " prefix
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92624/new/
https://reviews.llvm.org/D92624
    
    
More information about the llvm-commits
mailing list