forked from OSchip/llvm-project
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:
parent
99ebb31283
commit
52d42c725a
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue