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