aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Type.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AST/Type.cpp')
-rw-r--r--lib/AST/Type.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp
index 08f889a4bf..d5bef07ca9 100644
--- a/lib/AST/Type.cpp
+++ b/lib/AST/Type.cpp
@@ -171,6 +171,11 @@ const FunctionType *Type::getAsFunctionType() const {
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))