Skip to content

Commit

Permalink
Move dbprint to IR::Vector
Browse files Browse the repository at this point in the history
Signed-off-by: Vladimír Štill <git@vstill.eu>
  • Loading branch information
vlstill committed Oct 7, 2024
1 parent 243f8f0 commit 7661bb5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
9 changes: 0 additions & 9 deletions ir/indexed_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ limitations under the License.
#include "ir/vector.h"
#include "lib/enumerator.h"
#include "lib/error.h"
#include "lib/indent.h"
#include "lib/map.h"
#include "lib/null.h"
#include "lib/safe_vector.h"
Expand Down Expand Up @@ -222,14 +221,6 @@ class IndexedVector : public Vector<T> {
}
}

void dbprint(std::ostream &out) const override {
out << "{" << IndentCtl::indent;
for (auto p : *this) {
out << " " << p;
}
out << IndentCtl::unindent << " }";
}

DECLARE_TYPEINFO_WITH_DISCRIMINATOR(IndexedVector<T>, NodeDiscriminator::IndexedVectorT, T,
Vector<T>);
};
Expand Down
9 changes: 9 additions & 0 deletions ir/vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ limitations under the License.

#include "ir/node.h"
#include "lib/enumerator.h"
#include "lib/indent.h"
#include "lib/null.h"
#include "lib/safe_vector.h"

Expand Down Expand Up @@ -208,6 +209,14 @@ class Vector : public VectorBase {
[](const T *d) { return d != nullptr; });
}

void dbprint(std::ostream &out) const override {
out << "{" << IndentCtl::indent;
for (auto p : *this) {
out << " " << p;
}
out << IndentCtl::unindent << " }";
}

DECLARE_TYPEINFO_WITH_DISCRIMINATOR(Vector<T>, NodeDiscriminator::VectorT, T, VectorBase);
};

Expand Down

0 comments on commit 7661bb5

Please sign in to comment.