NativeEnumGlobals.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //==- NativeEnumGlobals.h - Native Global Enumerator impl --------*- 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_NATIVEENUMGLOBALS_H
  14. #define LLVM_DEBUGINFO_PDB_NATIVE_NATIVEENUMGLOBALS_H
  15. #include "llvm/DebugInfo/CodeView/CodeView.h"
  16. #include "llvm/DebugInfo/PDB/IPDBEnumChildren.h"
  17. #include "llvm/DebugInfo/PDB/PDBSymbol.h"
  18. #include <vector>
  19. namespace llvm {
  20. namespace pdb {
  21. class NativeSession;
  22. class NativeEnumGlobals : public IPDBEnumChildren<PDBSymbol> {
  23. public:
  24. NativeEnumGlobals(NativeSession &Session,
  25. std::vector<codeview::SymbolKind> Kinds);
  26. uint32_t getChildCount() const override;
  27. std::unique_ptr<PDBSymbol> getChildAtIndex(uint32_t Index) const override;
  28. std::unique_ptr<PDBSymbol> getNext() override;
  29. void reset() override;
  30. private:
  31. std::vector<uint32_t> MatchOffsets;
  32. uint32_t Index;
  33. NativeSession &Session;
  34. };
  35. } // namespace pdb
  36. } // namespace llvm
  37. #endif
  38. #ifdef __GNUC__
  39. #pragma GCC diagnostic pop
  40. #endif