diff options
| -rw-r--r-- | llvm/include/llvm/DebugInfo/CodeView/StreamArray.h | 9 | 
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/include/llvm/DebugInfo/CodeView/StreamArray.h b/llvm/include/llvm/DebugInfo/CodeView/StreamArray.h index caf70db1fdf..7e4296c5209 100644 --- a/llvm/include/llvm/DebugInfo/CodeView/StreamArray.h +++ b/llvm/include/llvm/DebugInfo/CodeView/StreamArray.h @@ -93,12 +93,13 @@ public:      if (!Array || IterRef.getLength() == 0 || ThisLen == 0)        return *this;      IterRef = IterRef.drop_front(ThisLen); -    if (IterRef.getLength() == 0) { -      Array = nullptr; +    if (IterRef.getLength() == 0)        ThisLen = 0; -    } else { +    else +      // TODO: We should report an error if Extract fails.        ThisLen = Extract(IterRef, ThisValue); -    } +    if (ThisLen == 0) +      Array = nullptr;      return *this;    }  | 

