change more instances of QualType::getCanonicalType to call
ASTContext::getCanonicalType instead (PR2189)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54105 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp
index 08f889a..d5bef07 100644
--- a/lib/AST/Type.cpp
+++ b/lib/AST/Type.cpp
@@ -171,6 +171,11 @@
return getDesugaredType()->getAsFunctionType();
}
+const FunctionTypeProto *Type::getAsFunctionTypeProto() const {
+ return dyn_cast_or_null<FunctionTypeProto>(getAsFunctionType());
+}
+
+
const PointerLikeType *Type::getAsPointerLikeType() const {
// If this is directly a pointer-like type, return it.
if (const PointerLikeType *PTy = dyn_cast<PointerLikeType>(this))