[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235477 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper 2015-04-22 04:18:32 +00:00
parent aee08e5bac
commit 459448abcc

View File

@ -133,7 +133,7 @@ Init *BitRecTy::convertValue(TypedInit *VI) {
}
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;