You should use the CommandLine library which comes built-in with LLVM. Basically, you just put at the top of the .cpp file of the pass:
#include "llvm/Support/CommandLine.h"
static cl::opt<string> InputFilename("mypass_option", cl::desc("Specify input filename for mypass"), cl::value_desc("filename"));
But I recommend you check the above link, it has full reference + convenient quickstart section.
For an example, take a look at the built-in loop unrolling pass - it defines two unsigned and two boolean options, right at the top of the source file, by using cl::opt<unsigned>
and cl::opt<bool>
.