Skip to content

Commit

Permalink
[AST] Simplify Type::isSizelessBuiltinType(). NFC.
Browse files Browse the repository at this point in the history
Reuse isSVESizelessBuiltinType() and isRVVSizelessBuiltinType().

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D156686
  • Loading branch information
tclin914 committed Aug 2, 2023
1 parent 5cb2a78 commit 1c10667
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions clang/lib/AST/Type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2353,14 +2353,11 @@ bool Type::isIncompleteType(NamedDecl **Def) const {
}

bool Type::isSizelessBuiltinType() const {
if (isSVESizelessBuiltinType() || isRVVSizelessBuiltinType())
return true;

if (const BuiltinType *BT = getAs<BuiltinType>()) {
switch (BT->getKind()) {
// SVE Types
#define SVE_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
#include "clang/Basic/AArch64SVEACLETypes.def"
#define RVV_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
#include "clang/Basic/RISCVVTypes.def"
return true;
// WebAssembly reference types
#define WASM_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
#include "clang/Basic/WebAssemblyReferenceTypes.def"
Expand Down

0 comments on commit 1c10667

Please sign in to comment.