summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2014-05-19 22:14:34 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2014-05-19 22:14:34 +0000
commitedea169440f3e509af537e44352a1fb12155dd82 (patch)
treed593f4ee3e22c4bcd53ecbd21a93f697faf9e956 /lib/CodeGen/CGCall.cpp
parent6ea738122e9f57accf3906fd7c9805a6b9f86d26 (diff)
downloadclang-edea169440f3e509af537e44352a1fb12155dd82.tar.gz
clang-edea169440f3e509af537e44352a1fb12155dd82.tar.bz2
clang-edea169440f3e509af537e44352a1fb12155dd82.tar.xz
Implement the no_split_stack attribute.
This is a GNU attribute that allows split stacks to be turned off on a per-function basis. Differential Revision: http://reviews.llvm.org/D3817 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209167 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r--lib/CodeGen/CGCall.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 61bf985278..e477a54c67 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -1117,7 +1117,8 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI,
FuncAttrs.addAttribute(llvm::Attribute::NoRedZone);
if (CodeGenOpts.NoImplicitFloat)
FuncAttrs.addAttribute(llvm::Attribute::NoImplicitFloat);
- if (CodeGenOpts.EnableSegmentedStacks)
+ if (CodeGenOpts.EnableSegmentedStacks &&
+ !(TargetDecl && TargetDecl->hasAttr<NoSplitStackAttr>()))
FuncAttrs.addAttribute("split-stack");
if (AttrOnCallSite) {