From 9dc9d0e6d0e07ed8efe2ea83e6f8532e87c5c237 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 12 Jul 2019 06:04:23 +0100 Subject: [PATCH] fix portable PDBs for anon records (#7099) --- src/absil/ilwritepdb.fs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/absil/ilwritepdb.fs b/src/absil/ilwritepdb.fs index 260ccbe238e..2a992ed4855 100644 --- a/src/absil/ilwritepdb.fs +++ b/src/absil/ilwritepdb.fs @@ -403,12 +403,17 @@ let generatePortablePdb (embedAllSource: bool) (embedSourceList: string list) (s if i < 1 || offsetDelta > 0 then builder.WriteCompressedInteger offsetDelta - // Hidden-sequence-point-record - if startLine = 0xfeefee || endLine = 0xfeefee || (startColumn = 0 && endColumn = 0) + // Check for hidden-sequence-point-record + if startLine = 0xfeefee || + endLine = 0xfeefee || + (startColumn = 0 && endColumn = 0) || + ((endLine - startLine) = 0 && (endColumn - startColumn) = 0) then + // Hidden-sequence-point-record builder.WriteCompressedInteger 0 builder.WriteCompressedInteger 0 - else // Non-hidden-sequence-point-record + else + // Non-hidden-sequence-point-record let deltaLines = endLine - startLine // lines builder.WriteCompressedInteger deltaLines