[llvm-dev] How to set command line option programmatically? (original) (raw)

David Greene via llvm-dev llvm-dev at lists.llvm.org
Tue Jan 22 12:19:33 PST 2019


"mayuyu.io via llvm-dev" <llvm-dev at lists.llvm.org> writes:

Isn’t that supposed to be used in main() ? I’m interested in this use case as well but afaik there isn’t any generic API for this outside of main

It's just a method and can be called anywhere. It expects an array of strings and a count. It doesn't care at all how that array was formed. Depending on what you're doing, you might need to call llvm:🆑:ResetAllOptionOccurrences first.

                     -David

在 2019年1月21日,19:47,Krzysztof Parzyszek via llvm-dev <llvm-dev at lists.llvm.org> 写道:

On 1/21/2019 1:36 PM, via llvm-dev wrote: Hello, i want to use the Scalarizer pass. (http://llvm.org/doxygen/Scalarizer8cppsource.html). This pass exposes the "scalarize-load-store"(default false) option on the command line. For my use-case i want to always enable this option. How can i enable this option programmatically? You should be able to use ParseCommandLineOptions for that. -Krzysztof -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation


LLVM Developers mailing list llvm-dev at lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


LLVM Developers mailing list llvm-dev at lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev



More information about the llvm-dev mailing list