Commit Graph

5 Commits

Author SHA1 Message Date
Erich Keane 29636aaaa6 Clean up 'target' attribute diagnostics
There were a few issues previously with the target
attribute diagnostics implementation that lead to the
attribute being added to the AST despite having an error
in it.

This patch changes that, and adds a test to ensure it
does not get added to the AST.

Differential Revision: https://reviews.llvm.org/D43359

llvm-svn: 325364
2018-02-16 17:31:59 +00:00
Erich Keane 57e15cd40a Improve SEMA for attribute-target
Add more diagnosis for the non-multiversioning case.

Differential Revision: https://reviews.llvm.org/D35573

llvm-svn: 308539
2017-07-19 22:06:33 +00:00
Eric Christopher 0ee1c8cd0b Quote the user provided string in the warning message and update
tests accordingly.

llvm-svn: 239635
2015-06-12 20:13:50 +00:00
Eric Christopher 789a7ad1a8 Add a warning for unsupported elements of the target attribute.
Since we're ignoring the tune= and fpmath= attributes go ahead
and add a warning alerting people to the fact that we're going
to ignore that part of it during code generation and tie it to
the attribute warning set.

llvm-svn: 239583
2015-06-12 01:36:05 +00:00
Eric Christopher 11acf739f8 Add support for the the target attribute.
Modeled after the gcc attribute of the same name, this feature
allows source level annotations to correspond to backend code
generation. In llvm particular parlance, this allows the adding
of subtarget features and changing the cpu for a particular function
based on source level hints.

This has been added into the existing support for function level
attributes without particular verification for any target outside
of whether or not the backend will support the features/cpu given
(similar to section, etc).

llvm-svn: 239579
2015-06-12 01:35:52 +00:00