]> granicus.if.org Git - clang/commitdiff
[ms-cxxabi] Error out on virtual function memptrs
authorReid Kleckner <reid@kleckner.net>
Thu, 17 Oct 2013 21:30:27 +0000 (21:30 +0000)
committerReid Kleckner <reid@kleckner.net>
Thu, 17 Oct 2013 21:30:27 +0000 (21:30 +0000)
These are uncommon and this is better than miscompiling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192923 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MicrosoftCXXABI.cpp

index a8e074c7b379e05f62b79439f0ec2c2e3bca1b5d..ba7de89b2fc100453446f00fe0a7d63d1315e91d 100644 (file)
@@ -1277,6 +1277,7 @@ MicrosoftCXXABI::BuildMemberPointer(const CXXRecordDecl *RD,
   if (MD->isVirtual()) {
     // FIXME: We have to instantiate a thunk that loads the vftable and jumps to
     // the right offset.
+    CGM.ErrorUnsupported(MD, "pointer to virtual member function");
     FirstField = llvm::Constant::getNullValue(CGM.VoidPtrTy);
   } else {
     const FunctionProtoType *FPT = MD->getType()->castAs<FunctionProtoType>();