mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
TableGen: delete no-op code
This does nothing but remove the Record from the map, and then re-add it, without actually changing it in between. The Record's Name used to be changed before re-adding it when the code was first committed in r137232, but the name-changing lines were removed in r142510, and since then this code seems to do nothing. This was also the only caller of removeClass or removeDef, so now RecordKeeper owns its Records unconditionally, and could be unique_ptr-ified. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216349 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
025ab7fe60
commit
d52b1d08df
@ -1684,19 +1684,6 @@ public:
|
||||
assert(Ins && "Record already exists");
|
||||
}
|
||||
|
||||
/// removeClass - Remove, but do not delete, the specified record.
|
||||
///
|
||||
void removeClass(const std::string &Name) {
|
||||
assert(Classes.count(Name) && "Class does not exist!");
|
||||
Classes.erase(Name);
|
||||
}
|
||||
/// removeDef - Remove, but do not delete, the specified record.
|
||||
///
|
||||
void removeDef(const std::string &Name) {
|
||||
assert(Defs.count(Name) && "Def does not exist!");
|
||||
Defs.erase(Name);
|
||||
}
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
// High-level helper methods, useful for tablegen backends...
|
||||
|
||||
|
@ -1708,13 +1708,6 @@ const std::string &Record::getName() const {
|
||||
}
|
||||
|
||||
void Record::setName(Init *NewName) {
|
||||
if (TrackedRecords.getDef(Name->getAsUnquotedString()) == this) {
|
||||
TrackedRecords.removeDef(Name->getAsUnquotedString());
|
||||
TrackedRecords.addDef(this);
|
||||
} else if (TrackedRecords.getClass(Name->getAsUnquotedString()) == this) {
|
||||
TrackedRecords.removeClass(Name->getAsUnquotedString());
|
||||
TrackedRecords.addClass(this);
|
||||
} // Otherwise this isn't yet registered.
|
||||
Name = NewName;
|
||||
checkName();
|
||||
// DO NOT resolve record values to the name at this point because
|
||||
|
Loading…
Reference in New Issue
Block a user