NativeLineNumber.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- NativeLineNumber.h - Native line number implementation ---*- C++ -*-===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #ifndef LLVM_DEBUGINFO_PDB_NATIVE_NATIVELINENUMBER_H
  14. #define LLVM_DEBUGINFO_PDB_NATIVE_NATIVELINENUMBER_H
  15. #include "llvm/DebugInfo/CodeView/Line.h"
  16. #include "llvm/DebugInfo/PDB/IPDBLineNumber.h"
  17. namespace llvm {
  18. namespace pdb {
  19. class NativeSession;
  20. class NativeLineNumber : public IPDBLineNumber {
  21. public:
  22. explicit NativeLineNumber(const NativeSession &Session,
  23. const codeview::LineInfo Line,
  24. uint32_t ColumnNumber, uint32_t Length,
  25. uint32_t Section, uint32_t Offset,
  26. uint32_t SrcFileId, uint32_t CompilandId);
  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. private:
  40. const NativeSession &Session;
  41. const codeview::LineInfo Line;
  42. uint32_t ColumnNumber;
  43. uint32_t Section;
  44. uint32_t Offset;
  45. uint32_t Length;
  46. uint32_t SrcFileId;
  47. uint32_t CompilandId;
  48. };
  49. } // namespace pdb
  50. } // namespace llvm
  51. #endif
  52. #ifdef __GNUC__
  53. #pragma GCC diagnostic pop
  54. #endif