diff options
author | Dmitry Mikulin <dmitry.mikulin@sony.com> | 2019-10-15 18:31:10 +0000 |
---|---|---|
committer | Dmitry Mikulin <dmitry.mikulin@sony.com> | 2019-10-15 18:31:10 +0000 |
commit | 1d08493df33c295a8647a712884d7c634f8e8057 (patch) | |
tree | 137647f4d1dd6b66a7d2c89411a3c53df38d367b /include/clang/Basic | |
parent | a7fe44fc314944e8812405603368d05080ab3c13 (diff) | |
download | clang-1d08493df33c295a8647a712884d7c634f8e8057.tar.gz |
Added support for "#pragma clang section relro=<name>"
Differential Revision: https://reviews.llvm.org/D68806
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@374934 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic')
-rw-r--r-- | include/clang/Basic/Attr.td | 8 | ||||
-rw-r--r-- | include/clang/Basic/DiagnosticParseKinds.td | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/include/clang/Basic/Attr.td b/include/clang/Basic/Attr.td index 279a43236a..c3a2ee325d 100644 --- a/include/clang/Basic/Attr.td +++ b/include/clang/Basic/Attr.td @@ -2020,6 +2020,14 @@ def PragmaClangRodataSection : InheritableAttr { let Documentation = [Undocumented]; } +def PragmaClangRelroSection : InheritableAttr { + // This attribute has no spellings as it is only ever created implicitly. + let Spellings = []; + let Args = [StringArgument<"Name">]; + let Subjects = SubjectList<[GlobalVar], ErrorDiag>; + let Documentation = [Undocumented]; +} + def PragmaClangTextSection : InheritableAttr { // This attribute has no spellings as it is only ever created implicitly. let Spellings = []; diff --git a/include/clang/Basic/DiagnosticParseKinds.td b/include/clang/Basic/DiagnosticParseKinds.td index 48ef1fb369..7c9f4da778 100644 --- a/include/clang/Basic/DiagnosticParseKinds.td +++ b/include/clang/Basic/DiagnosticParseKinds.td @@ -976,9 +976,9 @@ def err_pragma_misplaced_in_decl : Error<"this pragma cannot appear in %0 declar // '#pragma clang section' related errors def err_pragma_expected_clang_section_name : Error< - "expected one of [bss|data|rodata|text] section kind in '#pragma %0'">; + "expected one of [bss|data|rodata|text|relro] section kind in '#pragma %0'">; def err_pragma_clang_section_expected_equal : Error< - "expected '=' following '#pragma clang section %select{invalid|bss|data|rodata|text}0'">; + "expected '=' following '#pragma clang section %select{invalid|bss|data|rodata|text|relro}0'">; def warn_pragma_expected_section_name : Warning< "expected a string literal for the section name in '#pragma %0' - ignored">, InGroup<IgnoredPragmas>; |