aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/DebugInfo/PDB/Native/NativeFunctionSymbol.cpp
diff options
context:
space:
mode:
authorAmy Huang <akhuang@google.com>2020-11-25 09:22:17 -0800
committerAmy Huang <akhuang@google.com>2020-11-30 14:27:35 -0800
commit00bbef2bb20cf212722de282e4eb9afd09ab50db (patch)
tree2573fb5ce38e5750d9c6c66dab9390eee20750f0 /llvm/lib/DebugInfo/PDB/Native/NativeFunctionSymbol.cpp
parentfd3d1b09c12f1419292172627dbca9929f0daf39 (diff)
downloadllvm-00bbef2bb20cf212722de282e4eb9afd09ab50db.zip
llvm-00bbef2bb20cf212722de282e4eb9afd09ab50db.tar.gz
llvm-00bbef2bb20cf212722de282e4eb9afd09ab50db.tar.bz2
[llvm-symbolizer] Fix native symbolization on windows for inline sites.
The existing code handles this correctly and I checked that the code in NativeInlineSiteSymbol also handles this correctly, but it was wrong in the NativeFunctionSymbol code. Differential Revision: https://reviews.llvm.org/D92134
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native/NativeFunctionSymbol.cpp')
-rw-r--r--llvm/lib/DebugInfo/PDB/Native/NativeFunctionSymbol.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeFunctionSymbol.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeFunctionSymbol.cpp
index 708ed36..7f3b35c 100644
--- a/llvm/lib/DebugInfo/PDB/Native/NativeFunctionSymbol.cpp
+++ b/llvm/lib/DebugInfo/PDB/Native/NativeFunctionSymbol.cpp
@@ -78,10 +78,7 @@ static bool inlineSiteContainsAddress(InlineSiteSym &IS,
break;
case BinaryAnnotationsOpCode::ChangeCodeLengthAndCodeOffset:
CodeOffset += Annot.U2;
- if (OffsetInFunc >= CodeOffset)
- Found = true;
- CodeOffset += Annot.U1;
- if (Found && OffsetInFunc < CodeOffset)
+ if (OffsetInFunc >= CodeOffset && OffsetInFunc < CodeOffset + Annot.U1)
return true;
Found = false;
break;