@@ -4099,24 +4099,11 @@ When compiled without ``-fobjc-arc``, this attribute is ignored.
4099
4099
4100
4100
def ClangRandstructDocs : Documentation {
4101
4101
let Category = DocCatVariable;
4102
- let Heading = "randomize_layout, no_randomize_layout" ;
4102
+ let Heading = "randomize_layout;
4103
4103
let Content = [{
4104
- The attributes ``randomize_layout`` and ``no_randomize_layout`` can be applied
4105
- to a record.
4106
-
4107
- ``randomize_layout`` instructs the compiler to randomize the memory layout
4104
+ The attribute ``randomize_layout`` can be applied to the declaration of
4105
+ a record. ``randomize_layout`` instructs the compiler to randomize the memory layout
4108
4106
of the member variables of the record.
4109
-
4110
- Conversely, ``no_randomize_layout`` is used to indicate that if using the
4111
- automatic strucuture selection feature of the Randstruct implementation, the
4112
- compiler should not shuffle the members of the record.
4113
-
4114
- In the event that a record is labeled with both attributes, the compiler will
4115
- emit a warning indicating that these two cannot be used on the same record.
4116
- The default behavior in this case is to not randomize the struct, as the
4117
- attribute ``no_randomize_layout`` takes precedence over ``randomize_layout``.
4118
- This is implementation defined behavior.
4119
-
4120
4107
.. code-block:: c
4121
4108
4122
4109
// Indicates that this struct should be randomized by Randstruct implementation.
@@ -4125,19 +4112,5 @@ This is implementation defined behavior.
4125
4112
char *b;
4126
4113
char *c;
4127
4114
}__attribute__((randomize_layout));
4128
-
4129
- // Indicates that this struct should NOT be randomized by Randstruct implementation.
4130
- struct s {
4131
- char *a;
4132
- char *b;
4133
- char *c;
4134
- }__attribute__((no_randomize_layout));
4135
-
4136
- // Emits compiler warning. Struct is NOT randomized by Randstruct implementation.
4137
- struct s {
4138
- char *a;
4139
- char *b;
4140
- char *c;
4141
- }__attribute__((randomize_layout)) __attribute__((no_randomize_layout));
4142
4115
}];
4143
4116
}
0 commit comments