/* * Copyright (c) 2021, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace JS::Bytecode { class Label { public: explicit Label(BasicBlock const& block) : m_block(&block) { } auto& block() const { return *m_block; } private: BasicBlock const* m_block { nullptr }; }; } template<> struct AK::Formatter : AK::Formatter { void format(FormatBuilder& builder, JS::Bytecode::Label const& value) { return AK::Formatter::format(builder, "@{}", value.block().name()); } };