summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/TargetAttributesSema.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Refactor all theRafael Espindola2012-05-131-21/+13
| | | | | | | | | if (Inherited) Attr->setInherited(true); To a central location. llvm-svn: 156728
* Fix an old (2009) FIXME:Rafael Espindola2012-05-101-24/+40
| | | | | | | | | | | | | | | | | | | | | // FIXME: This needs to happen before we merge declarations. Then, // let attribute merging cope with attribute conflicts. This was already being done for variables, but for functions we were merging then first and then applying the attributes. To avoid duplicating merging logic, some of the helpers in SemaDeclAttr.cpp become methods that can handle merging two attributes in one decl or inheriting attributes from one decl to another. With this change we are now able to produce errors for variables with incompatible visibility attributes or warn about unused dllimports in variables. This changes the attribute list iteration back to being in reverse source code order, as that matches what decl merging does and avoids differentiating the two cases is the merge*Attr methods. llvm-svn: 156531
* Process attributes in the order they appear in the source code. This make clangRafael Espindola2012-05-071-10/+5
| | | | | | | | | | | | | | match gcc behavior for two conflicting visibilities in the same decl. It also makes handling of dllimport/dllexport more natural. As a bonus we now warn on the dllimport in void __attribute__((dllimport)) foo13(); void __attribute__((dllexport)) foo13(); as does gcc. llvm-svn: 156343
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-111-1/+1
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
* Fix compiler warning about && in ||.Benjamin Kramer2011-09-301-2/+2
| | | | | | | This time the warning found an actual bug, we don't want to handle force_align_arg_pointer differently than __force_align_arg_pointer__. llvm-svn: 140877
* Support dllimport and dllexport on x86-64 Windows. PR10978. Patch by Ruben ↵Eli Friedman2011-09-301-4/+5
| | | | | | Van Boxem. llvm-svn: 140871
* Rename LangOptions::Microsoft to LangOptions::MicrosoftExt to make it clear ↵Francois Pichet2011-09-171-1/+1
| | | | | | | | that this flag must be used only for Microsoft extensions and not emulation; to avoid confusion with the new LangOptions::MicrosoftMode flag. Many of the code now under LangOptions::MicrosoftExt will eventually be moved under the LangOptions::MicrosoftMode flag. llvm-svn: 139987
* Keep the source range of attributes. Depends on a llvm tablegen commit.Argyrios Kyrtzidis2011-09-131-1/+2
| | | | llvm-svn: 139600
* Extend the ASTContext constructor to delay the initialization ofDouglas Gregor2011-09-021-2/+2
| | | | | | | | builtin types (When requested). This is another step toward making ASTUnit build the ASTContext as needed when loading an AST file, rather than doing so after the fact. No actual functionality change (yet). llvm-svn: 138985
* Support for C++11 (non-template) alias declarations.Richard Smith2011-04-151-1/+1
| | | | llvm-svn: 129567
* Triple::MinGW64 is deprecated and removed. We can use Triple::MinGW32 instead.NAKAMURA Takumi2011-02-171-2/+1
| | | | | | No one uses *-mingw64. mingw-w64 is represented as {i686|x86_64}-w64-mingw32. llvm-svn: 125742
* Fix whitespace.NAKAMURA Takumi2011-02-171-1/+0
| | | | llvm-svn: 125741
* 1. Add some ABI information for the Microblaze.Wesley Peck2010-12-191-0/+51
| | | | | | 2. Add attibutes "interrupt_handler" and "save_volatiles" for the Microblaze target. llvm-svn: 122184
* Split out a header to hold APIs meant for the Sema implementation from Sema.h.John McCall2010-08-251-1/+1
| | | | | | | Clients of Sema don't need to know (for example) the list of diagnostics we support. llvm-svn: 112093
* Remove Sema.h's dependency on DeclCXX.h.John McCall2010-08-251-1/+2
| | | | llvm-svn: 112032
* Generate Attr subclasses with TableGen.Alexis Hunt2010-08-181-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | Now all classes derived from Attr are generated from TableGen. Additionally, Attr* is no longer its own linked list; SmallVectors or Attr* are used. The accompanying LLVM commit contains the updates to TableGen necessary for this. Some other notes about newly-generated attribute classes: - The constructor arguments are a SourceLocation and a Context&, followed by the attributes arguments in the order that they were defined in Attr.td - Every argument in Attr.td has an appropriate accessor named getFoo, and there are sometimes a few extra ones (such as to get the length of a variadic argument). Additionally, specific_attr_iterator has been introduced, which will iterate over an AttrVec, but only over attributes of a certain type. It can be accessed through either Decl::specific_attr_begin/end or the global functions of the same name. llvm-svn: 111455
* Move Sema's headers into include/clang/Sema, renaming a few along the way.Douglas Gregor2010-08-121-1/+1
| | | | llvm-svn: 110945
* Don't emit a warning about a dllimport attribute being used in a typedefTed Kremenek2010-02-211-2/+6
| | | | | | when -fms-extensions is specified. Fixes <rdar://problem/7653870>. llvm-svn: 96722
* Also don't warn about force_align_arg_pointer on function typedefs. (This willCharles Davis2010-02-181-1/+2
| | | | | | | break if you declare an actual function using that typedef. Come to think of it, maybe I should make this part of the type.) llvm-svn: 96570
* Two fixes related to force_align_arg_pointer:Charles Davis2010-02-181-2/+7
| | | | | | | - Also recognize __force_align_arg_pointer__. - Don't warn if it's used on a function pointer typedef. llvm-svn: 96568
* Revert r95939, as suggested by Alexandre Julliard from the Wine project (andCharles Davis2010-02-171-6/+4
| | | | | | our own Chris Lattner). llvm-svn: 96431
* dllimport and dllexport are declspec attributes, too. They're alsoCharles Davis2010-02-161-0/+88
| | | | | | | | Win32-specific. Also, fix a test to use FileCheck instead of grepping LLVM IR. llvm-svn: 96364
* Warn about using the new force_align_arg_pointer attribute on a functionCharles Davis2010-02-111-4/+6
| | | | | | | pointer. If you don't like the new warning, you can turn it off with -Wno-force-align-arg-pointer. llvm-svn: 95939
* Fix a potential null-pointer use, and fix the style of my new function.Charles Davis2010-02-101-2/+2
| | | | | | Thanks, Anton! llvm-svn: 95821
* Add support for the force_align_arg_pointer attribute. This is an x86-specificCharles Davis2010-02-101-0/+42
| | | | | | | | attribute, so it uses Anton's new target-specific attribute support. It's supposed to ensure that the stack is 16-byte aligned, but since necessary support is lacking from LLVM, this is a no-op for now. llvm-svn: 95820
* Generalize target weirdness handling having proper layering in mind:Anton Korobeynikov2010-01-101-0/+86
1. Add helper class for sema checks for target attributes 2. Add helper class for codegen of target attributes As a proof-of-concept - implement msp430's 'interrupt' attribute. llvm-svn: 93118
OpenPOWER on IntegriCloud