diff options
author | Erich Keane <erich.keane@intel.com> | 2018-07-18 20:04:48 +0000 |
---|---|---|
committer | Erich Keane <erich.keane@intel.com> | 2018-07-18 20:04:48 +0000 |
commit | 1a78aeb17c78bc38c5cc7580dccc49136079ac07 (patch) | |
tree | 01b9b8251f3e9fb7601ac2f4c45c606ee3fadb65 /include/clang/Basic/Attr.td | |
parent | 0e4f59d7b40a4e5cb0189e4c69fce75279031a10 (diff) |
Add support for __declspec(code_seg("segname"))
This patch uses CodeSegAttr to represent __declspec(code_seg) rather than
building on the existing support for #pragma code_seg.
The code_seg declspec is applied on functions and classes. This attribute
enables the placement of code into separate named segments, including compiler-
generated codes and template instantiations.
For more information, please see the following:
https://msdn.microsoft.com/en-us/library/dn636922.aspx
This patch fixes the regression for the support for attribute ((section).
https://github.com/llvm-mirror/clang/commit/746b78de7812bc785fbb5207b788348040b23fa7
Patch by Soumi Manna (Manna)
Differential Revision: https://reviews.llvm.org/D48841
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337420 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/Attr.td')
-rw-r--r-- | include/clang/Basic/Attr.td | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/clang/Basic/Attr.td b/include/clang/Basic/Attr.td index 0219c715d3..36c980029c 100644 --- a/include/clang/Basic/Attr.td +++ b/include/clang/Basic/Attr.td @@ -1770,6 +1770,13 @@ def Section : InheritableAttr { let Documentation = [SectionDocs]; } +def CodeSeg : InheritableAttr { + let Spellings = [Declspec<"code_seg">]; + let Args = [StringArgument<"Name">]; + let Subjects = SubjectList<[Function, CXXRecord], ErrorDiag>; + let Documentation = [CodeSegDocs]; +} + def PragmaClangBSSSection : InheritableAttr { // This attribute has no spellings as it is only ever created implicitly. let Spellings = []; |