Skip to content

Commit 063f1b1

Browse files
Nixoncolejeff
authored andcommitted
Added the 'no_randomize_layout' attr to clang
1 parent bf4b55f commit 063f1b1

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

clang/include/clang/Basic/Attr.td

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3208,3 +3208,10 @@ def RandomizeLayout : InheritableAttr {
32083208
let Subjects = SubjectList<[Record]>;
32093209
let Documentation = [Undocumented];
32103210
}
3211+
3212+
def NoRandomizeLayout : InheritableAttr {
3213+
let Spellings = [GCC<"no_randomize_layout">, Declspec<"no_randomize_layout">,
3214+
Keyword<"no_randomize_layout">];
3215+
let Subjects = SubjectList<[Record]>;
3216+
let Documentation = [Undocumented];
3217+
}

clang/lib/Sema/SemaDeclAttr.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6856,6 +6856,9 @@ static void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D,
68566856
case ParsedAttr::AT_RandomizeLayout:
68576857
handleSimpleAttribute<RandomizeLayoutAttr>(S, D, AL);
68586858
break;
6859+
case ParsedAttr::AT_NoRandomizeLayout:
6860+
handleSimpleAttribute<NoRandomizeLayoutAttr>(S, D, AL);
6861+
break;
68596862
case ParsedAttr::AT_CodeSeg:
68606863
handleCodeSegAttr(S, D, AL);
68616864
break;

0 commit comments

Comments
 (0)