[PATCH] D130137: [lld-macho] Simplify archive loading logic

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 19 18:40:31 PDT 2022


int3 added inline comments.


================
Comment at: lld/MachO/Driver.cpp:254
+  CommandLineForce, // Passed via `-force_load`
+  LCLinkerOption,   // Passed via LC_LINKER_OPTIONS
+};
----------------
int3 wrote:
> thakis wrote:
> > Maybe say "only applies to swift files" in the comment here, or put "Swift" in the constant's name then?
> the swift-force-loading only applies to libraries though, not frameworks, but we pass this enum for both library and framework loads
> 
> I can add a comment to `Config::forceLoadSwift` though
also this enum is passed regardless of whether we are doing a force-load. `LoadType` just tells us what induced the load, not *how* the load should be performed (i.e. forced or not). I will add that in a comment


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130137



More information about the llvm-commits mailing list