Hi,
This has come up on llvm-dev before. Min-Yih Hsu gives a really good
explanation here:
https://lists.llvm.org/pipermail/llvm-dev/2019-September/134974.html
The easiest fix for this is to use the Legacy Pass Manager. Otherwise,
IIUC, opt would have to be updated to accommodate for this use case.
-Andrzej
On 29/05/2020 09:27, Adrián Ciudad via llvm-dev wrote:> Hi, I am adapting a pass plugin for opt to the new Pass Manager and
> everything is fine but the arguments that this pass requires. The next
> line works with the legacy PM and --xxx (or whatever) is understood:
> cl::opt<string> OutputFilename("xxx",
cl::desc("This is a
> parameter"), cl::value_desc("xxx"));
> But this is not the case for the new PM. What can I do?
> I have read an answer to a similar question that suggests to build the
> pass inside LLVM, but there should be a better way to accept
> arguments. Other than that, I can't find anything about this issue.
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>