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 | 9c6082fe89c61af697f017aa80937581cc2128d8 (patch) | |
tree | a584f24f02bbaa5188567583995a02ea6ece0ee2 /lib/CodeGen/CGExprCXX.cpp | |
parent | 9a7e09d82f739c8fd1b6c28787397d698515a871 (diff) |
Revert "Add CC_Win64ThisCall and set it in the necessary places."
This reverts commit 126863.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126886 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprCXX.cpp')
-rw-r--r-- | lib/CodeGen/CGExprCXX.cpp | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/lib/CodeGen/CGExprCXX.cpp b/lib/CodeGen/CGExprCXX.cpp index 06d04a5e52..bba7864bff 100644 --- a/lib/CodeGen/CGExprCXX.cpp +++ b/lib/CodeGen/CGExprCXX.cpp @@ -48,13 +48,8 @@ RValue CodeGenFunction::EmitCXXMemberCall(const CXXMethodDecl *MD, EmitCallArgs(Args, FPT, ArgBeg, ArgEnd); QualType ResultType = FPT->getResultType(); - FunctionType::ExtInfo Info = FPT->getExtInfo(); - - if (getContext().Target.isWin64()) { - Info = Info.withCallingConv(CC_Win64ThisCall); - } - - return EmitCall(CGM.getTypes().getFunctionInfo(ResultType, Args, Info), + return EmitCall(CGM.getTypes().getFunctionInfo(ResultType, Args, + FPT->getExtInfo()), Callee, ReturnValue, Args, MD); } @@ -297,11 +292,8 @@ CodeGenFunction::EmitCXXMemberPointerCallExpr(const CXXMemberCallExpr *E, // And the rest of the call args EmitCallArgs(Args, FPT, E->arg_begin(), E->arg_end()); const FunctionType *BO_FPT = BO->getType()->getAs<FunctionProtoType>(); - - const CGFunctionInfo &FI = CGM.getTypes().getFunctionInfo(Args, BO_FPT, - CGM.getContext().Target.isWin64() ? CC_Win64ThisCall : CC_Default); - - return EmitCall(FI , Callee, ReturnValue, Args); + return EmitCall(CGM.getTypes().getFunctionInfo(Args, BO_FPT), Callee, + ReturnValue, Args); } RValue @@ -818,10 +810,8 @@ namespace { for (unsigned I = 0; I != NumPlacementArgs; ++I) DeleteArgs.push_back(std::make_pair(getPlacementArgs()[I], *AI++)); - // FIXME Check whether this needs thiscall on Win64. // Call 'operator delete'. - CGF.EmitCall(CGF.CGM.getTypes().getFunctionInfo(DeleteArgs, FPT, - CC_Default), + CGF.EmitCall(CGF.CGM.getTypes().getFunctionInfo(DeleteArgs, FPT), CGF.CGM.GetAddrOfFunction(OperatorDelete), ReturnValueSlot(), DeleteArgs, OperatorDelete); } @@ -881,10 +871,8 @@ namespace { DeleteArgs.push_back(std::make_pair(RV, *AI++)); } - // FIXME Check whether this needs thiscall on Win64. // Call 'operator delete'. - CGF.EmitCall(CGF.CGM.getTypes().getFunctionInfo(DeleteArgs, FPT, - CC_Default), + CGF.EmitCall(CGF.CGM.getTypes().getFunctionInfo(DeleteArgs, FPT), CGF.CGM.GetAddrOfFunction(OperatorDelete), ReturnValueSlot(), DeleteArgs, OperatorDelete); } @@ -988,7 +976,7 @@ llvm::Value *CodeGenFunction::EmitCXXNewExpr(const CXXNewExpr *E) { // Emit the call to new. RValue RV = - EmitCall(CGM.getTypes().getFunctionInfo(NewArgs, NewFTy, CC_Default), + EmitCall(CGM.getTypes().getFunctionInfo(NewArgs, NewFTy), CGM.GetAddrOfFunction(NewFD), ReturnValueSlot(), NewArgs, NewFD); // If an allocation function is declared with an empty exception specification @@ -1098,7 +1086,7 @@ void CodeGenFunction::EmitDeleteCall(const FunctionDecl *DeleteFD, DeleteArgs.push_back(std::make_pair(RValue::get(Size), SizeTy)); // Emit the call to delete. - EmitCall(CGM.getTypes().getFunctionInfo(DeleteArgs, DeleteFTy, CC_Default), + EmitCall(CGM.getTypes().getFunctionInfo(DeleteArgs, DeleteFTy), CGM.GetAddrOfFunction(DeleteFD), ReturnValueSlot(), DeleteArgs, DeleteFD); } @@ -1219,7 +1207,7 @@ namespace { } // Emit the call to delete. - CGF.EmitCall(CGF.getTypes().getFunctionInfo(Args, DeleteFTy, CC_Default), + CGF.EmitCall(CGF.getTypes().getFunctionInfo(Args, DeleteFTy), CGF.CGM.GetAddrOfFunction(OperatorDelete), ReturnValueSlot(), Args, OperatorDelete); } |