About using ParseCommandLine

I need to use LLVM's command line utilities for parsing command line
in an online compiling mode. Since multiple program may be compiled online
with same or different command line options, the options states need to
be saved and restored.

I found it is hard to save and restore
opt (options), given that opt are defined with
C++ templates, and options are registered implicitly through
class constructor.

Not sure if anyone else got the same problems. It will be nice to
add some infrastructural changes to Opt/Option so that the states of
Opt/Option can be saved and restored in a central place.

Any comments or suggestions ?