NativeFunctionSymbol.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- NativeFunctionSymbol.h - info about function symbols -----*- 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_NATIVEFUNCTIONSYMBOL_H
  14. #define LLVM_DEBUGINFO_PDB_NATIVE_NATIVEFUNCTIONSYMBOL_H
  15. #include "llvm/DebugInfo/CodeView/SymbolRecord.h"
  16. #include "llvm/DebugInfo/PDB/IPDBRawSymbol.h"
  17. #include "llvm/DebugInfo/PDB/Native/NativeRawSymbol.h"
  18. #include "llvm/DebugInfo/PDB/PDBTypes.h"
  19. namespace llvm {
  20. class raw_ostream;
  21. namespace pdb {
  22. class NativeSession;
  23. class NativeFunctionSymbol : public NativeRawSymbol {
  24. public:
  25. NativeFunctionSymbol(NativeSession &Session, SymIndexId Id,
  26. const codeview::ProcSym &Sym, uint32_t RecordOffset);
  27. ~NativeFunctionSymbol() override;
  28. void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields,
  29. PdbSymbolIdField RecurseIdFields) const override;
  30. uint32_t getAddressOffset() const override;
  31. uint32_t getAddressSection() const override;
  32. std::string getName() const override;
  33. uint64_t getLength() const override;
  34. uint32_t getRelativeVirtualAddress() const override;
  35. uint64_t getVirtualAddress() const override;
  36. std::unique_ptr<IPDBEnumSymbols>
  37. findInlineFramesByVA(uint64_t VA) const override;
  38. protected:
  39. const codeview::ProcSym Sym;
  40. uint32_t RecordOffset = 0;
  41. };
  42. } // namespace pdb
  43. } // namespace llvm
  44. #endif // LLVM_DEBUGINFO_PDB_NATIVE_NATIVEFUNCTIONSYMBOL_H
  45. #ifdef __GNUC__
  46. #pragma GCC diagnostic pop
  47. #endif