r192923 - [ms-cxxabi] Error out on virtual function memptrs

Reid Kleckner reid at kleckner.net
Thu Oct 17 14:30:27 PDT 2013


Author: rnk
Date: Thu Oct 17 16:30:27 2013
New Revision: 192923

URL: http://llvm.org/viewvc/llvm-project?rev=192923&view=rev
Log:
[ms-cxxabi] Error out on virtual function memptrs

These are uncommon and this is better than miscompiling.

Modified:
    cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp

Modified: cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp?rev=192923&r1=192922&r2=192923&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp (original)
+++ cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp Thu Oct 17 16:30:27 2013
@@ -1277,6 +1277,7 @@ MicrosoftCXXABI::BuildMemberPointer(cons
   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>();





More information about the cfe-commits mailing list