summaryrefslogtreecommitdiffstats
path: root/llvm/lib/TableGen/Record.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2015-06-01 06:44:18 +0000
committerCraig Topper <craig.topper@gmail.com>2015-06-01 06:44:18 +0000
commit6548196c6fe8bdaf0ba2311eb4982f2e9e1160ed (patch)
treee6ca5336dd92db92be484b8ee15ca0c733506ac4 /llvm/lib/TableGen/Record.cpp
parent8eb887fefcd5a11cd35de84cf369d1f9ebb25426 (diff)
downloadbcm5719-llvm-6548196c6fe8bdaf0ba2311eb4982f2e9e1160ed.tar.gz
bcm5719-llvm-6548196c6fe8bdaf0ba2311eb4982f2e9e1160ed.zip
[TableGen] Move a couple virtual methods out of line so vtable anchors can be removed. NFC
llvm-svn: 238727
Diffstat (limited to 'llvm/lib/TableGen/Record.cpp')
-rw-r--r--llvm/lib/TableGen/Record.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/TableGen/Record.cpp b/llvm/lib/TableGen/Record.cpp
index 6c7a66fcba1..3097c4ee33e 100644
--- a/llvm/lib/TableGen/Record.cpp
+++ b/llvm/lib/TableGen/Record.cpp
@@ -88,9 +88,6 @@ DagRecTy DagRecTy::Shared;
void RecTy::dump() const { print(errs()); }
-void StringRecTy::anchor() { }
-void DagRecTy::anchor() { }
-
ListRecTy *RecTy::getListTy() {
if (!ListTy)
ListTy.reset(new ListRecTy(this));
@@ -136,6 +133,9 @@ bool IntRecTy::typeIsConvertibleTo(const RecTy *RHS) const {
return kind==BitRecTyKind || kind==BitsRecTyKind || kind==IntRecTyKind;
}
+std::string StringRecTy::getAsString() const {
+ return "string";
+}
std::string ListRecTy::getAsString() const {
return "list<" + Ty->getAsString() + ">";
@@ -147,6 +147,10 @@ bool ListRecTy::typeIsConvertibleTo(const RecTy *RHS) const {
return false;
}
+std::string DagRecTy::getAsString() const {
+ return "dag";
+}
+
RecordRecTy *RecordRecTy::get(Record *R) {
return dyn_cast<RecordRecTy>(R->getDefInit()->getType());
}
OpenPOWER on IntegriCloud