DxcPixLiveVariables_FragmentIterator.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // //
  3. // DxcPixLiveVariables_FragmentIterator.h //
  4. // Copyright (C) Microsoft Corporation. All rights reserved. //
  5. // This file is distributed under the University of Illinois Open Source //
  6. // License. See LICENSE.TXT for details. //
  7. // //
  8. // Declares the FragmentIterator API. This API is used to traverse //
  9. // DIVariables and assign alloca registers to DIBasicTypes. //
  10. // //
  11. ///////////////////////////////////////////////////////////////////////////////
  12. #pragma once
  13. #include <memory>
  14. namespace llvm
  15. {
  16. class AllocaInst;
  17. class DataLayout;
  18. class DbgDeclareInst;
  19. class DIExpression;
  20. } // namespace llvm
  21. namespace dxil_debug_info
  22. {
  23. class MemberIterator
  24. {
  25. public:
  26. virtual ~MemberIterator() = default;
  27. virtual bool Next(unsigned *Index) = 0;
  28. virtual unsigned SizeInBits(unsigned Index) const = 0;
  29. virtual unsigned OffsetInBits(unsigned Index) = 0;
  30. };
  31. std::unique_ptr<MemberIterator> CreateMemberIterator
  32. (
  33. llvm::DbgDeclareInst *DbgDeclare,
  34. const llvm::DataLayout &DataLayout,
  35. llvm::AllocaInst *Alloca,
  36. llvm::DIExpression *Expression
  37. );
  38. } // namespace dxil_debug_info