32 const IR::Node *postorder(IR::Constant *constant)
override {
37 const IR::Type *type = constant->type;
38 if (type->is<IR::Type_Bits>()) {
39 type = constant->type->clone();
40 }
else if (
auto ii = type->to<IR::Type_InfInt>()) {
43 type = IR::Type_InfInt::get(ii->srcInfo);
45 BUG(
"unexpected type %2% for constant %2%", type, constant);
47 return new IR::Constant(constant->srcInfo, type, constant->value, constant->base);
49 static const IR::Expression *clone(
const IR::Expression *expression) {
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24