[PATCH] D137799: [WIP][llvm-driver] Pass extra arguments to tools
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 11 15:05:00 PST 2022
phosek added inline comments.
================
Comment at: llvm/cmake/modules/llvm-driver-template.cpp.in:11
-int main(int argc, char **argv) { return @TOOL_NAME at _main(argc, argv); }
+int @TOOL_NAME at _main(int argc, char **argv, const llvm::LLVMDriverExtraArgs &);
+
----------------
Since we're no longer trying to match the signature of `main`, we could also consider other changes, for example passing args as a `ArrayRef<const char *>`, but that could be done in some future changes.
================
Comment at: llvm/include/llvm/Support/LLVMDriver.h:14
+
+struct LLVMDriverExtraArgs {};
+
----------------
Since this struct will contain more than just args, like `IsDriver` added in D137800, I'd probably call it something like `LLVMDriverContext`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137799/new/
https://reviews.llvm.org/D137799
More information about the llvm-commits
mailing list