Jlm
UnitType.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2025 Helge Bahmann <hcb@chaoticmind.net>
3  * See COPYING for terms of redistribution.
4  */
5 
6 #ifndef JLM_RVSDG_UNITTYPE_HPP
7 #define JLM_RVSDG_UNITTYPE_HPP
8 
9 #include <jlm/rvsdg/type.hpp>
10 
11 namespace jlm::rvsdg
12 {
13 
23 class UnitType final : public Type
24 {
25 public:
26  ~UnitType() noexcept override;
27 
28  std::string
29  debug_string() const override;
30 
31  bool
32  operator==(const Type & other) const noexcept override;
33 
34  std::size_t
35  ComputeHash() const noexcept override;
36 
37  TypeKind
38  Kind() const noexcept override;
39 
40  static std::shared_ptr<const UnitType>
41  Create();
42 };
43 
44 }
45 
46 #endif
Unit type (type carrying no information)
Definition: UnitType.hpp:24
~UnitType() noexcept override
std::size_t ComputeHash() const noexcept override
Definition: UnitType.cpp:21
TypeKind Kind() const noexcept override
Return the kind of this type.
Definition: UnitType.cpp:27
std::string debug_string() const override
Definition: UnitType.cpp:9
static std::shared_ptr< const UnitType > Create()
Definition: UnitType.cpp:33
TypeKind
The kinds of types supported in rvsdg.
Definition: type.hpp:22