[patch][pr14974] Change what #pragma weak matches

John McCall rjmccall at apple.com
Tue Feb 26 09:39:56 PST 2013

On Feb 26, 2013, at 5:01 AM, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:
>>> Looks like it is. At least given
>>> int foo;
>>> static int bar;
>>> On Itanium we mangle bar, on MS we mangle foo.
>> Oh, right.
>> I wonder if we can justify only ever matching C-linkage declarations?
>> That would be stricter than Itanium forces us to be, but, well, it's not an
>> unreasonable restriction, it's likely to always apply in system headers,
>> and it draws a very clear line in the sand.  And we really don't want to
>> have to match mangled names.
> Given that windows mangles global variable names I think we are OK.
> The attached patch applies #pragma weak only to extern C functions and
> variables.

Looks good.


More information about the cfe-commits mailing list