LLVM  15.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 
11 
12 using namespace llvm;
13 using namespace llvm::pdb;
14 
16  const codeview::LineInfo Line,
17  uint32_t ColumnNumber, uint32_t Section,
18  uint32_t Offset, uint32_t Length,
19  uint32_t SrcFileId, uint32_t CompilandId)
20  : Session(Session), Line(Line), ColumnNumber(ColumnNumber),
21  Section(Section), Offset(Offset), Length(Length), SrcFileId(SrcFileId),
22  CompilandId(CompilandId) {}
23 
25 
27  return Line.getEndLine();
28 }
29 
30 uint32_t NativeLineNumber::getColumnNumber() const { return ColumnNumber; }
31 
33 
34 uint32_t NativeLineNumber::getAddressSection() const { return Section; }
35 
36 uint32_t NativeLineNumber::getAddressOffset() const { return Offset; }
37 
39  return Session.getRVAFromSectOffset(Section, Offset);
40 }
41 
43  return Session.getVAFromSectOffset(Section, Offset);
44 }
45 
46 uint32_t NativeLineNumber::getLength() const { return Length; }
47 
48 uint32_t NativeLineNumber::getSourceFileId() const { return SrcFileId; }
49 
50 uint32_t NativeLineNumber::getCompilandId() const { return CompilandId; }
51 
52 bool NativeLineNumber::isStatement() const { return Line.isStatement(); }
llvm::pdb::NativeLineNumber::getLineNumberEnd
uint32_t getLineNumberEnd() const override
Definition: NativeLineNumber.cpp:26
llvm::pdb::NativeLineNumber::getLineNumber
uint32_t getLineNumber() const override
Definition: NativeLineNumber.cpp:24
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::codeview::LineInfo::isStatement
bool isStatement() const
Definition: Line.h:46
llvm::pdb::NativeSession::getRVAFromSectOffset
uint32_t getRVAFromSectOffset(uint32_t Section, uint32_t Offset) const
Definition: NativeSession.cpp:381
llvm::pdb::NativeLineNumber::getRelativeVirtualAddress
uint32_t getRelativeVirtualAddress() const override
Definition: NativeLineNumber.cpp:38
llvm::pdb::NativeLineNumber::getVirtualAddress
uint64_t getVirtualAddress() const override
Definition: NativeLineNumber.cpp:42
llvm::pdb::NativeSession::getVAFromSectOffset
uint64_t getVAFromSectOffset(uint32_t Section, uint32_t Offset) const
Definition: NativeSession.cpp:397
llvm::pdb::NativeLineNumber::getCompilandId
uint32_t getCompilandId() const override
Definition: NativeLineNumber.cpp:50
llvm::pdb::NativeLineNumber::getLength
uint32_t getLength() const override
Definition: NativeLineNumber.cpp:46
llvm::pdb::NativeLineNumber::isStatement
bool isStatement() const override
Definition: NativeLineNumber.cpp:52
llvm::codeview::LineInfo::getStartLine
uint32_t getStartLine() const
Definition: Line.h:38
llvm::pdb::NativeLineNumber::getSourceFileId
uint32_t getSourceFileId() const override
Definition: NativeLineNumber.cpp:48
llvm::pdb
Definition: ConcreteSymbolEnumerator.h:20
uint64_t
llvm::pdb::NativeLineNumber::getAddressOffset
uint32_t getAddressOffset() const override
Definition: NativeLineNumber.cpp:36
llvm::pdb::NativeLineNumber::getColumnNumberEnd
uint32_t getColumnNumberEnd() const override
Definition: NativeLineNumber.cpp:32
uint32_t
llvm::pdb::NativeLineNumber::getAddressSection
uint32_t getAddressSection() const override
Definition: NativeLineNumber.cpp:34
llvm::codeview::LineInfo
Definition: Line.h:20
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:15
llvm::pdb::NativeSession
Definition: NativeSession.h:32
llvm::pdb::NativeLineNumber::getColumnNumber
uint32_t getColumnNumber() const override
Definition: NativeLineNumber.cpp:30
NativeLineNumber.h
llvm::codeview::LineInfo::getEndLine
uint32_t getEndLine() const
Definition: Line.h:44
NativeSession.h