[PATCH] D98559: [lld-macho] Implement -dependency_info
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 15 00:06:57 PDT 2021
int3 requested changes to this revision.
int3 added a comment.
This revision now requires changes to proceed.
As discussed, let's verify that we are emulating ld64's behavior correctly. We should also support the other opcodes (but we can do that in a series of separate diffs)
================
Comment at: lld/MachO/Config.h:101-109
+ kVersion = 0x00,
+ // Denotes the input files.
+ kInput = 0x10,
+ // Denotes the files that do not exist(?)
+ // FIXME: This one is weird. I(vyng) take it to mean all the files
+ // that the linker attempted to look at but which did not exist.
+ kNotFound = 0x11,
----------------
Judging from the rest of LLD, enum naming convention is generally CamelCase (or `FOO_BAR` in the case of bitfields / flags).
================
Comment at: lld/MachO/Config.h:160-170
+ template <typename T,
+ typename = std::enable_if<false, std::is_same<T, std::string>>>
+ void inline logFileNotFound(T path) {
+ if (dependencyTracker != nullptr)
+ dependencyTracker->logFileNotFound(std::string(path));
+ }
+
----------------
I'd like the Config to stay as a plain "bag of values" kind of struct -- no methods other than trivial getters. `dependencyTracker` here can be a global. Also the class can be declared in Driver.cpp / DriverUtils.cpp.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98559/new/
https://reviews.llvm.org/D98559
More information about the llvm-commits
mailing list