don't print unamed symbolic types
MODIFY
ir/type.cpp
ir/type.cpp
@@ -224,9 +224,9 @@ void VectorType::print(ostream &os) const {
}
-SymbolicType::SymbolicType(string &&name)
+SymbolicType::SymbolicType(string &&name, bool named)
: Type(string(name)), i(string(name)), f(string(name)), p(string(name)),
- a(string(name)), v(string(name)) {}
+ a(string(name)), v(string(name)), named(named) {}
unsigned SymbolicType::bits() const {
switch (typ) {
@@ -304,7 +304,7 @@ expr SymbolicType::enforceIntOrPtrOrVectorType() const {
}
void SymbolicType::print(ostream &os) const {
- if (!name.empty()) {
+ if (named) {
os << name;
return;
}

MODIFY
ir/type.h
ir/type.h
@@ -125,9 +125,10 @@ private:
PtrType p;
ArrayType a;
VectorType v;
+ bool named;
public:
- SymbolicType(std::string &&name);
+ SymbolicType(std::string &&name, bool named = false);
unsigned bits() const override;
smt::expr getTypeConstraints() const override;
smt::expr operator==(const Type &rhs) const;

don't print unamed symbolic types