Jlm
Loading...
Searching...
No Matches
UnitType.cpp
Go to the documentation of this file.
2
3namespace jlm::rvsdg
4{
5
7
8std::string
9UnitType::debug_string() const
10{
11 return "Unit";
12}
13
14bool
15UnitType::operator==(const Type & other) const noexcept
16{
17 return dynamic_cast<const UnitType *>(&other) != nullptr;
18}
19
20std::size_t
22{
23 return typeid(UnitType).hash_code();
24}
25
31
32std::shared_ptr<const UnitType>
34{
35 static const UnitType instance;
36 return std::shared_ptr<const UnitType>(std::shared_ptr<void>(), &instance);
37}
38
39}
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
bool operator==(const Type &other) const noexcept override
Definition UnitType.cpp:15
static std::shared_ptr< const UnitType > Create()
Definition UnitType.cpp:33
TypeKind
The kinds of types supported in rvsdg.
Definition type.hpp:22
@ Value
Designate a value type.
NodeType * TryGetOwnerNode(const rvsdg::Input &input) noexcept
Checks if this is an input to a node of specified type.
Definition node.hpp:872