Skip to content

Commit 7d8c5f5

Browse files
committed
rustc_codegen_llvm: less pubs
1 parent 7d97c59 commit 7d8c5f5

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

compiler/rustc_codegen_llvm/src/llvm/ffi.rs

+11-4
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ pub enum DLLStorageClass {
161161
#[derive(Copy, Clone, Debug)]
162162
pub enum AttributeKind {
163163
AlwaysInline = 0,
164+
#[allow(dead_code)]
164165
ByVal = 1,
165166
Cold = 2,
166167
InlineHint = 3,
@@ -176,15 +177,19 @@ pub enum AttributeKind {
176177
OptimizeForSize = 13,
177178
ReadOnly = 14,
178179
SExt = 15,
180+
#[allow(dead_code)]
179181
StructRet = 16,
182+
#[allow(dead_code)]
180183
UWTable = 17,
181184
ZExt = 18,
182185
InReg = 19,
183186
SanitizeThread = 20,
184187
SanitizeAddress = 21,
185188
SanitizeMemory = 22,
186189
NonLazyBind = 23,
190+
#[allow(dead_code)]
187191
OptimizeNone = 24,
192+
#[allow(dead_code)]
188193
ReadNone = 26,
189194
SanitizeHWAddress = 28,
190195
WillReturn = 29,
@@ -195,6 +200,7 @@ pub enum AttributeKind {
195200
SanitizeMemTag = 34,
196201
NoCfCheck = 35,
197202
ShadowCallStack = 36,
203+
#[allow(dead_code)]
198204
AllocSize = 37,
199205
AllocatedPointer = 38,
200206
AllocAlign = 39,
@@ -289,6 +295,7 @@ impl RealPredicate {
289295
/// LLVMTypeKind
290296
#[derive(Copy, Clone, PartialEq, Debug)]
291297
#[repr(C)]
298+
#[allow(dead_code)]
292299
pub enum TypeKind {
293300
Void = 0,
294301
Half = 1,
@@ -598,6 +605,7 @@ pub enum ThreadLocalMode {
598605
/// LLVMRustTailCallKind
599606
#[derive(Copy, Clone)]
600607
#[repr(C)]
608+
#[allow(dead_code)]
601609
pub enum TailCallKind {
602610
None,
603611
Tail,
@@ -662,9 +670,6 @@ extern "C" {
662670
pub struct Builder<'a>(InvariantOpaque<'a>);
663671
#[repr(C)]
664672
pub struct PassManager<'a>(InvariantOpaque<'a>);
665-
extern "C" {
666-
pub type Pass;
667-
}
668673
extern "C" {
669674
pub type TargetMachine;
670675
}
@@ -696,7 +701,6 @@ extern "C" {
696701
}
697702

698703
pub type DiagnosticHandlerTy = unsafe extern "C" fn(&DiagnosticInfo, *mut c_void);
699-
pub type InlineAsmDiagHandlerTy = unsafe extern "C" fn(&SMDiagnostic, *const c_void, c_uint);
700704

701705
pub mod debuginfo {
702706
use super::{InvariantOpaque, Metadata};
@@ -804,6 +808,7 @@ pub mod debuginfo {
804808
#[repr(C)]
805809
pub enum DebugNameTableKind {
806810
Default,
811+
#[allow(dead_code)]
807812
Gnu,
808813
None,
809814
}
@@ -1563,6 +1568,8 @@ extern "C" {
15631568
Name: *const c_char,
15641569
NameLen: size_t,
15651570
) -> Option<&Value>;
1571+
1572+
#[allow(dead_code)]
15661573
pub fn LLVMRustSetTailCallKind(CallInst: &Value, TKC: TailCallKind);
15671574

15681575
// Operations on attributes

compiler/rustc_codegen_llvm/src/llvm/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub mod archive_ro;
2121
pub mod diagnostic;
2222
mod ffi;
2323

24-
pub use self::ffi::*;
24+
pub(crate) use self::ffi::*;
2525

2626
impl LLVMRustResult {
2727
pub fn into_result(self) -> Result<(), ()> {

compiler/rustc_codegen_llvm/src/type_.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pub use crate::llvm::Type;
1+
pub(crate) use crate::llvm::Type;
22

33
use crate::abi::{FnAbiLlvmExt, LlvmType};
44
use crate::common;

compiler/rustc_codegen_llvm/src/value.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pub use crate::llvm::Value;
1+
pub(crate) use crate::llvm::Value;
22

33
use crate::llvm;
44

0 commit comments

Comments
 (0)