Use the ArrayType member function for array element types.

ArrayType and StructType accept the same types, so no test.

llvm-svn: 236078
This commit is contained in:
Filipe Cabecinhas 2015-04-29 02:27:21 +00:00
parent 99ebb31283
commit 52d42c725a
1 changed files with 1 additions and 1 deletions

View File

@ -1475,7 +1475,7 @@ std::error_code BitcodeReader::ParseTypeTableBody() {
if (Record.size() < 2)
return Error("Invalid record");
if ((ResultTy = getTypeByID(Record[1])) &&
StructType::isValidElementType(ResultTy))
ArrayType::isValidElementType(ResultTy))
ResultTy = ArrayType::get(ResultTy, Record[0]);
else
return Error("Invalid type");