Alex Rivera | Logout

How can I pass flags to a LLVM pass?

Asked 2011-01-31T16:58:00.403
9

I'm implementing a LLVM pass, and would like to turn some options on or off via the command line, especially I'd like to have a -v verbose mode for my pass.

I couldn't find a mechanism for passing command line flags mentioned in any of the docs, does one exist?

Edit
Report

1 Answer

12

The solution I found is to use LLVM's general CommandLine API: http://llvm.org/docs/CommandLine.html

Works as expected in opt when loading the pass dynamically.

answered 2011-01-31T18:20:43.873

Your Answer