Commit Graph

70 Commits

Author SHA1 Message Date
Chris Lattner 0ddd0ae50e accept and ignore a few things for better OpenBSD compatibility,
patch by Amit Kulkarni!

llvm-svn: 125944
2011-02-18 17:05:55 +00:00
Peter Collingbourne 7ce13fc940 OpenCL: add support for __kernel, kernel keywords and EXTENSION,
FP_CONTRACT pragmas.  Patch originally by ARM.

llvm-svn: 125475
2011-02-14 01:42:53 +00:00
Jeffrey Yasskin bbc4eea2c2 Revert r124217 because it didn't catch the actual error case it was trying to
catch:

  lock_guard(my_mutex);

declares a variable instead of creating a temporary.

llvm-svn: 124398
2011-01-27 19:17:54 +00:00
Jeffrey Yasskin 08a4f8f197 Add an attribute to forbid temporary instances of a type. This allows class
authors to write 

  class __attribute__((forbid_temporaries)) Name { ... };

when they want to force users to name all variables of the type. This protects
people from doing things like creating a scoped_lock that only lives for a
single statement instead of an entire scope.

The warning produced by this attribute can be disabled by
-Wno-forbid-temporaries.

llvm-svn: 124217
2011-01-25 20:08:12 +00:00
John McCall ed433937c2 Add the ns_consumes_self, ns_consumed, cf_consumed, and ns_returns_autoreleased
attributes for the benefit of the static analyzer.

llvm-svn: 124174
2011-01-25 03:31:58 +00:00
Anders Carlsson e30621b626 Get rid of [[hiding]], [[override]] and [[base_check]].
llvm-svn: 124087
2011-01-23 21:33:18 +00:00
Anders Carlsson 19588aa40b Get rid of the [[final]] C++0x attribute.
llvm-svn: 124083
2011-01-23 21:07:30 +00:00
John McCall 53fa71476d Refactor how we collect attributes during parsing, and add slots for attributes
on array and function declarators.  This is pretty far from complete, and I'll
revisit it later if someone doesn't beat me to it.

llvm-svn: 122535
2010-12-24 02:08:15 +00:00
Francois Pichet a83957a5c9 Add support for the Microsoft uuid attribute:
example:
struct __declspec(uuid("6d5140c1-7436-11ce-8034-00aa006009fa"))
test { };

llvm-svn: 122173
2010-12-19 06:50:37 +00:00
Peter Collingbourne 827301e659 Basic, Sema: add support for CUDA launch_bounds attribute
llvm-svn: 121654
2010-12-12 23:03:07 +00:00
Eric Christopher 8a2ee390be Add support for the common and nocommon attributes.
rdar://8560647

llvm-svn: 120650
2010-12-02 02:45:55 +00:00
Peter Collingbourne 6ab610ce57 Basic, Sema: add support for CUDA location attributes
llvm-svn: 120545
2010-12-01 03:15:31 +00:00
Dan Gohman bbb7d62546 Front-end support for __attribute__((may_alias)). This is not
yet hooked up to anything yet.

llvm-svn: 119407
2010-11-17 00:03:07 +00:00
Bob Wilson 118baf7611 Add support for "neon_vector_type" and "neon_polyvector_type" attributes
to create the special Neon vector types.  These are intended to be used in
Clang's version of <arm_neon.h> to define special Neon vector types that will
be mangled according to ARM's ABI.

llvm-svn: 119301
2010-11-16 00:32:24 +00:00
Ted Kremenek 5eec2b0bd3 Region-allocate all AttributeList objects from a factory object instead of manually managing them
using new/delete and OwningPtrs.  After memory profiling Clang, I witnessed periodic leaks of these
objects; digging deeper into the code, it was clear that our management of these objects was a mess.  The ownership rules were murky at best, and not always followed.  Worse, there are plenty of error paths where we could screw up.

This patch introduces AttributeList::Factory, which is a factory class that creates AttributeList
objects and then blows them away all at once.  While conceptually simple, most of the changes in
this patch just have to do with migrating over to the new interface.  Most of the changes have resulted in some nice simplifications.

This new strategy currently holds on to all AttributeList objects during the lifetime of the Parser
object.  This is easily tunable.  If we desire to have more bound the lifetime of AttributeList
objects more precisely, we can have the AttributeList::Factory object (in Parser) push/pop its
underlying allocator as we enter/leave key methods in the Parser.  This means that we get
simple memory management while still having the ability to finely control memory use if necessary.

Note that because AttributeList objects are now BumpPtrAllocated, we may reduce malloc() traffic
in many large files with attributes.

This fixes the leak reported in: <rdar://problem/8650003>

llvm-svn: 118675
2010-11-10 05:59:39 +00:00
Gabor Greif eef3197301 fix http://llvm.org/PR8371 in the straightforward way, also adding a comment
llvm-svn: 116570
2010-10-15 08:26:25 +00:00
Daniel Dunbar 8caf6415a8 Add support for attribute((naked)), patch by Zoxc on cfe-commits!
- Minor style tweaks by me.

llvm-svn: 115056
2010-09-29 18:20:25 +00:00
Dawn Perchik 335e16bad4 Add symantic support for the Pascal calling convention via
"__attribute((pascal))" or "__pascal" (and "_pascal" under
-fborland-extensions).  Support still needs to be added to llvm.

llvm-svn: 112939
2010-09-03 01:29:35 +00:00
John McCall ba7bf59503 Abstract out passing around types and kill off ActionBase.
llvm-svn: 111901
2010-08-24 05:47:05 +00:00
John McCall 8b0666cf79 Another step in the process of making the parser depend on Sema:
- move DeclSpec &c into the Sema library
  - move ParseAST into the Parse library
Reflect this change in a thousand different includes.
Reflect this change in the link orders.

llvm-svn: 111667
2010-08-20 18:27:03 +00:00