189ba802bSDave Bartolomeo //===-- Line.cpp ----------------------------------------------------------===// 289ba802bSDave Bartolomeo // 3*2946cd70SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*2946cd70SChandler Carruth // See https://llvm.org/LICENSE.txt for license information. 5*2946cd70SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 689ba802bSDave Bartolomeo // 789ba802bSDave Bartolomeo //===----------------------------------------------------------------------===// 889ba802bSDave Bartolomeo 989ba802bSDave Bartolomeo #include "llvm/DebugInfo/CodeView/Line.h" 1089ba802bSDave Bartolomeo 1189ba802bSDave Bartolomeo using namespace llvm; 1289ba802bSDave Bartolomeo using namespace codeview; 1389ba802bSDave Bartolomeo LineInfo(uint32_t StartLine,uint32_t EndLine,bool IsStatement)1489ba802bSDave BartolomeoLineInfo::LineInfo(uint32_t StartLine, uint32_t EndLine, bool IsStatement) { 1589ba802bSDave Bartolomeo LineData = StartLine & StartLineMask; 1689ba802bSDave Bartolomeo uint32_t LineDelta = EndLine - StartLine; 1789ba802bSDave Bartolomeo LineData |= (LineDelta << EndLineDeltaShift) & EndLineDeltaMask; 1889ba802bSDave Bartolomeo if (IsStatement) { 1989ba802bSDave Bartolomeo LineData |= StatementFlag; 2089ba802bSDave Bartolomeo } 2189ba802bSDave Bartolomeo } 22