diff options
author | Chris Lattner <sabre@nondot.org> | 2010-12-13 00:23:57 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-12-13 00:23:57 +0000 |
commit | 67db883487fca3472fdde51e931657e22d4d0495 (patch) | |
tree | 18ad5bbf8c061c1ed7c732a4af1f864fe7206700 /utils/TableGen/Record.cpp | |
parent | 9d6250f52ba4ba0a34d44aa2cc9d3fa14c15a006 (diff) | |
download | llvm-67db883487fca3472fdde51e931657e22d4d0495.tar.gz llvm-67db883487fca3472fdde51e931657e22d4d0495.tar.bz2 llvm-67db883487fca3472fdde51e931657e22d4d0495.tar.xz |
eliminate the Records global variable, patch by Garrison Venn!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121659 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/Record.cpp')
-rw-r--r-- | utils/TableGen/Record.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/utils/TableGen/Record.cpp b/utils/TableGen/Record.cpp index f7a249fd9e..a34618c981 100644 --- a/utils/TableGen/Record.cpp +++ b/utils/TableGen/Record.cpp @@ -528,7 +528,7 @@ Init *UnOpInit::Fold(Record *CurRec, MultiClass *CurMultiClass) { } } - if (Record *D = Records.getDef(Name)) + if (Record *D = (CurRec->getRecords()).getDef(Name)) return new DefInit(D); errs() << "Variable not defined: '" + Name + "'\n"; @@ -1227,14 +1227,14 @@ void RecordVal::print(raw_ostream &OS, bool PrintSem) const { unsigned Record::LastID = 0; void Record::setName(const std::string &Name) { - if (Records.getDef(getName()) == this) { - Records.removeDef(getName()); + if (TrackedRecords.getDef(getName()) == this) { + TrackedRecords.removeDef(getName()); this->Name = Name; - Records.addDef(this); + TrackedRecords.addDef(this); } else { - Records.removeClass(getName()); + TrackedRecords.removeClass(getName()); this->Name = Name; - Records.addClass(this); + TrackedRecords.addClass(this); } } |