diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-02-19 07:11:26 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-02-19 07:11:26 +0000 |
commit | 5c275a94fbce930568cecc3aa3f94ae1fe78c67d (patch) | |
tree | e4bd05be13c977742c3f60a7af911c8c8655fb0d /clang | |
parent | 124bb197a7580df57a491ab1f8f766000f492e9d (diff) | |
download | bcm5719-llvm-5c275a94fbce930568cecc3aa3f94ae1fe78c67d.tar.gz bcm5719-llvm-5c275a94fbce930568cecc3aa3f94ae1fe78c67d.zip |
Add Type::getAsFunctionNoProto
llvm-svn: 65031
Diffstat (limited to 'clang')
-rw-r--r-- | clang/include/clang/AST/Type.h | 2 | ||||
-rw-r--r-- | clang/lib/AST/Type.cpp | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/clang/include/clang/AST/Type.h b/clang/include/clang/AST/Type.h index 7554b697e3c..c47b94053eb 100644 --- a/clang/include/clang/AST/Type.h +++ b/clang/include/clang/AST/Type.h @@ -63,6 +63,7 @@ namespace clang { class TypedefType; class TemplateTypeParmType; class FunctionType; + class FunctionTypeNoProto; class FunctionTypeProto; class ExtVectorType; class BuiltinType; @@ -396,6 +397,7 @@ public: // the best type we can. const BuiltinType *getAsBuiltinType() const; const FunctionType *getAsFunctionType() const; + const FunctionTypeNoProto *getAsFunctionTypeNoProto() const; const FunctionTypeProto *getAsFunctionTypeProto() const; const PointerLikeType *getAsPointerLikeType() const; // Pointer or Reference. const PointerType *getAsPointerType() const; diff --git a/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp index 53363c15eca..8032424f782 100644 --- a/clang/lib/AST/Type.cpp +++ b/clang/lib/AST/Type.cpp @@ -216,6 +216,10 @@ const FunctionType *Type::getAsFunctionType() const { return getDesugaredType()->getAsFunctionType(); } +const FunctionTypeNoProto *Type::getAsFunctionTypeNoProto() const { + return dyn_cast_or_null<FunctionTypeNoProto>(getAsFunctionType()); +} + const FunctionTypeProto *Type::getAsFunctionTypeProto() const { return dyn_cast_or_null<FunctionTypeProto>(getAsFunctionType()); } |