aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index 6899388..b8d3937 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -683,19 +683,6 @@ static bool matchesStlAllocatorFn(const Decl *D, const ASTContext &Ctx) {
return true;
}
-bool CodeGenFunction::isInAllocaArgument(CGCXXABI &ABI, QualType Ty) {
- const CXXRecordDecl *RD = Ty->getAsCXXRecordDecl();
- return RD && ABI.getRecordArgABI(RD) == CGCXXABI::RAA_DirectInMemory;
-}
-
-bool CodeGenFunction::hasInAllocaArg(const CXXMethodDecl *MD) {
- return getTarget().getTriple().getArch() == llvm::Triple::x86 &&
- getTarget().getCXXABI().isMicrosoft() &&
- llvm::any_of(MD->parameters(), [&](ParmVarDecl *P) {
- return isInAllocaArgument(CGM.getCXXABI(), P->getType());
- });
-}
-
/// Return the UBSan prologue signature for \p FD if one is available.
static llvm::Constant *getPrologueSignature(CodeGenModule &CGM,
const FunctionDecl *FD) {
@@ -1460,17 +1447,6 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn,
// The lambda static invoker function is special, because it forwards or
// clones the body of the function call operator (but is actually static).
EmitLambdaStaticInvokeBody(cast<CXXMethodDecl>(FD));
-
- } else if (isa<CXXMethodDecl>(FD) &&
- isLambdaCallOperator(cast<CXXMethodDecl>(FD)) &&
- cast<CXXMethodDecl>(FD)->getParent()->getLambdaStaticInvoker() &&
- hasInAllocaArg(cast<CXXMethodDecl>(FD)
- ->getParent()
- ->getLambdaStaticInvoker()) &&
- !FnInfo.isDelegateCall()) {
- // If emitting a lambda with static invoker on X86 Windows, change
- // the call operator body.
- EmitLambdaInAllocaCallOpBody(cast<CXXMethodDecl>(FD));
} else if (FD->isDefaulted() && isa<CXXMethodDecl>(FD) &&
(cast<CXXMethodDecl>(FD)->isCopyAssignmentOperator() ||
cast<CXXMethodDecl>(FD)->isMoveAssignmentOperator())) {