From fa2264aab19329fb3023daa046d15e749556024a Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Thu, 17 Oct 2013 21:30:27 +0000 Subject: [PATCH] [ms-cxxabi] Error out on virtual function memptrs 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/CodeGen/MicrosoftCXXABI.cpp b/lib/CodeGen/MicrosoftCXXABI.cpp index a8e074c7b3..ba7de89b2f 100644 --- a/lib/CodeGen/MicrosoftCXXABI.cpp +++ b/lib/CodeGen/MicrosoftCXXABI.cpp @@ -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(); -- 2.40.0