diff options
Diffstat (limited to 'llvm/lib/MC/MCCodeView.cpp')
-rw-r--r-- | llvm/lib/MC/MCCodeView.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCCodeView.cpp b/llvm/lib/MC/MCCodeView.cpp index 029bab1..cd19e6a 100644 --- a/llvm/lib/MC/MCCodeView.cpp +++ b/llvm/lib/MC/MCCodeView.cpp @@ -311,8 +311,11 @@ void CodeViewContext::encodeInlineLineTable(MCAsmLayout &Layout, WithinFunction = true; if (Loc.getFileNum() != LastLoc->getFileNum()) { + // File ids are 1 based, and each file checksum table entry is 8 bytes + // long. See emitFileChecksums above. + unsigned FileOffset = 8 * (Loc.getFileNum() - 1); compressAnnotation(ChangeFile, Buffer); - compressAnnotation(Loc.getFileNum(), Buffer); + compressAnnotation(FileOffset, Buffer); } int LineDelta = Loc.getLine() - LastLoc->getLine(); |