[PATCH] ignore __declspec(novtable) on non-Windows platforms

Bob Wilson bob.wilson at apple.com
Mon Jul 20 12:00:05 PDT 2015


> On Jul 17, 2015, at 5:00 PM, Richard Smith <richard at metafoo.co.uk> wrote:
> 
> On Fri, Jul 17, 2015 at 3:43 PM, David Majnemer <david.majnemer at gmail.com <mailto:david.majnemer at gmail.com>> wrote:
> 
> 
> On Fri, Jul 17, 2015 at 3:13 PM, Richard Smith <richard at metafoo.co.uk <mailto:richard at metafoo.co.uk>> wrote:
> It seems to me that we should be basing the check on the TargetCXXABI rather than whether the target is Windows.
> 
> That's why I suggested to use llvm::Triple::isKnownWindowsMSVCEnvironment, it's what we use to set the CXX ABI: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/TargetInfo.cpp?revision=242198&view=markup#l87 <https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_cfe_trunk_lib_Basic_TargetInfo.cpp-3Frevision-3D242198-26view-3Dmarkup-23l87&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=G3MVPiIuh9Zu9HyzhnePJCf25I6f-1MwpsQj4utGWto&s=KEA3UO4jwzX7cHyKdUCfHMcIZdkf_BpNhd5YnO58M_8&e=>
> 
> That's only the default; targets are permitted to override it, and many of them do so. ItaniumWindowsARMleTargetInfo sets a non-MS C++ ABI, for instance.

Here’s a new patch that checks TargetCXXABI.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150720/24598464/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: novtable.patch
Type: application/octet-stream
Size: 13459 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150720/24598464/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150720/24598464/attachment-0001.html>


More information about the cfe-commits mailing list