move place
This commit is contained in:
parent
632342a135
commit
e2ec83ced9
@ -586,14 +586,6 @@ pub(crate) fn create_used_variable_impl(&self, name: &'static CStr, values: &[&'
|
||||
llvm::LLVMSetSection(g, c"llvm.metadata".as_ptr());
|
||||
}
|
||||
}
|
||||
|
||||
/// A wrapper for [`llvm::LLVMSetMetadata`], but it takes `Metadata` as a parameter instead of `Value`.
|
||||
pub(crate) fn set_metadata<'a>(&self, val: &'a Value, kind_id: c_uint, md: &'a Metadata) {
|
||||
unsafe {
|
||||
let node = llvm::LLVMMetadataAsValue(&self.llcx, md);
|
||||
llvm::LLVMSetMetadata(val, kind_id, node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ll, 'tcx> MiscCodegenMethods<'tcx> for CodegenCx<'ll, 'tcx> {
|
||||
@ -1126,6 +1118,14 @@ pub(crate) fn generate_local_symbol_name(&self, prefix: &str) -> String {
|
||||
name.push_str(&(idx as u64).to_base(ALPHANUMERIC_ONLY));
|
||||
name
|
||||
}
|
||||
|
||||
/// A wrapper for [`llvm::LLVMSetMetadata`], but it takes `Metadata` as a parameter instead of `Value`.
|
||||
pub(crate) fn set_metadata<'a>(&self, val: &'a Value, kind_id: c_uint, md: &'a Metadata) {
|
||||
unsafe {
|
||||
let node = llvm::LLVMMetadataAsValue(&self.llcx, md);
|
||||
llvm::LLVMSetMetadata(val, kind_id, node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl HasDataLayout for CodegenCx<'_, '_> {
|
||||
|
Loading…
Reference in New Issue
Block a user