[TableGen] Make BitRecTy::baseClassOf return true when RHS is an IntRecTy.
Previously the code was accidentally checking if 'this' was an IntRecTy which it can't be since 'this' is a BitRecTy. Looking back at the history it appears it was intended to check RHS.
llvm-svn: 235477
diff --git a/llvm/lib/TableGen/Record.cpp b/llvm/lib/TableGen/Record.cpp
index 8069682..c032bc1 100644
--- a/llvm/lib/TableGen/Record.cpp
+++ b/llvm/lib/TableGen/Record.cpp
@@ -133,7 +133,7 @@
}
bool BitRecTy::baseClassOf(const RecTy *RHS) const{
- if(RecTy::baseClassOf(RHS) || getRecTyKind() == IntRecTyKind)
+ if(RecTy::baseClassOf(RHS) || RHS->getRecTyKind() == IntRecTyKind)
return true;
if(const BitsRecTy *BitsTy = dyn_cast<BitsRecTy>(RHS))
return BitsTy->getNumBits() == 1;