Remove in_band_lifetimes
from rustc_codegen_llvm
See #91867 for more information.
This commit is contained in:
parent
1d01550f7e
commit
4937a55dfb
28 changed files with 429 additions and 392 deletions
|
@ -31,13 +31,13 @@ impl LLVMRustResult {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn AddFunctionAttrStringValue(llfn: &'a Value, idx: AttributePlace, attr: &CStr, value: &CStr) {
|
||||
pub fn AddFunctionAttrStringValue(llfn: &Value, idx: AttributePlace, attr: &CStr, value: &CStr) {
|
||||
unsafe {
|
||||
LLVMRustAddFunctionAttrStringValue(llfn, idx.as_uint(), attr.as_ptr(), value.as_ptr())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn AddFunctionAttrString(llfn: &'a Value, idx: AttributePlace, attr: &CStr) {
|
||||
pub fn AddFunctionAttrString(llfn: &Value, idx: AttributePlace, attr: &CStr) {
|
||||
unsafe {
|
||||
LLVMRustAddFunctionAttrStringValue(llfn, idx.as_uint(), attr.as_ptr(), std::ptr::null())
|
||||
}
|
||||
|
@ -86,12 +86,12 @@ impl FromStr for ArchiveKind {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn SetInstructionCallConv(instr: &'a Value, cc: CallConv) {
|
||||
pub fn SetInstructionCallConv(instr: &Value, cc: CallConv) {
|
||||
unsafe {
|
||||
LLVMSetInstructionCallConv(instr, cc as c_uint);
|
||||
}
|
||||
}
|
||||
pub fn SetFunctionCallConv(fn_: &'a Value, cc: CallConv) {
|
||||
pub fn SetFunctionCallConv(fn_: &Value, cc: CallConv) {
|
||||
unsafe {
|
||||
LLVMSetFunctionCallConv(fn_, cc as c_uint);
|
||||
}
|
||||
|
@ -103,26 +103,26 @@ pub fn SetFunctionCallConv(fn_: &'a Value, cc: CallConv) {
|
|||
// value's name as the comdat value to make sure that it is in a 1-to-1 relationship to the
|
||||
// function.
|
||||
// For more details on COMDAT sections see e.g., https://www.airs.com/blog/archives/52
|
||||
pub fn SetUniqueComdat(llmod: &Module, val: &'a Value) {
|
||||
pub fn SetUniqueComdat(llmod: &Module, val: &Value) {
|
||||
unsafe {
|
||||
let name = get_value_name(val);
|
||||
LLVMRustSetComdat(llmod, val, name.as_ptr().cast(), name.len());
|
||||
}
|
||||
}
|
||||
|
||||
pub fn UnsetComdat(val: &'a Value) {
|
||||
pub fn UnsetComdat(val: &Value) {
|
||||
unsafe {
|
||||
LLVMRustUnsetComdat(val);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn SetUnnamedAddress(global: &'a Value, unnamed: UnnamedAddr) {
|
||||
pub fn SetUnnamedAddress(global: &Value, unnamed: UnnamedAddr) {
|
||||
unsafe {
|
||||
LLVMSetUnnamedAddress(global, unnamed);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_thread_local_mode(global: &'a Value, mode: ThreadLocalMode) {
|
||||
pub fn set_thread_local_mode(global: &Value, mode: ThreadLocalMode) {
|
||||
unsafe {
|
||||
LLVMSetThreadLocalMode(global, mode);
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ pub struct OperandBundleDef<'a> {
|
|||
pub raw: &'a mut ffi::OperandBundleDef<'a>,
|
||||
}
|
||||
|
||||
impl OperandBundleDef<'a> {
|
||||
impl<'a> OperandBundleDef<'a> {
|
||||
pub fn new(name: &str, vals: &[&'a Value]) -> Self {
|
||||
let name = SmallCStr::new(name);
|
||||
let def = unsafe {
|
||||
|
@ -274,7 +274,7 @@ impl OperandBundleDef<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl Drop for OperandBundleDef<'a> {
|
||||
impl Drop for OperandBundleDef<'_> {
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
LLVMRustFreeOperandBundleDef(&mut *(self.raw as *mut _));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue