NativeFunctionSymbol.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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/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 NativeFunctionSymbol : public NativeRawSymbol {
  22. public:
  23. NativeFunctionSymbol(NativeSession &Session, SymIndexId Id,
  24. const codeview::ProcSym &Sym, uint32_t RecordOffset);
  25. ~NativeFunctionSymbol() override;
  26. void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields,
  27. PdbSymbolIdField RecurseIdFields) const override;
  28. uint32_t getAddressOffset() const override;
  29. uint32_t getAddressSection() const override;
  30. std::string getName() const override;
  31. uint64_t getLength() const override;
  32. uint32_t getRelativeVirtualAddress() const override;
  33. uint64_t getVirtualAddress() const override;
  34. std::unique_ptr<IPDBEnumSymbols>
  35. findInlineFramesByVA(uint64_t VA) const override;
  36. protected:
  37. const codeview::ProcSym Sym;
  38. uint32_t RecordOffset = 0;
  39. };
  40. } // namespace pdb
  41. } // namespace llvm
  42. #endif // LLVM_DEBUGINFO_PDB_NATIVE_NATIVEFUNCTIONSYMBOL_H
  43. #ifdef __GNUC__
  44. #pragma GCC diagnostic pop
  45. #endif