Note some other limitations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77626 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp
index 8c960c7..215ee4c 100644
--- a/lib/CodeGen/CGCXX.cpp
+++ b/lib/CodeGen/CGCXX.cpp
@@ -106,6 +106,12 @@
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 @@
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();