NativeInlineSiteSymbol.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- NativeInlineSiteSymbol.h - info about inline sites -------*- 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_NATIVEINLINESITESYMBOL_H
  14. #define LLVM_DEBUGINFO_PDB_NATIVE_NATIVEINLINESITESYMBOL_H
  15. #include "llvm/DebugInfo/CodeView/CodeView.h"
  16. #include "llvm/DebugInfo/CodeView/SymbolRecord.h"
  17. #include "llvm/DebugInfo/PDB/Native/NativeRawSymbol.h"
  18. #include "llvm/DebugInfo/PDB/Native/NativeSession.h"
  19. namespace llvm {
  20. namespace pdb {
  21. class NativeInlineSiteSymbol : public NativeRawSymbol {
  22. public:
  23. NativeInlineSiteSymbol(NativeSession &Session, SymIndexId Id,
  24. const codeview::InlineSiteSym &Sym,
  25. uint64_t ParentAddr);
  26. ~NativeInlineSiteSymbol() override;
  27. void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields,
  28. PdbSymbolIdField RecurseIdFields) const override;
  29. std::string getName() const override;
  30. std::unique_ptr<IPDBEnumLineNumbers>
  31. findInlineeLinesByVA(uint64_t VA, uint32_t Length) const override;
  32. private:
  33. const codeview::InlineSiteSym Sym;
  34. uint64_t ParentAddr;
  35. void getLineOffset(uint32_t OffsetInFunc, uint32_t &LineOffset,
  36. uint32_t &FileOffset) const;
  37. };
  38. } // namespace pdb
  39. } // namespace llvm
  40. #endif // LLVM_DEBUGINFO_PDB_NATIVE_NATIVEINLINESITESYMBOL_H
  41. #ifdef __GNUC__
  42. #pragma GCC diagnostic pop
  43. #endif