summaryrefslogtreecommitdiff
path: root/utils/TableGen/Record.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-11-22 20:51:34 +0000
committerChris Lattner <sabre@nondot.org>2007-11-22 20:51:34 +0000
commitbf8644ca1fb960e94d14428adbab8277679e2a9d (patch)
tree3cb51b193bd09b88fef424b4687c0f67187e610d /utils/TableGen/Record.h
parentf460165a4c1bf4bc762f9b3f12b9ed284b89cc99 (diff)
downloadllvm-bf8644ca1fb960e94d14428adbab8277679e2a9d.tar.gz
llvm-bf8644ca1fb960e94d14428adbab8277679e2a9d.tar.bz2
llvm-bf8644ca1fb960e94d14428adbab8277679e2a9d.tar.xz
eliminate a bunch of print methods that are duplicate with the getAsString() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44275 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/Record.h')
-rw-r--r--utils/TableGen/Record.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/utils/TableGen/Record.h b/utils/TableGen/Record.h
index c6005c5221..e75bb6267f 100644
--- a/utils/TableGen/Record.h
+++ b/utils/TableGen/Record.h
@@ -63,7 +63,7 @@ struct RecTy {
virtual ~RecTy() {}
virtual std::string getAsString() const = 0;
- virtual void print(std::ostream &OS) const = 0;
+ void print(std::ostream &OS) const { OS << getAsString(); }
void dump() const;
/// typeIsConvertibleTo - Return true if all values of 'this' type can be
@@ -129,7 +129,6 @@ public:
virtual Init *convertValue( FieldInit *FI) { return RecTy::convertValue(FI);}
std::string getAsString() const { return "bit"; }
- void print(std::ostream &OS) const { OS << "bit"; }
bool typeIsConvertibleTo(const RecTy *RHS) const {
return RHS->baseClassOf(this);
@@ -172,7 +171,6 @@ public:
virtual Init *convertValue( FieldInit *FI) { return RecTy::convertValue(FI);}
std::string getAsString() const;
- void print(std::ostream &OS) const { OS << "bits<" << Size << ">"; }
bool typeIsConvertibleTo(const RecTy *RHS) const {
return RHS->baseClassOf(this);
@@ -211,7 +209,6 @@ public:
virtual Init *convertValue( FieldInit *FI) { return RecTy::convertValue(FI);}
std::string getAsString() const { return "int"; }
- void print(std::ostream &OS) const { OS << "int"; }
bool typeIsConvertibleTo(const RecTy *RHS) const {
return RHS->baseClassOf(this);
@@ -248,7 +245,6 @@ public:
virtual Init *convertValue( FieldInit *FI) { return RecTy::convertValue(FI);}
std::string getAsString() const { return "string"; }
- void print(std::ostream &OS) const { OS << "string"; }
bool typeIsConvertibleTo(const RecTy *RHS) const {
return RHS->baseClassOf(this);
@@ -292,7 +288,6 @@ public:
virtual Init *convertValue( FieldInit *FI) { return RecTy::convertValue(FI);}
std::string getAsString() const;
- void print(std::ostream &OS) const;
bool typeIsConvertibleTo(const RecTy *RHS) const {
return RHS->baseClassOf(this);
@@ -330,7 +325,6 @@ public:
virtual Init *convertValue( FieldInit *FI) { return RecTy::convertValue(FI);}
std::string getAsString() const { return "code"; }
- void print(std::ostream &OS) const { OS << "code"; }
bool typeIsConvertibleTo(const RecTy *RHS) const {
return RHS->baseClassOf(this);
@@ -365,7 +359,6 @@ public:
virtual Init *convertValue( FieldInit *FI) { return RecTy::convertValue(FI);}
std::string getAsString() const { return "dag"; }
- void print(std::ostream &OS) const { OS << "dag"; }
bool typeIsConvertibleTo(const RecTy *RHS) const {
return RHS->baseClassOf(this);
@@ -408,7 +401,6 @@ public:
virtual Init *convertValue( FieldInit *FI) { return RecTy::convertValue(FI);}
std::string getAsString() const;
- void print(std::ostream &OS) const;
bool typeIsConvertibleTo(const RecTy *RHS) const {
return RHS->baseClassOf(this);