[llvm] [TableGen] Only store direct superclasses in Record (PR #123072)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 15 09:10:55 PST 2025
================
@@ -1718,15 +1719,23 @@ class Record {
ArrayRef<AssertionInfo> getAssertions() const { return Assertions; }
ArrayRef<DumpInfo> getDumps() const { return Dumps; }
- ArrayRef<std::pair<const Record *, SMRange>> getSuperClasses() const {
- return SuperClasses;
+ void getSuperClasses(
----------------
s-barannikov wrote:
It should return by value. No callers append to the vector after the call, but may forget to free it before reusing.
This would also simplify most call sites.
https://github.com/llvm/llvm-project/pull/123072
More information about the llvm-commits
mailing list