Skip to content

Commit 5bdcde2

Browse files
committed
rustc_codegen_llvm: privatize as much of attributes::* as possible.
1 parent 30edd33 commit 5bdcde2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/librustc_codegen_llvm/attributes.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use crate::value::Value;
2626

2727
/// Mark LLVM function to use provided inline heuristic.
2828
#[inline]
29-
pub fn inline(cx: &CodegenCx<'ll, '_>, val: &'ll Value, inline: InlineAttr) {
29+
fn inline(cx: &CodegenCx<'ll, '_>, val: &'ll Value, inline: InlineAttr) {
3030
use self::InlineAttr::*;
3131
match inline {
3232
Hint => Attribute::InlineHint.apply_llfn(Function, val),
@@ -58,7 +58,7 @@ fn unwind(val: &'ll Value, can_unwind: bool) {
5858

5959
/// Tell LLVM if this function should be 'naked', i.e., skip the epilogue and prologue.
6060
#[inline]
61-
pub fn naked(val: &'ll Value, is_naked: bool) {
61+
fn naked(val: &'ll Value, is_naked: bool) {
6262
Attribute::Naked.toggle_llfn(Function, val, is_naked);
6363
}
6464

@@ -72,7 +72,7 @@ pub fn set_frame_pointer_elimination(cx: &CodegenCx<'ll, '_>, llfn: &'ll Value)
7272

7373
/// Tell LLVM what instrument function to insert.
7474
#[inline]
75-
pub fn set_instrument_function(cx: &CodegenCx<'ll, '_>, llfn: &'ll Value) {
75+
fn set_instrument_function(cx: &CodegenCx<'ll, '_>, llfn: &'ll Value) {
7676
if cx.sess().instrument_mcount() {
7777
// Similar to `clang -pg` behavior. Handled by the
7878
// `post-inline-ee-instrument` LLVM pass.
@@ -88,7 +88,7 @@ pub fn set_instrument_function(cx: &CodegenCx<'ll, '_>, llfn: &'ll Value) {
8888
}
8989
}
9090

91-
pub fn set_probestack(cx: &CodegenCx<'ll, '_>, llfn: &'ll Value) {
91+
fn set_probestack(cx: &CodegenCx<'ll, '_>, llfn: &'ll Value) {
9292
// Only use stack probes if the target specification indicates that we
9393
// should be using stack probes
9494
if !cx.sess().target.target.options.stack_probes {

0 commit comments

Comments
 (0)