diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2021-07-03 17:50:53 +0200 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-05-11 14:35:08 +0000 |
| commit | c50427ba86aadcbec86bf9b35f0c32ee818c7705 (patch) | |
| tree | 83e197f83ee9a1651920042ca11f1808bf8ffd51 /src/allocator.rs | |
| parent | 35836b326b600728f1b4e8724d38fb8e469119c1 (diff) | |
Split AllocatorKind::fn_name in global_fn_name and default_fn_name
Diffstat (limited to 'src/allocator.rs')
| -rw-r--r-- | src/allocator.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/allocator.rs b/src/allocator.rs index f4105b91e98..fe143aaad5f 100644 --- a/src/allocator.rs +++ b/src/allocator.rs @@ -2,7 +2,7 @@ use gccjit::FnAttribute; use gccjit::{FunctionType, GlobalKind, ToRValue}; use rustc_ast::expand::allocator::{ - alloc_error_handler_name, AllocatorKind, AllocatorTy, ALLOCATOR_METHODS, + alloc_error_handler_name, default_fn_name, AllocatorKind, AllocatorTy, ALLOCATOR_METHODS, }; use rustc_middle::bug; use rustc_middle::ty::TyCtxt; @@ -61,7 +61,7 @@ pub(crate) unsafe fn codegen(tcx: TyCtxt<'_>, mods: &mut GccContext, _module_nam // TODO(antoyo): emit unwind tables. } - let callee = AllocatorKind::Default.fn_name(method.name); + let callee = default_fn_name(method.name); let args: Vec<_> = types.iter().enumerate() .map(|(index, typ)| context.new_parameter(None, *typ, &format!("param{}", index))) .collect(); |
