When LLVM is used in other projects, it may happen that global constructors will execute before the call to ParseCommandLineOptions. [Thanks to @dblaikie for the correction.]
In a project I'm working with there are multiple LLVM codegen executions (targeting different architectures). The OptBisect object is initialized (via a constructor) the first time it's queried by skipFunction, and has no ability to be updated at a later time.
When debugging codegen for the second target, passing -opt-bisect-limit to ParseCommandLineOptions will no longer have any effect if it takes place after the OptBisect object has already been created.
To avoid this problem use a cl::cb (callback) to set the bisection limit when the option is actually processed.