about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src/abi
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-06-16 21:35:16 -0400
committerMichael Goulet <michael@errs.io>2024-06-16 21:35:21 -0400
commit342c1b03d6d0f9aa1e8119a2556d819af024faaf (patch)
tree6e2b506491d9600f743918a7cec85bfe2757b12b /compiler/rustc_codegen_cranelift/src/abi
parent55cac26a9ef17da1c9c77c0816e88e178b7cc5dd (diff)
Rename InstanceDef -> InstanceKind
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/abi')
-rw-r--r--compiler/rustc_codegen_cranelift/src/abi/mod.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/abi/mod.rs b/compiler/rustc_codegen_cranelift/src/abi/mod.rs
index bd5a8876905..695dbaf2804 100644
--- a/compiler/rustc_codegen_cranelift/src/abi/mod.rs
+++ b/compiler/rustc_codegen_cranelift/src/abi/mod.rs
@@ -399,7 +399,7 @@ pub(crate) fn codegen_terminator_call<'tcx>(
         }
 
         match instance.def {
-            InstanceDef::Intrinsic(_) => {
+            InstanceKind::Intrinsic(_) => {
                 match crate::intrinsics::codegen_intrinsic_call(
                     fx,
                     instance,
@@ -412,7 +412,7 @@ pub(crate) fn codegen_terminator_call<'tcx>(
                     Err(instance) => Some(instance),
                 }
             }
-            InstanceDef::DropGlue(_, None) | ty::InstanceDef::AsyncDropGlueCtorShim(_, None) => {
+            InstanceKind::DropGlue(_, None) | ty::InstanceKind::AsyncDropGlueCtorShim(_, None) => {
                 // empty drop glue - a nop.
                 let dest = target.expect("Non terminating drop_in_place_real???");
                 let ret_block = fx.get_block(dest);
@@ -494,7 +494,7 @@ pub(crate) fn codegen_terminator_call<'tcx>(
 
     let (func_ref, first_arg_override) = match instance {
         // Trait object call
-        Some(Instance { def: InstanceDef::Virtual(_, idx), .. }) => {
+        Some(Instance { def: InstanceKind::Virtual(_, idx), .. }) => {
             if fx.clif_comments.enabled() {
                 let nop_inst = fx.bcx.ins().nop();
                 fx.add_comment(
@@ -598,7 +598,7 @@ pub(crate) fn codegen_drop<'tcx>(
     let ty = drop_place.layout().ty;
     let drop_instance = Instance::resolve_drop_in_place(fx.tcx, ty).polymorphize(fx.tcx);
 
-    if let ty::InstanceDef::DropGlue(_, None) | ty::InstanceDef::AsyncDropGlueCtorShim(_, None) =
+    if let ty::InstanceKind::DropGlue(_, None) | ty::InstanceKind::AsyncDropGlueCtorShim(_, None) =
         drop_instance.def
     {
         // we don't actually need to drop anything
@@ -630,7 +630,7 @@ pub(crate) fn codegen_drop<'tcx>(
                 // FIXME(eddyb) perhaps move some of this logic into
                 // `Instance::resolve_drop_in_place`?
                 let virtual_drop = Instance {
-                    def: ty::InstanceDef::Virtual(drop_instance.def_id(), 0),
+                    def: ty::InstanceKind::Virtual(drop_instance.def_id(), 0),
                     args: drop_instance.args,
                 };
                 let fn_abi =
@@ -673,7 +673,7 @@ pub(crate) fn codegen_drop<'tcx>(
                 fx.bcx.switch_to_block(continued);
 
                 let virtual_drop = Instance {
-                    def: ty::InstanceDef::Virtual(drop_instance.def_id(), 0),
+                    def: ty::InstanceKind::Virtual(drop_instance.def_id(), 0),
                     args: drop_instance.args,
                 };
                 let fn_abi =
@@ -684,7 +684,7 @@ pub(crate) fn codegen_drop<'tcx>(
                 fx.bcx.ins().call_indirect(sig, drop_fn, &[data]);
             }
             _ => {
-                assert!(!matches!(drop_instance.def, InstanceDef::Virtual(_, _)));
+                assert!(!matches!(drop_instance.def, InstanceKind::Virtual(_, _)));
 
                 let fn_abi =
                     RevealAllLayoutCx(fx.tcx).fn_abi_of_instance(drop_instance, ty::List::empty());