Skip to content

Commit 35bdf8b

Browse files
authored
Merge pull request #734 from FractalFir/remove_needless_attr
Skip needlessly setting the default visibility on functions
2 parents 86f5318 + 6388524 commit 35bdf8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mono_item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl<'gcc, 'tcx> PreDefineCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
6464
if linkage != Linkage::Internal && self.tcx.is_compiler_builtins(LOCAL_CRATE) {
6565
#[cfg(feature = "master")]
6666
decl.add_attribute(FnAttribute::Visibility(gccjit::Visibility::Hidden));
67-
} else {
67+
} else if visibility != Visibility::Default {
6868
#[cfg(feature = "master")]
6969
decl.add_attribute(FnAttribute::Visibility(base::visibility_to_gcc(visibility)));
7070
}

0 commit comments

Comments
 (0)