Skip to content

Commit f8da259

Browse files
committed
Rename Randomized to RandomizeLayout
1 parent 9b0f3de commit f8da259

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

clang/include/clang/Basic/Attr.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3187,7 +3187,7 @@ def ObjCExternallyRetained : InheritableAttr {
31873187
let Documentation = [ObjCExternallyRetainedDocs];
31883188
}
31893189

3190-
def Randomized : InheritableAttr {
3190+
def RandomizeLayout : InheritableAttr {
31913191
let Spellings = [GCC<"randomize_layout">, Declspec<"randomize_layout">,
31923192
Keyword<"randomize_layout">];
31933193
let Subjects = SubjectList<[Record]>;

clang/lib/AST/RecordLayoutBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@ void ItaniumRecordLayoutBuilder::LayoutFields(const RecordDecl *D) {
13621362
bool InsertExtraPadding = D->mayInsertExtraPadding(/*EmitRemark=*/true);
13631363
bool HasFlexibleArrayMember = D->hasFlexibleArrayMember();
13641364

1365-
bool ShouldBeRandomized = D->getAttr<RandomizedAttr>() != nullptr;
1365+
bool ShouldBeRandomized = D->getAttr<RandomizeLayoutAttr>() != nullptr;
13661366
if (ShouldBeRandomized) {
13671367
llvm::outs() << D->getNameAsString() << "\n";
13681368
}

clang/lib/Sema/SemaDeclAttr.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6788,8 +6788,8 @@ static void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D,
67886788
handleSimpleAttributeWithExclusions<NoSpeculativeLoadHardeningAttr,
67896789
SpeculativeLoadHardeningAttr>(S, D, AL);
67906790
break;
6791-
case ParsedAttr::AT_Randomized:
6792-
handleSimpleAttribute<RandomizedAttr>(S, D, AL);
6791+
case ParsedAttr::AT_RandomizeLayout:
6792+
handleSimpleAttribute<RandomizeLayoutAttr>(S, D, AL);
67936793
break;
67946794
case ParsedAttr::AT_CodeSeg:
67956795
handleCodeSegAttr(S, D, AL);

0 commit comments

Comments
 (0)