r175132 - Partially revert r175117 so that we don't break assumptions about how

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Feb 14 13:58:55 PST 2013


> I understand what you're trying to do here, because indeed the standard
> says that language linkage only applies to functions and variables with
> external linkage, but I think the right thing to do is to just acknowledge
> that we (AFAIK, like gcc) just give C language linkage to everything
> declared in extern "C" and be done with it.  There are much more
> significant ways in which we deviate from the standard's definition of
> language linkage.

That was one of the listed options, and while some callers do want the
notion of "usable from C", they should be easy to update (mostly going
from foo.isExternC() to foo.isExternC() &&
!isExternalLinkage(foo.getLinkage()).

I don't have a big preference on this, but Richard suggested on IRC
going the other way: fixing llvm's assumptions about name mangling and
reverting this patch.

What are the other deviations from language linkage that you know? The
one I know in that we don't include it in function types. Do you know
the rationale for it being what it is on the standard? If we implement
what it looks like gcc implements (all variables and functions have
language linkage), do you think a DR would be reasonable?

I can probably implement it one way or the other tonight.

> John.

Cheers,
Rafael



More information about the cfe-commits mailing list