From c5cbb909e8a27deb8f1a2b6b7bf56a96051af81a Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 20 Jun 2011 04:01:35 +0000 Subject: Update to match mainline ConstantStruct::get API change. Also, use ConvertType on InitListExprs as they are being converted. This is needed for a forthcoming patch, and improves the IR generated anyway (see additional type names in testcases). This patch also converts a bunch of std::vector's in CGObjCMac to use C arrays. There are a ton more that should be converted as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133413 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenModule.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/CodeGenModule.cpp') diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index b9c829364f..57b4f7f2ae 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -353,7 +353,7 @@ void CodeGenModule::EmitCtorList(const CtorList &Fns, const char *GlobalName) { llvm::Type *CtorPFTy = llvm::PointerType::getUnqual(CtorFTy); // Get the type of a ctor entry, { i32, void ()* }. - llvm::StructType* CtorStructTy = + llvm::StructType *CtorStructTy = llvm::StructType::get(llvm::Type::getInt32Ty(VMContext), llvm::PointerType::getUnqual(CtorFTy), NULL); @@ -676,7 +676,7 @@ llvm::Constant *CodeGenModule::EmitAnnotateAttr(llvm::GlobalValue *GV, llvm::ConstantExpr::getBitCast(unitGV, SBP), llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), LineNo) }; - return llvm::ConstantStruct::get(VMContext, Fields, 4, false); + return llvm::ConstantStruct::getAnon(Fields); } bool CodeGenModule::MayDeferGeneration(const ValueDecl *Global) { -- cgit v1.2.3-70-g09d2