From: Jay Foad Date: Wed, 22 Jun 2011 09:24:39 +0000 (+0000) Subject: Replace the existing forms of ConstantArray::get() with a single form X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=97357602a289749d59520ac4ac31149f8d32e12e;p=clang Replace the existing forms of ConstantArray::get() with a single form that takes an ArrayRef. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133615 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index 721ab3e6ba..f98770071e 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -3402,7 +3402,7 @@ void CGObjCCommonMac::EmitImageInfo() { Section = "__DATA, __objc_imageinfo, regular, no_dead_strip"; llvm::GlobalVariable *GV = CreateMetadataVar("\01L_OBJC_IMAGE_INFO", - llvm::ConstantArray::get(AT, values, 2), + llvm::ConstantArray::get(AT, values), Section, 0, true); diff --git a/lib/CodeGen/CGVTT.cpp b/lib/CodeGen/CGVTT.cpp index aefc41e500..cec02cdfc2 100644 --- a/lib/CodeGen/CGVTT.cpp +++ b/lib/CodeGen/CGVTT.cpp @@ -390,8 +390,7 @@ CodeGenVTables::EmitVTTDefinition(llvm::GlobalVariable *VTT, llvm::ArrayType::get(Int8PtrTy, Builder.getVTTComponents().size()); llvm::Constant *Init = - llvm::ConstantArray::get(ArrayType, Builder.getVTTComponents().data(), - Builder.getVTTComponents().size()); + llvm::ConstantArray::get(ArrayType, Builder.getVTTComponents()); VTT->setInitializer(Init); diff --git a/lib/CodeGen/CGVTables.cpp b/lib/CodeGen/CGVTables.cpp index 9ac5e67ada..e439b5fc31 100644 --- a/lib/CodeGen/CGVTables.cpp +++ b/lib/CodeGen/CGVTables.cpp @@ -3165,7 +3165,7 @@ CodeGenVTables::CreateVTableInitializer(const CXXRecordDecl *RD, } llvm::ArrayType *ArrayType = llvm::ArrayType::get(Int8PtrTy, NumComponents); - return llvm::ConstantArray::get(ArrayType, Inits.data(), Inits.size()); + return llvm::ConstantArray::get(ArrayType, Inits); } llvm::GlobalVariable *CodeGenVTables::GetAddrOfVTable(const CXXRecordDecl *RD) {