From 7bbe03d8ae0772d89f6539d073dd43e49268a42c Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Wed, 30 Jun 2010 00:22:35 +0000 Subject: Revert r107173, "fix PR7519: after thrashing around and remembering how all this stuff", it broke bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107232 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGCall.cpp | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) (limited to 'lib/CodeGen/CGCall.cpp') diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index 820fd9cd3f..484eee9587 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -61,31 +61,28 @@ static CanQualType GetReturnType(QualType RetTy) { } const CGFunctionInfo & -CodeGenTypes::getFunctionInfo(CanQual FTNP, - bool IsRecursive) { +CodeGenTypes::getFunctionInfo(CanQual FTNP) { return getFunctionInfo(FTNP->getResultType().getUnqualifiedType(), llvm::SmallVector(), - FTNP->getExtInfo(), IsRecursive); + FTNP->getExtInfo()); } /// \param Args - contains any initial parameters besides those /// in the formal type static const CGFunctionInfo &getFunctionInfo(CodeGenTypes &CGT, llvm::SmallVectorImpl &ArgTys, - CanQual FTP, - bool IsRecursive = false) { + CanQual FTP) { // FIXME: Kill copy. for (unsigned i = 0, e = FTP->getNumArgs(); i != e; ++i) ArgTys.push_back(FTP->getArgType(i)); CanQualType ResTy = FTP->getResultType().getUnqualifiedType(); - return CGT.getFunctionInfo(ResTy, ArgTys, FTP->getExtInfo(), IsRecursive); + return CGT.getFunctionInfo(ResTy, ArgTys, FTP->getExtInfo()); } const CGFunctionInfo & -CodeGenTypes::getFunctionInfo(CanQual FTP, - bool IsRecursive) { +CodeGenTypes::getFunctionInfo(CanQual FTP) { llvm::SmallVector ArgTys; - return ::getFunctionInfo(*this, ArgTys, FTP, IsRecursive); + return ::getFunctionInfo(*this, ArgTys, FTP); } static CallingConv getCallingConventionForDecl(const Decl *D) { @@ -218,8 +215,7 @@ const CGFunctionInfo &CodeGenTypes::getFunctionInfo(QualType ResTy, const CGFunctionInfo &CodeGenTypes::getFunctionInfo(CanQualType ResTy, const llvm::SmallVectorImpl &ArgTys, - const FunctionType::ExtInfo &Info, - bool IsRecursive) { + const FunctionType::ExtInfo &Info) { #ifndef NDEBUG for (llvm::SmallVectorImpl::const_iterator I = ArgTys.begin(), E = ArgTys.end(); I != E; ++I) @@ -247,17 +243,8 @@ const CGFunctionInfo &CodeGenTypes::getFunctionInfo(CanQualType ResTy, // various situations, pass it in. llvm::SmallVector PreferredArgTypes; for (llvm::SmallVectorImpl::const_iterator - I = ArgTys.begin(), E = ArgTys.end(); I != E; ++I) { - // If this is being called from the guts of the ConvertType loop, make sure - // to call ConvertTypeRecursive so we don't get into issues with cyclic - // pointer type structures. - const llvm::Type *ArgType; - if (IsRecursive) - ArgType = ConvertTypeRecursive(*I); - else - ArgType = ConvertType(*I); - PreferredArgTypes.push_back(ArgType); - } + I = ArgTys.begin(), E = ArgTys.end(); I != E; ++I) + PreferredArgTypes.push_back(ConvertType(*I)); // Compute ABI information. getABIInfo().computeInfo(*FI, getContext(), TheModule.getContext(), -- cgit v1.2.3-18-g5258