Re: [rfa] Add SYMBOL_SET_LINKAGE_NAME

David Carlton
2004-02-18T00:20:55Z

On Mon, 16 Feb 2004 16:24:06 -0500, Daniel Jacobowitz <drow@false.org> said:

> This patch adds a macro, SYMBOL_SET_LINKAGE_NAME, which is used to
> set a symbol's name when the name should not be demangled. Used for
> things like typedefs whose name comes from debug info.

The idea is okay, but I don't like the name all that much. I once had
a goal, which I've admittedly been lax about pursuing recently, that
we would have a very clear distinction between linkage names (which
really did mean names used by the linker) and natural names (i.e. the
names in the source code), to the extent that, if we were to represent
these by different types, then our code would almost compile.

When we're talking about types, however, linkage names don't make much
sense, only natural names. So, while it's true that your macro does
set the field that, in the case of a symbol with both linkage and
natural names, corresponds to the linkage name, that's really an
implementation detail that should be shielded behind this macro.

Having said that, I don't have any great suggestions for a better
name. SYMBOL_SET_NATURAL_NAME? SYMBOL_SET_NATURAL_ONLY_NAME? Hmm.

David Carlton
carlton@kealia.com