[cfe-commits] r152364 - in /cfe/trunk: include/clang/AST/Type.h lib/AST/Type.cpp
Daniel Dunbar
daniel at zuster.org
Thu Mar 8 17:51:57 PST 2012
Author: ddunbar
Date: Thu Mar 8 19:51:56 2012
New Revision: 152364
URL: http://llvm.org/viewvc/llvm-project?rev=152364&view=rev
Log:
[AST] Type::isVoidType() is trivial and should be inlined.
Modified:
cfe/trunk/include/clang/AST/Type.h
cfe/trunk/lib/AST/Type.cpp
Modified: cfe/trunk/include/clang/AST/Type.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Type.h?rev=152364&r1=152363&r2=152364&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Type.h (original)
+++ cfe/trunk/include/clang/AST/Type.h Thu Mar 8 19:51:56 2012
@@ -4816,6 +4816,12 @@
return false;
}
+inline bool Type::isVoidType() const {
+ if (const BuiltinType *BT = dyn_cast<BuiltinType>(CanonicalType))
+ return BT->getKind() == BuiltinType::Void;
+ return false;
+}
+
inline bool Type::isHalfType() const {
if (const BuiltinType *BT = dyn_cast<BuiltinType>(CanonicalType))
return BT->getKind() == BuiltinType::Half;
Modified: cfe/trunk/lib/AST/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Type.cpp?rev=152364&r1=152363&r2=152364&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Type.cpp (original)
+++ cfe/trunk/lib/AST/Type.cpp Thu Mar 8 19:51:56 2012
@@ -309,13 +309,6 @@
}
}
-/// isVoidType - Helper method to determine if this is the 'void' type.
-bool Type::isVoidType() const {
- if (const BuiltinType *BT = dyn_cast<BuiltinType>(CanonicalType))
- return BT->getKind() == BuiltinType::Void;
- return false;
-}
-
bool Type::isDerivedType() const {
switch (CanonicalType->getTypeClass()) {
case Pointer:
More information about the cfe-commits
mailing list