[llvm] 1043eea - [llvm-symbolizer][native-pdb] Don't reset CurLineOffset if NextLineOffset is none
Zequan Wu via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 27 16:08:02 PDT 2022
Author: Zequan Wu
Date: 2022-04-27T16:05:19-07:00
New Revision: 1043eeaf86ac6718af0cad606452ad1d0c0c2e9a
URL: https://github.com/llvm/llvm-project/commit/1043eeaf86ac6718af0cad606452ad1d0c0c2e9a
DIFF: https://github.com/llvm/llvm-project/commit/1043eeaf86ac6718af0cad606452ad1d0c0c2e9a.diff
LOG: [llvm-symbolizer][native-pdb] Don't reset CurLineOffset if NextLineOffset is none
Added:
Modified:
llvm/lib/DebugInfo/PDB/Native/NativeInlineSiteSymbol.cpp
Removed:
################################################################################
diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeInlineSiteSymbol.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeInlineSiteSymbol.cpp
index 211c2f7939173..99ec627fcd269 100644
--- a/llvm/lib/DebugInfo/PDB/Native/NativeInlineSiteSymbol.cpp
+++ b/llvm/lib/DebugInfo/PDB/Native/NativeInlineSiteSymbol.cpp
@@ -106,8 +106,8 @@ void NativeInlineSiteSymbol::getLineOffset(uint32_t OffsetInFunc,
uint32_t CodeOffset = 0;
Optional<uint32_t> CodeOffsetBase;
Optional<uint32_t> CodeOffsetEnd;
- Optional<uint32_t> CurLineOffset;
- Optional<uint32_t> NextLineOffset;
+ Optional<int32_t> CurLineOffset;
+ Optional<int32_t> NextLineOffset;
Optional<uint32_t> NextFileOffset;
auto UpdateCodeOffset = [&](uint32_t Delta) {
if (!CodeOffsetBase)
@@ -138,9 +138,12 @@ void NativeInlineSiteSymbol::getLineOffset(uint32_t OffsetInFunc,
// Set base, end, file offset and line offset for next range.
if (NextFileOffset)
FileOffset = *NextFileOffset;
- CurLineOffset = NextLineOffset ? NextLineOffset : None;
+ if (NextLineOffset) {
+ CurLineOffset = NextLineOffset;
+ NextLineOffset = None;
+ }
CodeOffsetBase = CodeOffsetEnd;
- CodeOffsetEnd = NextLineOffset = NextFileOffset = None;
+ CodeOffsetEnd = NextFileOffset = None;
}
return false;
};
More information about the llvm-commits
mailing list