LLVM  14.0.0git
NativeLineNumber.cpp
Go to the documentation of this file.
1 //===- NativeLineNumber.cpp - Native line number implementation -*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
10 
11 using namespace llvm;
12 using namespace llvm::pdb;
13 
15  const codeview::LineInfo Line,
16  uint32_t ColumnNumber, uint32_t Section,
17  uint32_t Offset, uint32_t Length,
18  uint32_t SrcFileId, uint32_t CompilandId)
19  : Session(Session), Line(Line), ColumnNumber(ColumnNumber),
20  Section(Section), Offset(Offset), Length(Length), SrcFileId(SrcFileId),
21  CompilandId(CompilandId) {}
22 
24 
26  return Line.getEndLine();
27 }
28 
29 uint32_t NativeLineNumber::getColumnNumber() const { return ColumnNumber; }
30 
32 
33 uint32_t NativeLineNumber::getAddressSection() const { return Section; }
34 
35 uint32_t NativeLineNumber::getAddressOffset() const { return Offset; }
36 
38  return Session.getRVAFromSectOffset(Section, Offset);
39 }
40 
42  return Session.getVAFromSectOffset(Section, Offset);
43 }
44 
45 uint32_t NativeLineNumber::getLength() const { return Length; }
46 
47 uint32_t NativeLineNumber::getSourceFileId() const { return SrcFileId; }
48 
49 uint32_t NativeLineNumber::getCompilandId() const { return CompilandId; }
50 
51 bool NativeLineNumber::isStatement() const { return Line.isStatement(); }
llvm::pdb::NativeLineNumber::getLineNumberEnd
uint32_t getLineNumberEnd() const override
Definition: NativeLineNumber.cpp:25
llvm::pdb::NativeLineNumber::getLineNumber
uint32_t getLineNumber() const override
Definition: NativeLineNumber.cpp:23
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::codeview::LineInfo::isStatement
bool isStatement() const
Definition: Line.h:47
llvm::pdb::NativeSession::getRVAFromSectOffset
uint32_t getRVAFromSectOffset(uint32_t Section, uint32_t Offset) const
Definition: NativeSession.cpp:373
llvm::pdb::NativeLineNumber::getRelativeVirtualAddress
uint32_t getRelativeVirtualAddress() const override
Definition: NativeLineNumber.cpp:37
llvm::pdb::NativeLineNumber::getVirtualAddress
uint64_t getVirtualAddress() const override
Definition: NativeLineNumber.cpp:41
llvm::pdb::NativeSession::getVAFromSectOffset
uint64_t getVAFromSectOffset(uint32_t Section, uint32_t Offset) const
Definition: NativeSession.cpp:389
Offset
uint64_t Offset
Definition: ELFObjHandler.cpp:81
llvm::ARMBuildAttrs::Section
@ Section
Legacy Tags.
Definition: ARMBuildAttributes.h:78
llvm::pdb::NativeLineNumber::getCompilandId
uint32_t getCompilandId() const override
Definition: NativeLineNumber.cpp:49
llvm::pdb::NativeLineNumber::getLength
uint32_t getLength() const override
Definition: NativeLineNumber.cpp:45
llvm::pdb::NativeLineNumber::isStatement
bool isStatement() const override
Definition: NativeLineNumber.cpp:51
llvm::codeview::LineInfo::getStartLine
uint32_t getStartLine() const
Definition: Line.h:39
llvm::pdb::NativeLineNumber::getSourceFileId
uint32_t getSourceFileId() const override
Definition: NativeLineNumber.cpp:47
llvm::pdb
Definition: ConcreteSymbolEnumerator.h:20
uint64_t
llvm::pdb::NativeLineNumber::getAddressOffset
uint32_t getAddressOffset() const override
Definition: NativeLineNumber.cpp:35
llvm::pdb::NativeLineNumber::getColumnNumberEnd
uint32_t getColumnNumberEnd() const override
Definition: NativeLineNumber.cpp:31
uint32_t
llvm::pdb::NativeLineNumber::getAddressSection
uint32_t getAddressSection() const override
Definition: NativeLineNumber.cpp:33
llvm::codeview::LineInfo
Definition: Line.h:21
llvm::pdb::NativeLineNumber::NativeLineNumber
NativeLineNumber(const NativeSession &Session, const codeview::LineInfo Line, uint32_t ColumnNumber, uint32_t Length, uint32_t Section, uint32_t Offset, uint32_t SrcFileId, uint32_t CompilandId)
Definition: NativeLineNumber.cpp:14
llvm::pdb::NativeSession
Definition: NativeSession.h:28
llvm::pdb::NativeLineNumber::getColumnNumber
uint32_t getColumnNumber() const override
Definition: NativeLineNumber.cpp:29
NativeLineNumber.h
llvm::codeview::LineInfo::getEndLine
uint32_t getEndLine() const
Definition: Line.h:45