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