[llvm] [llvm] Refactor llc to use OptTable (PR #187901)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 28 18:27:31 PDT 2026
================
@@ -366,6 +317,153 @@ static std::unique_ptr<ToolOutputFile> GetOutputStream(Triple::OSType OS) {
return FDOut;
}
+static void RecordLlcOpts(opt::InputArgList &Args,
+ SmallVector<PassPlugin, 1> &PluginList) {
+ if (Args.hasArg(OPT_version)) {
+ // Register the Target and CPU printer for --version.
+ cl::AddExtraVersionPrinter(sys::printDefaultTargetAndDetectedCPU);
+ // Register the target printer for --version.
+ cl::AddExtraVersionPrinter(
+ TargetRegistry::printRegisteredTargetsForVersion);
+ cl::PrintVersionMessage();
+ exit(0);
+ }
+
+ for (const auto *A : Args) {
+ if (A->getOption().getID() == OPT_INPUT)
+ InputFilename = A->getValue();
----------------
PiJoules wrote:
Not sure I see it. How might it drop arguments?
https://github.com/llvm/llvm-project/pull/187901
More information about the llvm-commits
mailing list