aboutsummaryrefslogtreecommitdiffstats
path: root/utils/TableGen/Record.cpp
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2009-04-24 16:55:41 +0000
committerDavid Greene <greened@obbligato.org>2009-04-24 16:55:41 +0000
commite3269dd16462e1dd40a5dd7a32045657aa2f16f3 (patch)
treee6b18f83f4e8efce6b3b11b73c3eec31327a4477 /utils/TableGen/Record.cpp
parentdb994cc3a132e6c9d544dc0c163d0749b169023e (diff)
downloadexternal_llvm-e3269dd16462e1dd40a5dd7a32045657aa2f16f3.zip
external_llvm-e3269dd16462e1dd40a5dd7a32045657aa2f16f3.tar.gz
external_llvm-e3269dd16462e1dd40a5dd7a32045657aa2f16f3.tar.bz2
Fix multiclass inheritance to limit value resolution to new defs added
by base multiclasses. Do not attempt to alter defs from previous base multiclasses. This fixes multiple multiclass inheritance. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69974 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/Record.cpp')
-rw-r--r--utils/TableGen/Record.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/utils/TableGen/Record.cpp b/utils/TableGen/Record.cpp
index 9ce645d..2e64c83 100644
--- a/utils/TableGen/Record.cpp
+++ b/utils/TableGen/Record.cpp
@@ -1060,6 +1060,20 @@ std::string Record::getValueAsCode(const std::string &FieldName) const {
}
+void MultiClass::dump() const {
+ cerr << "Record:\n";
+ Rec.dump();
+
+ cerr << "Defs:\n";
+ for (RecordVector::const_iterator r = DefPrototypes.begin(),
+ rend = DefPrototypes.end();
+ r != rend;
+ ++r) {
+ (*r)->dump();
+ }
+}
+
+
void RecordKeeper::dump() const { cerr << *this; }
std::ostream &llvm::operator<<(std::ostream &OS, const RecordKeeper &RK) {