diff options
| author | Zachary Turner <zturner@google.com> | 2017-05-19 05:18:09 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2017-05-19 05:18:09 +0000 |
| commit | 47fdc73771c39a83d97b8eb142dd311eb773e541 (patch) | |
| tree | 71ba2464e3318b6e7ed1678012a8390914f60a27 /llvm/lib | |
| parent | 59ab6a381602f102d259706b7cdb13208e31a7bc (diff) | |
| download | bcm5719-llvm-47fdc73771c39a83d97b8eb142dd311eb773e541.tar.gz bcm5719-llvm-47fdc73771c39a83d97b8eb142dd311eb773e541.zip | |
Don't crash if someone tries to visit an empty type stream.
llvm-svn: 303408
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/DebugInfo/CodeView/CVTypeVisitor.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/CodeView/CVTypeVisitor.cpp b/llvm/lib/DebugInfo/CodeView/CVTypeVisitor.cpp index 035b2c0a6af..e8d967b6389 100644 --- a/llvm/lib/DebugInfo/CodeView/CVTypeVisitor.cpp +++ b/llvm/lib/DebugInfo/CodeView/CVTypeVisitor.cpp @@ -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); |

