summaryrefslogtreecommitdiffstats
path: root/clang/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
commitb4728c12e8b6e6f4d1906ec3221ee0a3a124e843 (patch)
treee8f050b2013cdd085dda9e756d08397464ed9b25 /clang/lib/CodeGen/CGCall.cpp
parent973141a0358f5d47f40acdf272b8d6a9f0cbfba6 (diff)
downloadbcm5719-llvm-b4728c12e8b6e6f4d1906ec3221ee0a3a124e843.tar.gz
bcm5719-llvm-b4728c12e8b6e6f4d1906ec3221ee0a3a124e843.zip
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 llvm-svn: 209167
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index 61bf985278e..e477a54c67e 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/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) {
OpenPOWER on IntegriCloud