This option permit to localize a symbol by given its name.
Looks mostly good to me, just need to merge the passes over the symbols.
Accumulate the functions so that localize can happen in a single pass. See what I did above with sections. Also in https://reviews.llvm.org/D46029 I requested that localize be replaced with a slightly more generalized 'map over symbols'. You can go ahead and write this in terms of localize but depending on which patch goes though first one or the other of you will need to change some code. Just a heads up.
Why do we need all the extra symbols in this test?
Could we also get tests for localizing a symbol that is already a local, and also localizing a weak symbol, please, and for localizing multiple symbols at the same time (maybe these could be all one test).
I think we've also tended to test both short and long options.
Let's use a slightly more meaningful help message, that doesn't just repeat the switch name, e.g. "Mark <symbol> as local" (see also --localize-hidden).
Aside from the conflict with D46029, mentioned already, and a couple of minor test-related points, this looks fine from my point of view.
Since the visibility isn't relevant to the test, you can get rid of this. I'd also rename all the symbols to be simpler named (i.e. something like "Local", "Weak" and "Global"). The default/hidden part was to do with the symbol visibility from the localize-hidden test (I assume?), to reflect which was which.
You can land it whenever suits you. Whoever lands it first makes the other person refactor their code a touch but it isn't a big deal. I'll alert the other person of the conflict when it happens.