[llvm-branch-commits] [cfe-branch] r122480 - in /cfe/branches/Apple/whitney/include/clang/AST: CanonicalType.h Type.h
Daniel Dunbar
daniel at zuster.org
Wed Dec 22 21:40:24 PST 2010
Author: ddunbar
Date: Wed Dec 22 23:40:24 2010
New Revision: 122480
URL: http://llvm.org/viewvc/llvm-project?rev=122480&view=rev
Log:
Merge r121495:
--
Author: Douglas Gregor <dgregor at apple.com>
Date: Fri Dec 10 17:19:40 2010 +0000
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/branches/Apple/whitney/include/clang/AST/CanonicalType.h
cfe/branches/Apple/whitney/include/clang/AST/Type.h
Modified: cfe/branches/Apple/whitney/include/clang/AST/CanonicalType.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/include/clang/AST/CanonicalType.h?rev=122480&r1=122479&r2=122480&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/include/clang/AST/CanonicalType.h (original)
+++ cfe/branches/Apple/whitney/include/clang/AST/CanonicalType.h Wed Dec 22 23:40:24 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/branches/Apple/whitney/include/clang/AST/Type.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/include/clang/AST/Type.h?rev=122480&r1=122479&r2=122480&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/include/clang/AST/Type.h (original)
+++ cfe/branches/Apple/whitney/include/clang/AST/Type.h Wed Dec 22 23:40:24 2010
@@ -745,7 +745,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 llvm-branch-commits
mailing list