[llvm-branch-commits] [TableGen] Slightly improve error location for a fatal error (PR #170790)

Alexander Richardson via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Dec 5 09:27:54 PST 2025


================
@@ -1316,11 +1316,18 @@ CodeGenRegBank::getOrCreateSubClass(const CodeGenRegisterClass *RC,
   return {&RegClasses.back(), true};
 }
 
-CodeGenRegisterClass *CodeGenRegBank::getRegClass(const Record *Def) const {
+CodeGenRegisterClass *CodeGenRegBank::getRegClass(const Record *Def,
----------------
arichardson wrote:

Do you mean add an `assert(Def->isSubclassOf("RegisterClassLike"))` inside this function? It can't be RegisterClass yet since there are too many callers that don't correctly check yet. In the future that could be "RegisterClass" once all callers have been updated to avoid assertions.

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


More information about the llvm-branch-commits mailing list