diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-12-10 17:19:40 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-12-10 17:19:40 +0000 |
| commit | 8d34e5eb49a953df05f6ea9f5e80d29f6f8b0504 (patch) | |
| tree | 769ecdd00baee0e2c363a919c5ea0ee0325f25e5 | |
| parent | 63d045d560b2bcc0d67f9e39ca7b9f8c34457eb2 (diff) | |
| download | bcm5719-llvm-8d34e5eb49a953df05f6ea9f5e80d29f6f8b0504.tar.gz bcm5719-llvm-8d34e5eb49a953df05f6ea9f5e80d29f6f8b0504.zip | |
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.
llvm-svn: 121495
| -rw-r--r-- | clang/include/clang/AST/CanonicalType.h | 2 | ||||
| -rw-r--r-- | clang/include/clang/AST/Type.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/include/clang/AST/CanonicalType.h b/clang/include/clang/AST/CanonicalType.h index b1962b7b9e4..2d67a39f951 100644 --- a/clang/include/clang/AST/CanonicalType.h +++ b/clang/include/clang/AST/CanonicalType.h @@ -347,7 +347,7 @@ template<typename T> 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> diff --git a/clang/include/clang/AST/Type.h b/clang/include/clang/AST/Type.h index 5c67dd8b4f8..81230b7a54a 100644 --- a/clang/include/clang/AST/Type.h +++ b/clang/include/clang/AST/Type.h @@ -771,7 +771,7 @@ namespace llvm { 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> |

