1*7d523365SDimitry Andric //===-- Line.cpp ----------------------------------------------------------===// 2*7d523365SDimitry Andric // 3*7d523365SDimitry Andric // The LLVM Compiler Infrastructure 4*7d523365SDimitry Andric // 5*7d523365SDimitry Andric // This file is distributed under the University of Illinois Open Source 6*7d523365SDimitry Andric // License. See LICENSE.TXT for details. 7*7d523365SDimitry Andric // 8*7d523365SDimitry Andric //===----------------------------------------------------------------------===// 9*7d523365SDimitry Andric 10*7d523365SDimitry Andric #include "llvm/DebugInfo/CodeView/Line.h" 11*7d523365SDimitry Andric 12*7d523365SDimitry Andric using namespace llvm; 13*7d523365SDimitry Andric using namespace codeview; 14*7d523365SDimitry Andric LineInfo(uint32_t StartLine,uint32_t EndLine,bool IsStatement)15*7d523365SDimitry AndricLineInfo::LineInfo(uint32_t StartLine, uint32_t EndLine, bool IsStatement) { 16*7d523365SDimitry Andric LineData = StartLine & StartLineMask; 17*7d523365SDimitry Andric uint32_t LineDelta = EndLine - StartLine; 18*7d523365SDimitry Andric LineData |= (LineDelta << EndLineDeltaShift) & EndLineDeltaMask; 19*7d523365SDimitry Andric if (IsStatement) { 20*7d523365SDimitry Andric LineData |= StatementFlag; 21*7d523365SDimitry Andric } 22*7d523365SDimitry Andric } 23