@@ -151,41 +151,40 @@ bitflags! {
151
151
const OptimizeForSize = 1 << 13 ,
152
152
const StackProtect = 1 << 14 ,
153
153
const StackProtectReq = 1 << 15 ,
154
- const Alignment = 1 << 16 ,
155
154
const NoCapture = 1 << 21 ,
156
155
const NoRedZone = 1 << 22 ,
157
156
const NoImplicitFloat = 1 << 23 ,
158
157
const Naked = 1 << 24 ,
159
158
const InlineHint = 1 << 25 ,
160
- const Stack = 7 << 26 ,
161
159
const ReturnsTwice = 1 << 29 ,
162
160
const UWTable = 1 << 30 ,
163
161
const NonLazyBind = 1 << 31 ,
164
- const OptimizeNone = 1 << 42 ,
165
- }
166
- }
167
162
168
-
169
- #[ repr( u64 ) ]
170
- #[ derive( Copy , Clone ) ]
171
- pub enum OtherAttribute {
172
- // The following are not really exposed in
173
- // the LLVM C api so instead to add these
174
- // we call a wrapper function in RustWrapper
175
- // that uses the C++ api.
176
- SanitizeAddressAttribute = 1 << 32 ,
177
- MinSizeAttribute = 1 << 33 ,
178
- NoDuplicateAttribute = 1 << 34 ,
179
- StackProtectStrongAttribute = 1 << 35 ,
180
- SanitizeThreadAttribute = 1 << 36 ,
181
- SanitizeMemoryAttribute = 1 << 37 ,
182
- NoBuiltinAttribute = 1 << 38 ,
183
- ReturnedAttribute = 1 << 39 ,
184
- ColdAttribute = 1 << 40 ,
185
- BuiltinAttribute = 1 << 41 ,
186
- OptimizeNoneAttribute = 1 << 42 ,
187
- InAllocaAttribute = 1 << 43 ,
188
- NonNullAttribute = 1 << 44 ,
163
+ // Some of these are missing from the LLVM C API, the rest are
164
+ // present, but commented out, and preceded by the following warning:
165
+ // FIXME: These attributes are currently not included in the C API as
166
+ // a temporary measure until the API/ABI impact to the C API is understood
167
+ // and the path forward agreed upon.
168
+ const SanitizeAddress = 1 << 32 ;
169
+ const MinSize = 1 << 33 ;
170
+ const NoDuplicate = 1 << 34 ;
171
+ const StackProtectStrong = 1 << 35 ;
172
+ const SanitizeThread = 1 << 36 ;
173
+ const SanitizeMemory = 1 << 37 ;
174
+ const NoBuiltin = 1 << 38 ;
175
+ const Returned = 1 << 39 ;
176
+ const Cold = 1 << 40 ;
177
+ const Builtin = 1 << 41 ;
178
+ const OptimizeNone = 1 << 42 ;
179
+ const InAlloca = 1 << 43 ;
180
+ const NonNull = 1 << 44 ;
181
+ const JumpTable = 1 << 45 ;
182
+ const Convergent = 1 << 46 ;
183
+ const SafeStack = 1 << 47 ;
184
+ const NoRecurse = 1 << 48 ;
185
+ const InaccessibleMemOnly = 1 << 49 ;
186
+ const InaccessibleMemOrArgMemOnly = 1 << 50 ;
187
+ }
189
188
}
190
189
191
190
#[ derive( Copy , Clone ) ]
@@ -219,20 +218,6 @@ impl AttrHelper for Attribute {
219
218
}
220
219
}
221
220
222
- impl AttrHelper for OtherAttribute {
223
- fn apply_llfn ( & self , idx : c_uint , llfn : ValueRef ) {
224
- unsafe {
225
- LLVMAddFunctionAttribute ( llfn, idx, * self as uint64_t ) ;
226
- }
227
- }
228
-
229
- fn apply_callsite ( & self , idx : c_uint , callsite : ValueRef ) {
230
- unsafe {
231
- LLVMAddCallSiteAttribute ( callsite, idx, * self as uint64_t ) ;
232
- }
233
- }
234
- }
235
-
236
221
impl AttrHelper for SpecialAttribute {
237
222
fn apply_llfn ( & self , idx : c_uint , llfn : ValueRef ) {
238
223
match * self {
0 commit comments