@@ -363,33 +363,6 @@ pub(crate) enum TypeKind {
363363 X86_AMX = 19 ,
364364}
365365
366- impl TypeKind {
367- pub ( crate ) fn to_generic ( self ) -> rustc_codegen_ssa:: common:: TypeKind {
368- use rustc_codegen_ssa:: common:: TypeKind as Common ;
369- match self {
370- Self :: Void => Common :: Void ,
371- Self :: Half => Common :: Half ,
372- Self :: Float => Common :: Float ,
373- Self :: Double => Common :: Double ,
374- Self :: X86_FP80 => Common :: X86_FP80 ,
375- Self :: FP128 => Common :: FP128 ,
376- Self :: PPC_FP128 => Common :: PPC_FP128 ,
377- Self :: Label => Common :: Label ,
378- Self :: Integer => Common :: Integer ,
379- Self :: Function => Common :: Function ,
380- Self :: Struct => Common :: Struct ,
381- Self :: Array => Common :: Array ,
382- Self :: Pointer => Common :: Pointer ,
383- Self :: Vector => Common :: Vector ,
384- Self :: Metadata => Common :: Metadata ,
385- Self :: Token => Common :: Token ,
386- Self :: ScalableVector => Common :: ScalableVector ,
387- Self :: BFloat => Common :: BFloat ,
388- Self :: X86_AMX => Common :: X86_AMX ,
389- }
390- }
391- }
392-
393366/// LLVMAtomicRmwBinOp
394367#[ derive( Copy , Clone ) ]
395368#[ repr( C ) ]
@@ -738,12 +711,9 @@ unsafe extern "C" {
738711pub ( crate ) type DiagnosticHandlerTy = unsafe extern "C" fn ( & DiagnosticInfo , * mut c_void ) ;
739712
740713pub ( crate ) mod debuginfo {
741- use std:: ptr;
742-
743714 use bitflags:: bitflags;
744715
745716 use super :: { InvariantOpaque , Metadata } ;
746- use crate :: llvm:: { self , Module } ;
747717
748718 /// Opaque target type for references to an LLVM debuginfo builder.
749719 ///
@@ -756,33 +726,6 @@ pub(crate) mod debuginfo {
756726 #[ repr( C ) ]
757727 pub ( crate ) struct DIBuilder < ' ll > ( InvariantOpaque < ' ll > ) ;
758728
759- /// Owning pointer to a `DIBuilder<'ll>` that will dispose of the builder
760- /// when dropped. Use `.as_ref()` to get the underlying `&DIBuilder`
761- /// needed for debuginfo FFI calls.
762- pub ( crate ) struct DIBuilderBox < ' ll > {
763- raw : ptr:: NonNull < DIBuilder < ' ll > > ,
764- }
765-
766- impl < ' ll > DIBuilderBox < ' ll > {
767- pub ( crate ) fn new ( llmod : & ' ll Module ) -> Self {
768- let raw = unsafe { llvm:: LLVMCreateDIBuilder ( llmod) } ;
769- let raw = ptr:: NonNull :: new ( raw) . unwrap ( ) ;
770- Self { raw }
771- }
772-
773- pub ( crate ) fn as_ref ( & self ) -> & DIBuilder < ' ll > {
774- // SAFETY: This is an owning pointer, so `&DIBuilder` is valid
775- // for as long as `&self` is.
776- unsafe { self . raw . as_ref ( ) }
777- }
778- }
779-
780- impl < ' ll > Drop for DIBuilderBox < ' ll > {
781- fn drop ( & mut self ) {
782- unsafe { llvm:: LLVMDisposeDIBuilder ( self . raw ) } ;
783- }
784- }
785-
786729 pub ( crate ) type DIDescriptor = Metadata ;
787730 pub ( crate ) type DILocation = Metadata ;
788731 pub ( crate ) type DIScope = DIDescriptor ;
0 commit comments