]> granicus.if.org Git - clang/commitdiff
Use a different ConstantArray::get.
authorAnders Carlsson <andersca@mac.com>
Fri, 4 Dec 2009 16:22:27 +0000 (16:22 +0000)
committerAnders Carlsson <andersca@mac.com>
Fri, 4 Dec 2009 16:22:27 +0000 (16:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90570 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGVtable.cpp

index 9e19d2326f522c684c314f30905bf422d60d9284..9625811a036576ad8bbf091678250082f6e78eb4 100644 (file)
@@ -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;