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.

llvm-svn: 133413
This commit is contained in:
Chris Lattner
2011-06-20 04:01:35 +00:00
parent cc19efaa97
commit e64d7ba153
12 changed files with 71 additions and 70 deletions

View File

@@ -95,9 +95,7 @@ static llvm::Constant *buildBlockDescriptor(CodeGenModule &CGM,
else
elements.push_back(llvm::Constant::getNullValue(i8p));
llvm::Constant *init =
llvm::ConstantStruct::get(CGM.getLLVMContext(), elements.data(),
elements.size(), false);
llvm::Constant *init = llvm::ConstantStruct::getAnon(elements);
llvm::GlobalVariable *global =
new llvm::GlobalVariable(CGM.getModule(), init->getType(), true,
@@ -851,9 +849,7 @@ static llvm::Constant *buildGlobalBlock(CodeGenModule &CGM,
// Descriptor
fields[4] = buildBlockDescriptor(CGM, blockInfo);
llvm::Constant *init =
llvm::ConstantStruct::get(CGM.getLLVMContext(), fields, BlockHeaderSize,
/*packed*/ false);
llvm::Constant *init = llvm::ConstantStruct::getAnon(fields);
llvm::GlobalVariable *literal =
new llvm::GlobalVariable(CGM.getModule(),