Skip to content

Commit

Permalink
[TableGen] Remove BitsRecTy::typeIsA override. NFC
Browse files Browse the repository at this point in the history
BitsRecTy objects are uniqued based on size. If the sizes are equal, then
the BitsRecTy objects are the same objects. We can use the base class
implementation that checks for pointer equality.
  • Loading branch information
topperc committed Apr 20, 2023
1 parent 170475c commit 4a17ded
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions llvm/include/llvm/TableGen/Record.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ class BitsRecTy : public RecTy {
std::string getAsString() const override;

bool typeIsConvertibleTo(const RecTy *RHS) const override;

bool typeIsA(const RecTy *RHS) const override;
};

/// 'int' - Represent an integer value of no particular size
Expand Down
6 changes: 0 additions & 6 deletions llvm/lib/TableGen/Record.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,6 @@ bool BitsRecTy::typeIsConvertibleTo(const RecTy *RHS) const {
return (kind == BitRecTyKind && Size == 1) || (kind == IntRecTyKind);
}

bool BitsRecTy::typeIsA(const RecTy *RHS) const {
if (const BitsRecTy *RHSb = dyn_cast<BitsRecTy>(RHS))
return RHSb->Size == Size;
return false;
}

IntRecTy *IntRecTy::get(RecordKeeper &RK) {
return &RK.getImpl().SharedIntRecTy;
}
Expand Down

0 comments on commit 4a17ded

Please sign in to comment.