From: Daniel Dunbar Date: Fri, 9 Mar 2012 01:51:56 +0000 (+0000) Subject: [AST] Type::isVoidType() is trivial and should be inlined. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cd485926f1ffda2eaa9adeea34e1e15c35ab5fba;p=clang [AST] Type::isVoidType() is trivial and should be inlined. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152364 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h index 3176f1909c..7bd367c054 100644 --- a/include/clang/AST/Type.h +++ b/include/clang/AST/Type.h @@ -4816,6 +4816,12 @@ inline bool Type::isNonOverloadPlaceholderType() const { return false; } +inline bool Type::isVoidType() const { + if (const BuiltinType *BT = dyn_cast(CanonicalType)) + return BT->getKind() == BuiltinType::Void; + return false; +} + inline bool Type::isHalfType() const { if (const BuiltinType *BT = dyn_cast(CanonicalType)) return BT->getKind() == BuiltinType::Half; diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index fd8a03fd1a..d9fecd449f 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -309,13 +309,6 @@ const Type *Type::getUnqualifiedDesugaredType() const { } } -/// isVoidType - Helper method to determine if this is the 'void' type. -bool Type::isVoidType() const { - if (const BuiltinType *BT = dyn_cast(CanonicalType)) - return BT->getKind() == BuiltinType::Void; - return false; -} - bool Type::isDerivedType() const { switch (CanonicalType->getTypeClass()) { case Pointer: