RemoveBufferBlockVisitor.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. //===--- RemoveBufferBlockVisitor.h - RemoveBufferBlock Visitor --*- C++ -*-==//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is distributed under the University of Illinois Open Source
  6. // License. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. #ifndef LLVM_CLANG_LIB_SPIRV_REMOVEBUFFERBLOCKVISITOR_H
  10. #define LLVM_CLANG_LIB_SPIRV_REMOVEBUFFERBLOCKVISITOR_H
  11. #include "clang/SPIRV/SpirvVisitor.h"
  12. namespace clang {
  13. namespace spirv {
  14. class SpirvContext;
  15. class RemoveBufferBlockVisitor : public Visitor {
  16. public:
  17. RemoveBufferBlockVisitor(SpirvContext &spvCtx,
  18. const SpirvCodeGenOptions &opts)
  19. : Visitor(opts, spvCtx) {}
  20. bool visit(SpirvModule *, Phase);
  21. /// The "sink" visit function for all instructions.
  22. ///
  23. /// By default, all other visit instructions redirect to this visit function.
  24. /// So that you want override this visit function to handle all instructions,
  25. /// regardless of their polymorphism.
  26. bool visitInstruction(SpirvInstruction *instr);
  27. };
  28. } // end namespace spirv
  29. } // end namespace clang
  30. #endif // LLVM_CLANG_LIB_SPIRV_REMOVEBUFFERBLOCKVISITOR_H