[cfe-commits] r121495 - in /cfe/trunk/include/clang/AST: CanonicalType.h Type.h
Douglas Gregor
dgregor at apple.com
Fri Dec 10 09:19:40 PST 2010
Author: dgregor
Date: Fri Dec 10 11:19:40 2010
New Revision: 121495
URL: http://llvm.org/viewvc/llvm-project?rev=121495&view=rev
Log:
Replace two QualType::getTypePtrOrNull() calls with
QualType::getTypePtr(). It turns out that
cast_or_null/dyn_cast_or_null don't actually use simplify_type, so
they're guaranteed to operator on non-NULL QualType or CanQualType
objects.
Good for a 0.6% win on 403.gcc's combine.c with -emit-llvm.
Modified:
cfe/trunk/include/clang/AST/CanonicalType.h
cfe/trunk/include/clang/AST/Type.h
Modified: cfe/trunk/include/clang/AST/CanonicalType.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/CanonicalType.h?rev=121495&r1=121494&r2=121495&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/CanonicalType.h (original)
+++ cfe/trunk/include/clang/AST/CanonicalType.h Fri Dec 10 11:19:40 2010
@@ -347,7 +347,7 @@
struct simplify_type<const ::clang::CanQual<T> > {
typedef T* SimpleType;
static SimpleType getSimplifiedValue(const ::clang::CanQual<T> &Val) {
- return Val.getTypePtrOrNull();
+ return Val.getTypePtr();
}
};
template<typename T>
Modified: cfe/trunk/include/clang/AST/Type.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Type.h?rev=121495&r1=121494&r2=121495&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Type.h (original)
+++ cfe/trunk/include/clang/AST/Type.h Fri Dec 10 11:19:40 2010
@@ -771,7 +771,7 @@
template<> struct simplify_type<const ::clang::QualType> {
typedef ::clang::Type* SimpleType;
static SimpleType getSimplifiedValue(const ::clang::QualType &Val) {
- return Val.getTypePtrOrNull();
+ return Val.getTypePtr();
}
};
template<> struct simplify_type< ::clang::QualType>
More information about the cfe-commits
mailing list