Files
pl/include/ir/value.hpp
2025-12-24 18:59:44 +01:00

27 lines
421 B
C++

#pragma once
#include "prelude/string.hpp"
namespace IR
{
class Value
{
public:
Value(unsigned int id) : m_id(id) {}
Value() : m_id(0) {}
public:
StringView Format() const
{
auto sb = StringBuilder();
sb.AppendFormat("%%%d", m_id);
return sb.view();
}
private:
unsigned int m_id;
};
using ValueView = View<Value>;
using ValueBuilder = Builder<Value>;
} // namespace IR