[llvm] [TableGen] Only store direct superclasses in Record (PR #123072)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 16 06:28:29 PST 2025


================
@@ -2906,35 +2903,6 @@ void Record::setName(const Init *NewName) {
   // this.  See TGParser::ParseDef and TGParser::ParseDefm.
 }
 
-// NOTE for the next two functions:
-// Superclasses are in post-order, so the final one is a direct
-// superclass. All of its transitive superclases immediately precede it,
-// so we can step through the direct superclasses in reverse order.
----------------
jayfoad wrote:

The part about post-order is important (though I don't think any callers of `getSuperClasses` in LLVM care about it) so I have mentioned it in the doxygen comments.

The part about why this lets you step backwards through the list is no longer relevant since I removed the code that does that.

https://github.com/llvm/llvm-project/pull/123072


More information about the llvm-commits mailing list