summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/attributes.c
Commit message (Collapse)AuthorAgeFilesLines
* This patch aims to match the changes introducedAlexander Ivchenko2018-05-181-1/+1
| | | | | | | | | | | | | | | | | in gcc by https://gcc.gnu.org/ml/gcc-cvs/2018-04/msg00534.html. The -mibt feature flag is being removed, and the -fcf-protection option now also defines a CET macro and causes errors when used on non-X86 targets, while X86 targets no longer check for -mibt and -mshstk to determine if -fcf-protection is supported. -mshstk is now used only to determine availability of shadow stack intrinsics. Comes with an LLVM patch (D46882). Patch by mike.dvoretsky Differential Revision: https://reviews.llvm.org/D46881 llvm-svn: 332704
* Adding nocf_check attribute for cf-protection fine tuningOren Ben Simhon2018-03-171-1/+13
| | | | | | | | | | The patch adds nocf_check target independent attribute for disabling checks that were enabled by cf-protection flag. The attribute can be appertained to functions and function pointers. Attribute name follows GCC's similar attribute name. Differential Revision: https://reviews.llvm.org/D41880 llvm-svn: 327768
* Preserve cold attribute for function declsXinliang David Li2017-06-131-0/+10
| | | | | | Differential Revision: http://reviews.llvm.org/D34133 llvm-svn: 305325
* Cleanup the handling of noinline function attributes, -fno-inline,Chandler Carruth2016-12-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -fno-inline-functions, -O0, and optnone. These were really, really tangled together: - We used the noinline LLVM attribute for -fno-inline - But not for -fno-inline-functions (breaking LTO) - But we did use it for -finline-hint-functions (yay, LTO is happy!) - But we didn't for -O0 (LTO is sad yet again...) - We had weird structuring of CodeGenOpts with both an inlining enumeration and a boolean. They interacted in weird ways and needlessly. - A *lot* of set smashing went on with setting these, and then got worse when we considered optnone and other inlining-effecting attributes. - A bunch of inline affecting attributes were managed in a completely different place from -fno-inline. - Even with -fno-inline we failed to put the LLVM noinline attribute onto many generated function definitions because they didn't show up as AST-level functions. - If you passed -O0 but -finline-functions we would run the normal inliner pass in LLVM despite it being in the O0 pipeline, which really doesn't make much sense. - Lastly, we used things like '-fno-inline' to manipulate the pass pipeline which forced the pass pipeline to be much more parameterizable than it really needs to be. Instead we can *just* use the optimization level to select a pipeline and control the rest via attributes. Sadly, this causes a bunch of churn in tests because we don't run the optimizer in the tests and check the contents of attribute sets. It would be awesome if attribute sets were a bit more FileCheck friendly, but oh well. I think this is a significant improvement and should remove the semantic need to change what inliner pass we run in order to comply with the requested inlining semantics by relying completely on attributes. It also cleans up tho optnone and related handling a bit. One unfortunate aspect of this is that for generating alwaysinline routines like those in OpenMP we end up removing noinline and then adding alwaysinline. I tried a bunch of other approaches, but because we recompute function attributes from scratch and don't have a declaration here I couldn't find anything substantially cleaner than this. Differential Revision: https://reviews.llvm.org/D28053 llvm-svn: 290398
* [opaque pointer type] update test cases for explicit pointee types on global ↵David Blaikie2015-09-111-1/+1
| | | | | | aliases llvm-svn: 247380
* Update Clang tests to handle explicitly typed load changes in LLVM.David Blaikie2015-02-271-1/+1
| | | | llvm-svn: 230795
* Update for llvm change.Rafael Espindola2014-07-301-1/+1
| | | | llvm-svn: 214356
* Update for llvm API change.Rafael Espindola2014-06-031-1/+1
| | | | | | Aliases in llvm now hold an arbitrary expression. llvm-svn: 210063
* Update for llvm api change.Rafael Espindola2014-05-161-1/+1
| | | | | | | | | | Now that llvm cannot represent alias cycles, we have to diagnose erros just before trying to close the cycle. This degrades the errors a bit. The real solution is what it was before: if we want to provide good errors for these cases, we have to be able to find a clang level decl given a mangled name and produce the error from Sema. llvm-svn: 209008
* Fix testcases to not rely upon target-* attributes.Bill Wendling2013-02-261-13/+12
| | | | llvm-svn: 176135
* Revert "Add more attributes from the command line to functions."Anna Zaks2013-02-251-12/+13
| | | | | | | | This reverts commit 176009. The commit is a likely cause of several buildbot failures. llvm-svn: 176044
* Add more attributes from the command line to functions.Bill Wendling2013-02-251-13/+12
| | | | | | | This is an ongoing process. Any command line option which a back-end cares about should be added here. llvm-svn: 176009
* Modify the tests to use attribute group references instead of listing theBill Wendling2013-02-201-10/+14
| | | | | | function attributes. llvm-svn: 175606
* Add the 'target-cpu' and 'target-features' attributes to functions.Bill Wendling2013-02-151-10/+10
| | | | | | | The back-end will use these values to reconfigure code generation for different features. llvm-svn: 175308
* Add inreg markers with the x86_fastcallcc calling convention.Rafael Espindola2012-10-241-1/+1
| | | | llvm-svn: 166537
* We were already passing the case in pr9356. Add it to attributes.c to makeRafael Espindola2012-05-131-0/+8
| | | | | | sure we don't regress. I will add a warning in a sec. llvm-svn: 156726
* Update to match mainline ConstantStruct::get API change. Also, use Chris Lattner2011-06-201-1/+1
| | | | | | | | | | | ConvertType on InitListExprs as they are being converted. This is needed for a forthcoming patch, and improves the IR generated anyway (see additional type names in testcases). This patch also converts a bunch of std::vector's in CGObjCMac to use C arrays. There are a ton more that should be converted as well. llvm-svn: 133413
* Fix PR6473.Rafael Espindola2010-03-041-6/+0
| | | | | | | | | Clang's support for weakref is now better than llvm-gcc's :-) We don't introduce a new symbol and we correctly mark undefined references weak only if there is no definition or regular undefined references in the same file. llvm-svn: 97733
* Add support for the weakref attribute. We still produce "alias weak" as ↵Rafael Espindola2010-02-231-0/+6
| | | | | | llvm-gcc does, but are more strict on what uses of weakref we accept. llvm-svn: 96992
* Standardize the parsing of function type attributes in a way thatJohn McCall2010-02-051-0/+7
| | | | | | | | | | | | follows (as conservatively as possible) gcc's current behavior: attributes written on return types that don't apply there are applied to the function instead, etc. Only parse CC attributes as type attributes, not as decl attributes; don't accepet noreturn as a decl attribute on ValueDecls, either (it still needs to apply to other decls, like blocks). Consistently consume CC/noreturn information throughout codegen; enforce this by removing their default values in CodeGenTypes::getFunctionInfo(). llvm-svn: 95436
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* And now a test fix in +Asserts mode, which I broke.Daniel Dunbar2009-11-111-1/+1
| | | | llvm-svn: 86801
* Fix some tests in -Asserts mode.Daniel Dunbar2009-11-111-1/+0
| | | | | | | | | | | | | - FileCheck is a *huuuuge* improvement here. - Still feels like we could use a better tool for this though, either teach llvm-dis to spit out the FileCheck syntax, or provide another tool to turn a .ll into a "matchable" input. - Also on my Christmas list is better FileCheck diagnostics with missing variables or mismatches. llvm-svn: 86800
* Eliminate &&s in tests.Daniel Dunbar2009-11-081-1/+1
| | | | | | - 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious. llvm-svn: 86430
* Add codegen for __builtin_abort. Convert to FileCheck.Mike Stump2009-10-061-43/+51
| | | | llvm-svn: 83427
* these tests include section specifiers that aren't valid on the Chris Lattner2009-08-101-1/+1
| | | | | | mac, use an explicit triple. llvm-svn: 78583
* MultiTestRunner: Validate '&&' at the end of RUN lines.Daniel Dunbar2009-07-251-1/+1
| | | | | | | | - This is just to normalize, these will go away soon hopefully. Added all the missing '&&'s that have crept in. :) llvm-svn: 77062
* Implement new warning for functions declared 'noreturn' when they fall off ↵Mike Stump2009-07-241-2/+2
| | | | | | the end. llvm-svn: 76932
* make these tests pass with the stack canary stuff even on targets where they ↵Chris Lattner2009-06-281-1/+1
| | | | | | default to on. llvm-svn: 74412
* weak_import should not make definitions have weak linkage.Daniel Dunbar2009-06-051-1/+11
| | | | | | - <rdar://problem/6948703> clang treats weak_import like weak llvm-svn: 72967
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* IRgen support for weak_import.Daniel Dunbar2009-03-061-0/+10
| | | | | | - <rdar://problem/6652110> clang should support weak_import llvm-svn: 66270
* Honor attribute section on static block var decls.Daniel Dunbar2009-02-121-2/+7
| | | | llvm-svn: 64411
* Support __attribute__(section(<name>))Daniel Dunbar2009-02-121-1/+13
| | | | llvm-svn: 64380
* Fix attributes test case to not run clang umpteen times.Daniel Dunbar2008-09-271-9/+11
| | | | llvm-svn: 56733
* Multiple tests in a single test file must be linked with '&&'.Argyrios Kyrtzidis2008-06-121-8/+8
| | | | | | Otherwise, failing tests other than the last one will not be reported. llvm-svn: 52231
* implement the alias attirbute (in both Sema and Codegen)Nuno Lopes2008-06-081-0/+4
| | | | llvm-svn: 52092
* The operand to the visibility attribute is required to be a quoted string, ↵Chris Lattner2008-03-041-2/+2
| | | | | | not a bare identifier. llvm-svn: 47893
* The attribute nothrow maps to llvm attribute nounwind. Fix testcase.Gabor Greif2008-03-031-1/+1
| | | | llvm-svn: 47841
* fix codegen support for functions that are nothrow and noreturn.Chris Lattner2008-03-031-0/+5
| | | | llvm-svn: 47838
* Add a bunch of attributes, patch by Nuno Lopes.Chris Lattner2008-03-031-0/+21
llvm-svn: 47837
OpenPOWER on IntegriCloud