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

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Feb 26 05:01:06 PST 2013


>> 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.

> John.

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: application/octet-stream
Size: 2398 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130226/2985a853/attachment.obj>


More information about the cfe-commits mailing list