-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix building on ARM #32503
Fix building on ARM #32503
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -964,9 +964,10 @@ extern { | |
pub fn LLVMAddFunctionAttrStringValue(Fn: ValueRef, index: c_uint, | ||
Name: *const c_char, | ||
Value: *const c_char); | ||
pub fn LLVMRemoveFunctionAttributes(Fn: ValueRef, index: c_uint, attr: uint64_t); | ||
pub fn LLVMRemoveFunctionAttrString(Fn: ValueRef, index: c_uint, Name: *const c_char); | ||
pub fn LLVMGetFunctionAttr(Fn: ValueRef) -> c_ulonglong; | ||
pub fn LLVMRemoveFunctionAttr(Fn: ValueRef, val: c_ulonglong); | ||
pub fn LLVMGetFunctionAttr(Fn: ValueRef) -> c_uint; | ||
pub fn LLVMRemoveFunctionAttr(Fn: ValueRef, val: c_uint); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ouch, #17795 strikes again! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @alexcrichton would it be possible to use ctest to check the validity of these LLVM bindings? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In theory yeah, but may be nontrivial to integrate |
||
|
||
/* Operations on parameters */ | ||
pub fn LLVMCountParams(Fn: ValueRef) -> c_uint; | ||
|
@@ -2184,6 +2185,13 @@ pub fn SetFunctionAttribute(fn_: ValueRef, attr: Attribute) { | |
} | ||
} | ||
|
||
pub fn RemoveFunctionAttributes(fn_: ValueRef, attr: Attribute) { | ||
unsafe { | ||
LLVMRemoveFunctionAttributes(fn_, FunctionIndex as c_uint, | ||
attr.bits() as uint64_t) | ||
} | ||
} | ||
|
||
/* Memory-managed interface to target data. */ | ||
|
||
pub struct TargetData { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how come
attr
doens't need to bec_ulonglong
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The C side uses
uint64_t
notunsigned long long
.