[PATCH] Implement the no_split_stack attribute.

Peter Collingbourne peter at pcc.me.uk
Mon May 19 14:08:31 PDT 2014


On Sat, May 17, 2014 at 09:40:45AM -0400, Aaron Ballman wrote:
> On Sat, May 17, 2014 at 2:23 AM, Peter Collingbourne <peter at pcc.me.uk> wrote:
> > This is a GNU attribute that allows split stacks to be turned off on a
> > per-function basis.
> >
> > http://reviews.llvm.org/D3817
> >
> > Files:
> >   include/clang/Basic/Attr.td
> >   lib/CodeGen/CGCall.cpp
> >   lib/Sema/SemaDeclAttr.cpp
> >   test/CodeGen/split-stacks.c
> >
> > Index: include/clang/Basic/Attr.td
> > ===================================================================
> > --- include/clang/Basic/Attr.td
> > +++ include/clang/Basic/Attr.td
> > @@ -823,6 +823,12 @@
> >    let Documentation = [Undocumented];
> >  }
> >
> > +def NoSplitStack : InheritableAttr {
> > +  let Spellings = [GNU<"no_split_stack">];
> 
> Should this be GCC instead of GNU? (so it can be spelled
> [[gnu::no_split_stack]] as well.)

Yes, done.

> > +  let Subjects = SubjectList<[Function]>;
> 
> Should it also apply to templated functions?

Yes.

> ObjC methods?

I don't know. Probably not.

> 
> > +  let Documentation = [Undocumented];
> 
> Please add documentation for this attribute.

Done.

> Missing sema tests for the attribute (that it applies only to
> functions, takes no arguments, etc).

Added.

Thanks,
-- 
Peter



More information about the cfe-commits mailing list