[PATCH] Implement __declspec(selectany) under -fms-extensions

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri May 17 11:35:06 PDT 2013


On 17 May 2013 14:18, Reid Kleckner <rnk at google.com> wrote:
> The MSDN page says they can be discarded if you turn on the linker option
> /OPT:REF.  My intrepretation is that yes, they can be discarded, but only at
> link time.

So you want weak. linkonce lets llvm drop the symbol if it is not
used, so clang (when optimizing) will not even write it to the .o.

Cheers,
Rafael



More information about the cfe-commits mailing list