[llvm-dev] llvm::cl::opt and enums

Renato Golin via llvm-dev llvm-dev at lists.llvm.org
Wed Aug 31 11:12:34 PDT 2016


On 31 August 2016 at 19:06, Martin J. O'Riordan via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> but that doesn’t work, and I get something like “invalid option ‘3’”.  If I
> change the type to ‘int’ it works fine.  Is it valid to use an ‘enum’ in
> this way?  And if so, what is the correct way of specifying a value to the
> option if I do use an ‘enum’ for the type?

Try something similar to this:

https://reviews.llvm.org/D24070

cheers,
--renato


More information about the llvm-dev mailing list