summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/clang/Basic/Attr.td8
-rw-r--r--include/clang/Basic/DiagnosticParseKinds.td4
-rw-r--r--include/clang/Sema/Sema.h4
3 files changed, 13 insertions, 3 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>;
diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h
index 6b2d603206..7c93d40952 100644
--- a/include/clang/Sema/Sema.h
+++ b/include/clang/Sema/Sema.h
@@ -418,7 +418,8 @@ public:
PCSK_BSS = 1,
PCSK_Data = 2,
PCSK_Rodata = 3,
- PCSK_Text = 4
+ PCSK_Text = 4,
+ PCSK_Relro = 5
};
enum PragmaClangSectionAction {
@@ -439,6 +440,7 @@ public:
PragmaClangSection PragmaClangBSSSection;
PragmaClangSection PragmaClangDataSection;
PragmaClangSection PragmaClangRodataSection;
+ PragmaClangSection PragmaClangRelroSection;
PragmaClangSection PragmaClangTextSection;
enum PragmaMsStackAction {