1 //===- NativeLineNumber.h - 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 
9 #ifndef LLVM_DEBUGINFO_PDB_NATIVE_NATIVELINENUMBER_H
10 #define LLVM_DEBUGINFO_PDB_NATIVE_NATIVELINENUMBER_H
11 
12 #include "llvm/ADT/Optional.h"
13 #include "llvm/DebugInfo/CodeView/Line.h"
14 #include "llvm/DebugInfo/PDB/IPDBLineNumber.h"
15 #include "llvm/DebugInfo/PDB/Native/NativeSession.h"
16 
17 namespace llvm {
18 namespace pdb {
19 class NativeLineNumber : public IPDBLineNumber {
20 public:
21   explicit NativeLineNumber(const NativeSession &Session,
22                             const codeview::LineInfo Line,
23                             uint32_t ColumnNumber, uint32_t Length,
24                             uint32_t Section, uint32_t Offset,
25                             uint32_t SrcFileId);
26 
27   uint32_t getLineNumber() const override;
28   uint32_t getLineNumberEnd() const override;
29   uint32_t getColumnNumber() const override;
30   uint32_t getColumnNumberEnd() const override;
31   uint32_t getAddressSection() const override;
32   uint32_t getAddressOffset() const override;
33   uint32_t getRelativeVirtualAddress() const override;
34   uint64_t getVirtualAddress() const override;
35   uint32_t getLength() const override;
36   uint32_t getSourceFileId() const override;
37   uint32_t getCompilandId() const override;
38   bool isStatement() const override;
39 
40 private:
41   const NativeSession &Session;
42   const codeview::LineInfo Line;
43   uint32_t ColumnNumber;
44   uint32_t Section;
45   uint32_t Offset;
46   uint32_t Length;
47   uint32_t SrcFileId;
48 };
49 } // namespace pdb
50 } // namespace llvm
51 #endif
52