summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/CodeView/StreamWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/DebugInfo/CodeView/StreamWriter.cpp')
-rw-r--r--llvm/lib/DebugInfo/CodeView/StreamWriter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/CodeView/StreamWriter.cpp b/llvm/lib/DebugInfo/CodeView/StreamWriter.cpp
index f61c6b522f5..90eafbb9c83 100644
--- a/llvm/lib/DebugInfo/CodeView/StreamWriter.cpp
+++ b/llvm/lib/DebugInfo/CodeView/StreamWriter.cpp
@@ -54,7 +54,8 @@ Error StreamWriter::writeFixedString(StringRef Str) {
Error StreamWriter::writeStreamRef(StreamRef Ref) {
if (auto EC = writeStreamRef(Ref, Ref.getLength()))
return EC;
- Offset += Ref.getLength();
+ // Don't increment Offset here, it is done by the overloaded call to
+ // writeStreamRef.
return Error::success();
}
OpenPOWER on IntegriCloud