Restoring "pubnames" section in DWARF

We have customers that rely on the symbol information from the "pubnames" section in the DWARF data. Generation of this information was removed in this commit:

commit dfa30e1ab243990eda4732a6dffb91e965e7a755
Author: Eric Christopher <echristo@apple.com>

     Remove the pubnames section, no one consumes it.

     git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144169 91177308-0d34-0410-b5e6-96231b3b80d8

I could submit a patch that brings it back (some tweaks were needed). Is this something you could consider?

-Krzysztof

We have customers that rely on the symbol information from the
"pubnames" section in the DWARF data. Generation of this information
was removed in this commit:

commit dfa30e1ab243990eda4732a6dffb91e965e7a755
Author: Eric Christopher <echristo@apple.com>
Date: Wed Nov 9 05:24:07 2011 +0000

    Remove the pubnames section, no one consumes it.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144169
91177308-0d34-0410-b5e6-96231b3b80d8

I could submit a patch that brings it back (some tweaks were needed).
Is this something you could consider?

-Krzysztof

I'd ask that it be made target-dependent, as I don't want it
(and apparently few do, which is why it was removed).
Thanks,
--paulr

No worries there, it can be put under a flag perhaps.

-eric

Is there a target hook for generating debug information? Or should I just invent a cl::opt flag and guard the code under that?

-Krzysztof

I'd prefer a flag really (DwarfDebug.cpp) and just pass that down from the
front end if you really need or invent a front end option to control it.
-glegacy-pubtables or something?

-eric

Sounds good. Thanks!

-Krzysztof