]> granicus.if.org Git - clang/commitdiff
Note some other limitations.
authorMike Stump <mrs@apple.com>
Thu, 30 Jul 2009 21:47:44 +0000 (21:47 +0000)
committerMike Stump <mrs@apple.com>
Thu, 30 Jul 2009 21:47:44 +0000 (21:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77626 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGCXX.cpp

index 8c960c7f9854e06a476c941db9a5341895187ea5..215ee4c02652d5b078bd2495a83f1e1b82dc95c7 100644 (file)
@@ -106,6 +106,12 @@ RValue CodeGenFunction::EmitCXXMemberCallExpr(const CXXMemberCallExpr *CE) {
   const CXXMethodDecl *MD = cast<CXXMethodDecl>(ME->getMemberDecl());
 
   const FunctionProtoType *FPT = MD->getType()->getAsFunctionProtoType();
+
+  // FIXME: It isn't just virtual as written, but all virtual functions.
+  if (MD->isVirtualAsWritten()) {
+    ErrorUnsupported(CE, "virtual dispatch");
+  }
+
   const llvm::Type *Ty = 
     CGM.getTypes().GetFunctionType(CGM.getTypes().getFunctionInfo(MD), 
                                    FPT->isVariadic());
@@ -490,7 +496,9 @@ const char *CodeGenModule::getMangledCXXDtorName(const CXXDestructorDecl *D,
 void CodeGenFunction::EmitCtorPrologue(const CXXConstructorDecl *CD) {
   const CXXRecordDecl *ClassDecl = cast<CXXRecordDecl>(CD->getDeclContext());
   assert(!ClassDecl->isPolymorphic()
-         && "FIXME. virtual base initialization unsupported");
+         && "FIXME: virtual table initialization unsupported");
+  assert(ClassDecl->getNumVBases() == 0
+         && "FIXME: virtual base initialization unsupported");
   
   for (CXXConstructorDecl::init_const_iterator B = CD->init_begin(),
        E = CD->init_end();