Replace the existing forms of ConstantArray::get() with a single form

that takes an ArrayRef.

llvm-svn: 133615
This commit is contained in:
Jay Foad
2011-06-22 09:24:39 +00:00
parent b8a8bed301
commit 83be361b8a
11 changed files with 14 additions and 26 deletions

View File

@@ -292,7 +292,7 @@ void BitcodeReaderValueList::ResolveConstantForwardRefs() {
// Make the new constant.
Constant *NewC;
if (ConstantArray *UserCA = dyn_cast<ConstantArray>(UserC)) {
NewC = ConstantArray::get(UserCA->getType(), &NewOps[0], NewOps.size());
NewC = ConstantArray::get(UserCA->getType(), NewOps);
} else if (ConstantStruct *UserCS = dyn_cast<ConstantStruct>(UserC)) {
NewC = ConstantStruct::get(UserCS->getType(), NewOps);
} else if (isa<ConstantVector>(UserC)) {