Add NeXT runtime support for generating methods.

Change CodeGenFunction::EmitParmDecl to take either a ParmVarDecl or an
  ImplicitParamDecl.

Drop hasAggregateLLVMType from CodeGenModule.cpp (use version in
  CodeGenFunction).

Change the Objective-C method generation to use EmitParmDecl for
  implicit parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54838 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index 1867207..bbd7ab4 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -166,11 +166,6 @@
   gv->setSection("llvm.metadata");
 }
 
-bool hasAggregateLLVMType(QualType T) {
-  return !T->isRealType() && !T->isPointerLikeType() &&
-         !T->isVoidType() && !T->isVectorType() && !T->isFunctionType();
-}
-
 void CodeGenModule::SetGlobalValueAttributes(const FunctionDecl *FD,
                                              llvm::GlobalValue *GV) {
   // TODO: Set up linkage and many other things.  Note, this is a simple 
@@ -208,7 +203,7 @@
   if (FuncAttrs)
     ParamAttrList.push_back(llvm::ParamAttrsWithIndex::get(0, FuncAttrs));
   // Note that there is parallel code in CodeGenFunction::EmitCallExpr
-  bool AggregateReturn = hasAggregateLLVMType(FD->getResultType());
+  bool AggregateReturn = CodeGenFunction::hasAggregateLLVMType(FD->getResultType());
   if (AggregateReturn)
     ParamAttrList.push_back(
         llvm::ParamAttrsWithIndex::get(1, llvm::ParamAttr::StructRet));