forked from OSchip/llvm-project
Don't crash if someone tries to visit an empty type stream.
llvm-svn: 303408
This commit is contained in:
parent
59ab6a3816
commit
47fdc73771
|
@ -227,6 +227,9 @@ Error CVTypeVisitor::visitTypeStream(CVTypeRange Types) {
|
|||
}
|
||||
|
||||
Error CVTypeVisitor::visitTypeStream(TypeCollection &Types) {
|
||||
if (Types.empty())
|
||||
return Error::success();
|
||||
|
||||
Optional<TypeIndex> I = Types.getFirst();
|
||||
do {
|
||||
CVType Type = Types.getType(*I);
|
||||
|
|
Loading…
Reference in New Issue