1dd58ef01SDimitry Andric //===-- Line.cpp ----------------------------------------------------------===// 2dd58ef01SDimitry Andric // 3e6d15924SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4e6d15924SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 5e6d15924SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6dd58ef01SDimitry Andric // 7dd58ef01SDimitry Andric //===----------------------------------------------------------------------===// 8dd58ef01SDimitry Andric 9dd58ef01SDimitry Andric #include "llvm/DebugInfo/CodeView/Line.h" 10dd58ef01SDimitry Andric 11dd58ef01SDimitry Andric using namespace llvm; 12dd58ef01SDimitry Andric using namespace codeview; 13dd58ef01SDimitry Andric LineInfo(uint32_t StartLine,uint32_t EndLine,bool IsStatement)14dd58ef01SDimitry AndricLineInfo::LineInfo(uint32_t StartLine, uint32_t EndLine, bool IsStatement) { 15dd58ef01SDimitry Andric LineData = StartLine & StartLineMask; 16dd58ef01SDimitry Andric uint32_t LineDelta = EndLine - StartLine; 17dd58ef01SDimitry Andric LineData |= (LineDelta << EndLineDeltaShift) & EndLineDeltaMask; 18dd58ef01SDimitry Andric if (IsStatement) { 19dd58ef01SDimitry Andric LineData |= StatementFlag; 20dd58ef01SDimitry Andric } 21dd58ef01SDimitry Andric } 22