diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp index 9e19d2326f..9625811a03 100644 --- a/lib/CodeGen/CGVtable.cpp +++ b/lib/CodeGen/CGVtable.cpp @@ -1115,7 +1115,8 @@ llvm::Constant *CodeGenModule::GenerateVtable(const CXXRecordDecl *LayoutClass, if (CreateDefinition) { llvm::ArrayType *ntype = llvm::ArrayType::get(Ptr8Ty, b.getVtable().size()); - C = llvm::ConstantArray::get(ntype, b.getVtable()); + C = llvm::ConstantArray::get(ntype, &b.getVtable()[0], + b.getVtable().size()); linktype = llvm::GlobalValue::LinkOnceODRLinkage; if (LayoutClass->isInAnonymousNamespace()) linktype = llvm::GlobalValue::InternalLinkage;