diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeFunctionSymbol.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeFunctionSymbol.cpp --- a/llvm/lib/DebugInfo/PDB/Native/NativeFunctionSymbol.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeFunctionSymbol.cpp @@ -78,10 +78,7 @@ 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;