From: Craig Topper Date: Wed, 22 Apr 2015 04:18:32 +0000 (+0000) Subject: [TableGen] Make BitRecTy::baseClassOf return true when RHS is an IntRecTy. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=459448abccc55aeabe422b270bcabe6357a34b2e;p=oota-llvm.git [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 --- diff --git a/lib/TableGen/Record.cpp b/lib/TableGen/Record.cpp index 80696822705..c032bc19251 100644 --- a/lib/TableGen/Record.cpp +++ b/lib/TableGen/Record.cpp @@ -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(RHS)) return BitsTy->getNumBits() == 1;