Adding a command-line option that takes a string?


I'm looking at adding the -fconstant-string-class= command-line argument (I hoped to avoid it, but apparently lots of things expect it to work). I've added simple flags before, but I am having trouble working out how to add an option to the driver that accepts a string that can be retrieved by the back end. Can someone give me some hints?


Hi David,

Can you give me a hint where you are stuck?

The basic steps:
1. Add the option, which is presumably a Joined option.

2. Add a clang-cc option this should map to (perhaps with the same name).

3. Add a translation so that clang will forward this to clang-cc
(around Tools.cpp:485). Something like: