[PATCH] D113075: [lld-macho] Use separate tablegen file for LC_LINKER_OPTION

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 4 11:31:55 PDT 2021


int3 added inline comments.


================
Comment at: lld/MachO/DriverUtils.cpp:54
 
+namespace LCLinkerOptInfo {
+// Create prefix string literals used in LCLinkerOptions.td
----------------
keith wrote:
> I assume there is another, better, way for me to define 2 OptTables in the same file, I would appreciate pointers!
idk if there are more elegant ways of working with OptTables, but I was wondering if it would be simpler to not use an OptTable altogether. Given that there are only two unique prefixes that we need to check for, we could do it by hand -- something like `if (s.startswith("-l")) { ... }`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113075



More information about the llvm-commits mailing list