diff options
| author | Tilmann Scheller <tilmann.scheller@googlemail.com> | 2011-03-02 21:36:49 +0000 |
|---|---|---|
| committer | Tilmann Scheller <tilmann.scheller@googlemail.com> | 2011-03-02 21:36:49 +0000 |
| commit | 99cc30c371b7c3706bec267fd35019d035913489 (patch) | |
| tree | 7daa383d6658e467defe86c54b1a37ad90638b3b /clang/lib/CodeGen/CGCall.cpp | |
| parent | 5f2a4f999d33167f55f55886222219321207393d (diff) | |
| download | bcm5719-llvm-99cc30c371b7c3706bec267fd35019d035913489.tar.gz bcm5719-llvm-99cc30c371b7c3706bec267fd35019d035913489.zip | |
Revert "Add CC_Win64ThisCall and set it in the necessary places."
This reverts commit 126863.
llvm-svn: 126886
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 3c3765a1ae5..1d9a9a6a8ce 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -36,7 +36,6 @@ static unsigned ClangCallConvToLLVMCallConv(CallingConv CC) { case CC_X86StdCall: return llvm::CallingConv::X86_StdCall; case CC_X86FastCall: return llvm::CallingConv::X86_FastCall; case CC_X86ThisCall: return llvm::CallingConv::X86_ThisCall; - case CC_Win64ThisCall: return llvm::CallingConv::Win64_ThisCall; // TODO: add support for CC_X86Pascal to llvm } } @@ -76,23 +75,19 @@ CodeGenTypes::getFunctionInfo(CanQual<FunctionNoProtoType> FTNP, static const CGFunctionInfo &getFunctionInfo(CodeGenTypes &CGT, llvm::SmallVectorImpl<CanQualType> &ArgTys, CanQual<FunctionProtoType> FTP, - CallingConv CC, bool IsRecursive = false) { // 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().withCallingConv(CC), - IsRecursive); + return CGT.getFunctionInfo(ResTy, ArgTys, FTP->getExtInfo(), IsRecursive); } const CGFunctionInfo & CodeGenTypes::getFunctionInfo(CanQual<FunctionProtoType> FTP, bool IsRecursive) { llvm::SmallVector<CanQualType, 16> ArgTys; - return ::getFunctionInfo(*this, ArgTys, FTP, CC_Default, IsRecursive); + return ::getFunctionInfo(*this, ArgTys, FTP, IsRecursive); } static CallingConv getCallingConventionForDecl(const Decl *D) { @@ -119,10 +114,8 @@ const CGFunctionInfo &CodeGenTypes::getFunctionInfo(const CXXRecordDecl *RD, // Add the 'this' pointer. ArgTys.push_back(GetThisType(Context, RD)); - CallingConv CC = Context.Target.isWin64() ? CC_Win64ThisCall : CC_Default; - return ::getFunctionInfo(*this, ArgTys, - FTP->getCanonicalTypeUnqualified().getAs<FunctionProtoType>(), CC); + FTP->getCanonicalTypeUnqualified().getAs<FunctionProtoType>()); } const CGFunctionInfo &CodeGenTypes::getFunctionInfo(const CXXMethodDecl *MD) { @@ -135,9 +128,7 @@ const CGFunctionInfo &CodeGenTypes::getFunctionInfo(const CXXMethodDecl *MD) { if (MD->isInstance()) ArgTys.push_back(GetThisType(Context, MD->getParent())); - CallingConv CC = Context.Target.isWin64() ? CC_Win64ThisCall : CC_Default; - - return ::getFunctionInfo(*this, ArgTys, GetFormalType(MD), CC); + return ::getFunctionInfo(*this, ArgTys, GetFormalType(MD)); } const CGFunctionInfo &CodeGenTypes::getFunctionInfo(const CXXConstructorDecl *D, @@ -154,9 +145,7 @@ const CGFunctionInfo &CodeGenTypes::getFunctionInfo(const CXXConstructorDecl *D, for (unsigned i = 0, e = FTP->getNumArgs(); i != e; ++i) ArgTys.push_back(FTP->getArgType(i)); - CallingConv CC = Context.Target.isWin64() ? CC_Win64ThisCall : CC_Default; - - return getFunctionInfo(ResTy, ArgTys, FTP->getExtInfo().withCallingConv(CC)); + return getFunctionInfo(ResTy, ArgTys, FTP->getExtInfo()); } const CGFunctionInfo &CodeGenTypes::getFunctionInfo(const CXXDestructorDecl *D, @@ -170,9 +159,7 @@ const CGFunctionInfo &CodeGenTypes::getFunctionInfo(const CXXDestructorDecl *D, CanQual<FunctionProtoType> FTP = GetFormalType(D); assert(FTP->getNumArgs() == 0 && "dtor with formal parameters"); - CallingConv CC = Context.Target.isWin64() ? CC_Win64ThisCall : CC_Default; - - return getFunctionInfo(ResTy, ArgTys, FTP->getExtInfo().withCallingConv(CC)); + return getFunctionInfo(ResTy, ArgTys, FTP->getExtInfo()); } const CGFunctionInfo &CodeGenTypes::getFunctionInfo(const FunctionDecl *FD) { @@ -263,8 +250,8 @@ const CGFunctionInfo &CodeGenTypes::getFunctionInfo(CanQualType ResTy, return *FI; // Construct the function info. - FI = new CGFunctionInfo(CC, Info.getNoReturn(), Info.getRegParm(), - ResTy, ArgTys.data(), ArgTys.size()); + FI = new CGFunctionInfo(CC, Info.getNoReturn(), Info.getRegParm(), ResTy, + ArgTys.data(), ArgTys.size()); FunctionInfos.InsertNode(FI, InsertPos); // Compute ABI information. |

