From 1f031ccac56820467eff9b6d620dffca78ce122c Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 27 Jun 2018 19:14:32 +0000 Subject: Vendor import of clang 6.0.1 release r335540: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_601/final@335540 --- lib/CodeGen/TargetInfo.cpp | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) (limited to 'lib/CodeGen') diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp index abd633280b9d..f2352a373401 100644 --- a/lib/CodeGen/TargetInfo.cpp +++ b/lib/CodeGen/TargetInfo.cpp @@ -1931,13 +1931,8 @@ void X86_32TargetCodeGenInfo::setTargetAttributes( return; if (const FunctionDecl *FD = dyn_cast_or_null(D)) { if (FD->hasAttr()) { - // Get the LLVM function. llvm::Function *Fn = cast(GV); - - // Now add the 'alignstack' attribute with a value of 16. - llvm::AttrBuilder B; - B.addStackAlignmentAttr(16); - Fn->addAttributes(llvm::AttributeList::FunctionIndex, B); + Fn->addFnAttr("stackrealign"); } if (FD->hasAttr()) { llvm::Function *Fn = cast(GV); @@ -2292,13 +2287,8 @@ public: return; if (const FunctionDecl *FD = dyn_cast_or_null(D)) { if (FD->hasAttr()) { - // Get the LLVM function. - auto *Fn = cast(GV); - - // Now add the 'alignstack' attribute with a value of 16. - llvm::AttrBuilder B; - B.addStackAlignmentAttr(16); - Fn->addAttributes(llvm::AttributeList::FunctionIndex, B); + llvm::Function *Fn = cast(GV); + Fn->addFnAttr("stackrealign"); } if (FD->hasAttr()) { llvm::Function *Fn = cast(GV); @@ -2429,13 +2419,8 @@ void WinX86_64TargetCodeGenInfo::setTargetAttributes( return; if (const FunctionDecl *FD = dyn_cast_or_null(D)) { if (FD->hasAttr()) { - // Get the LLVM function. - auto *Fn = cast(GV); - - // Now add the 'alignstack' attribute with a value of 16. - llvm::AttrBuilder B; - B.addStackAlignmentAttr(16); - Fn->addAttributes(llvm::AttributeList::FunctionIndex, B); + llvm::Function *Fn = cast(GV); + Fn->addFnAttr("stackrealign"); } if (FD->hasAttr()) { llvm::Function *Fn = cast(GV); -- cgit v1.2.3