#include #include #include std::ostream &operator<<(std::ostream &os, const willow::Value &v) { using willow::ValueKind; auto ty = v.getType(); if (!v.isVoid()) os << ty << " "; switch (v.getValueKind()) { case ValueKind::Parameter: [[fallthrough]]; case ValueKind::Instruction: { return os << "%" << v.getName(); } case ValueKind::BasicBlock: { return os << "^" << v.getName(); } case ValueKind::Function: { return os << "@" << v.getName(); } case ValueKind::Constant: { return os << *static_cast(&v); } } }