diff options
author | Chris Lattner <sabre@nondot.org> | 2008-04-06 23:09:52 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-04-06 23:09:52 +0000 |
commit | d8bdba5d3534b87cae606d559933bc62752e8828 (patch) | |
tree | 6527a6cad79834d4c86eb2546597961f2147bf50 /lib/AST/Decl.cpp | |
parent | f52ab250ff92bc51a9ac9a8e19bd43b63a5f844f (diff) |
remove a use of getCanonicalType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49294 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r-- | lib/AST/Decl.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index d97e0b33e5..e27015b7ef 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -368,9 +368,10 @@ FunctionDecl::~FunctionDecl() { } unsigned FunctionDecl::getNumParams() const { - if (isa<FunctionTypeNoProto>(getCanonicalType())) + const FunctionType *FT = getType()->getAsFunctionType(); + if (isa<FunctionTypeNoProto>(FT)) return 0; - return cast<FunctionTypeProto>(getCanonicalType())->getNumArgs(); + return cast<FunctionTypeProto>(FT)->getNumArgs(); } void FunctionDecl::setParams(ParmVarDecl **NewParamInfo, unsigned NumParams) { |