[cfe-commits] r49294 - /cfe/trunk/lib/AST/Decl.cpp

Chris Lattner sabre at nondot.org
Sun Apr 6 16:09:52 PDT 2008


Author: lattner
Date: Sun Apr  6 18:09:52 2008
New Revision: 49294

URL: http://llvm.org/viewvc/llvm-project?rev=49294&view=rev
Log:
remove a use of getCanonicalType.

Modified:
    cfe/trunk/lib/AST/Decl.cpp

Modified: cfe/trunk/lib/AST/Decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=49294&r1=49293&r2=49294&view=diff

==============================================================================
--- cfe/trunk/lib/AST/Decl.cpp (original)
+++ cfe/trunk/lib/AST/Decl.cpp Sun Apr  6 18:09:52 2008
@@ -368,9 +368,10 @@
 }
 
 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) {





More information about the cfe-commits mailing list