Skip to content

Commit

Permalink
Merge adjacent unsafe extern "C" blocks.
Browse files Browse the repository at this point in the history
  • Loading branch information
nnethercote committed Sep 19, 2024
1 parent c5af8b2 commit 5fd16df
Showing 1 changed file with 2 additions and 26 deletions.
28 changes: 2 additions & 26 deletions compiler/rustc_codegen_llvm/src/llvm/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -560,13 +560,11 @@ pub enum ArchiveKind {
K_AIXBIG,
}

// LLVMRustThinLTOData
unsafe extern "C" {
// LLVMRustThinLTOData
pub type ThinLTOData;
}

// LLVMRustThinLTOBuffer
unsafe extern "C" {
// LLVMRustThinLTOBuffer
pub type ThinLTOBuffer;
}

Expand Down Expand Up @@ -630,26 +628,12 @@ struct InvariantOpaque<'a> {
// Opaque pointer types
unsafe extern "C" {
pub type Module;
}
unsafe extern "C" {
pub type Context;
}
unsafe extern "C" {
pub type Type;
}
unsafe extern "C" {
pub type Value;
}
unsafe extern "C" {
pub type ConstantInt;
}
unsafe extern "C" {
pub type Attribute;
}
unsafe extern "C" {
pub type Metadata;
}
unsafe extern "C" {
pub type BasicBlock;
}
#[repr(C)]
Expand All @@ -658,11 +642,7 @@ pub struct Builder<'a>(InvariantOpaque<'a>);
pub struct PassManager<'a>(InvariantOpaque<'a>);
unsafe extern "C" {
pub type Pass;
}
unsafe extern "C" {
pub type TargetMachine;
}
unsafe extern "C" {
pub type Archive;
}
#[repr(C)]
Expand All @@ -671,11 +651,7 @@ pub struct ArchiveIterator<'a>(InvariantOpaque<'a>);
pub struct ArchiveChild<'a>(InvariantOpaque<'a>);
unsafe extern "C" {
pub type Twine;
}
unsafe extern "C" {
pub type DiagnosticInfo;
}
unsafe extern "C" {
pub type SMDiagnostic;
}
#[repr(C)]
Expand Down

0 comments on commit 5fd16df

Please sign in to comment.