Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 389a399

Browse files
authoredOct 1, 2024
Rollup merge of #130005 - davidlattimore:protected-vis-flag, r=Urgau
Replace -Z default-hidden-visibility with -Z default-visibility Issue #105518
2 parents 8dd5cd0 + f48194e commit 389a399

File tree

14 files changed

+208
-81
lines changed

14 files changed

+208
-81
lines changed
 

‎compiler/rustc_codegen_gcc/src/allocator.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,17 @@ fn create_wrapper_function(
104104
false,
105105
);
106106

107-
if tcx.sess.default_hidden_visibility() {
108-
#[cfg(feature = "master")]
109-
func.add_attribute(FnAttribute::Visibility(gccjit::Visibility::Hidden));
107+
#[cfg(feature = "master")]
108+
match tcx.sess.default_visibility() {
109+
rustc_target::spec::SymbolVisibility::Hidden => {
110+
func.add_attribute(FnAttribute::Visibility(gccjit::Visibility::Hidden))
111+
}
112+
rustc_target::spec::SymbolVisibility::Protected => {
113+
func.add_attribute(FnAttribute::Visibility(gccjit::Visibility::Protected))
114+
}
115+
rustc_target::spec::SymbolVisibility::Interposable => {}
110116
}
117+
111118
if tcx.sess.must_emit_unwind_tables() {
112119
// TODO(antoyo): emit unwind tables.
113120
}

‎compiler/rustc_codegen_llvm/src/allocator.rs

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,20 @@ pub(crate) unsafe fn codegen(
7777
// __rust_alloc_error_handler_should_panic
7878
let name = OomStrategy::SYMBOL;
7979
let ll_g = llvm::LLVMRustGetOrInsertGlobal(llmod, name.as_ptr().cast(), name.len(), i8);
80-
if tcx.sess.default_hidden_visibility() {
81-
llvm::LLVMRustSetVisibility(ll_g, llvm::Visibility::Hidden);
82-
}
80+
llvm::LLVMRustSetVisibility(
81+
ll_g,
82+
llvm::Visibility::from_generic(tcx.sess.default_visibility()),
83+
);
8384
let val = tcx.sess.opts.unstable_opts.oom.should_panic();
8485
let llval = llvm::LLVMConstInt(i8, val as u64, False);
8586
llvm::LLVMSetInitializer(ll_g, llval);
8687

8788
let name = NO_ALLOC_SHIM_IS_UNSTABLE;
8889
let ll_g = llvm::LLVMRustGetOrInsertGlobal(llmod, name.as_ptr().cast(), name.len(), i8);
89-
if tcx.sess.default_hidden_visibility() {
90-
llvm::LLVMRustSetVisibility(ll_g, llvm::Visibility::Hidden);
91-
}
90+
llvm::LLVMRustSetVisibility(
91+
ll_g,
92+
llvm::Visibility::from_generic(tcx.sess.default_visibility()),
93+
);
9294
let llval = llvm::LLVMConstInt(i8, 0, False);
9395
llvm::LLVMSetInitializer(ll_g, llval);
9496
}
@@ -132,9 +134,11 @@ fn create_wrapper_function(
132134
None
133135
};
134136

135-
if tcx.sess.default_hidden_visibility() {
136-
llvm::LLVMRustSetVisibility(llfn, llvm::Visibility::Hidden);
137-
}
137+
llvm::LLVMRustSetVisibility(
138+
llfn,
139+
llvm::Visibility::from_generic(tcx.sess.default_visibility()),
140+
);
141+
138142
if tcx.sess.must_emit_unwind_tables() {
139143
let uwtable =
140144
attributes::uwtable_attr(llcx, tcx.sess.opts.unstable_opts.use_sync_unwind);

‎compiler/rustc_codegen_llvm/src/declare.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use tracing::debug;
2222
use crate::abi::{FnAbi, FnAbiLlvmExt};
2323
use crate::context::CodegenCx;
2424
use crate::llvm::AttributePlace::Function;
25+
use crate::llvm::Visibility;
2526
use crate::type_::Type;
2627
use crate::value::Value;
2728
use crate::{attributes, llvm};
@@ -84,11 +85,7 @@ impl<'ll, 'tcx> CodegenCx<'ll, 'tcx> {
8485
fn_type: &'ll Type,
8586
) -> &'ll Value {
8687
// Declare C ABI functions with the visibility used by C by default.
87-
let visibility = if self.tcx.sess.default_hidden_visibility() {
88-
llvm::Visibility::Hidden
89-
} else {
90-
llvm::Visibility::Default
91-
};
88+
let visibility = Visibility::from_generic(self.tcx.sess.default_visibility());
9289

9390
declare_raw_fn(self, name, llvm::CCallConv, unnamed, visibility, fn_type)
9491
}
@@ -107,11 +104,7 @@ impl<'ll, 'tcx> CodegenCx<'ll, 'tcx> {
107104
unnamed: llvm::UnnamedAddr,
108105
fn_type: &'ll Type,
109106
) -> &'ll Value {
110-
let visibility = if self.tcx.sess.default_hidden_visibility() {
111-
llvm::Visibility::Hidden
112-
} else {
113-
llvm::Visibility::Default
114-
};
107+
let visibility = Visibility::from_generic(self.tcx.sess.default_visibility());
115108
declare_raw_fn(self, name, callconv, unnamed, visibility, fn_type)
116109
}
117110

‎compiler/rustc_codegen_llvm/src/llvm/ffi.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
use std::marker::PhantomData;
55

66
use libc::{c_char, c_int, c_uint, c_ulonglong, c_void, size_t};
7+
use rustc_target::spec::SymbolVisibility;
78

89
use super::RustString;
910
use super::debuginfo::{
@@ -133,6 +134,16 @@ pub enum Visibility {
133134
Protected = 2,
134135
}
135136

137+
impl Visibility {
138+
pub fn from_generic(visibility: SymbolVisibility) -> Self {
139+
match visibility {
140+
SymbolVisibility::Hidden => Visibility::Hidden,
141+
SymbolVisibility::Protected => Visibility::Protected,
142+
SymbolVisibility::Interposable => Visibility::Default,
143+
}
144+
}
145+
}
146+
136147
/// LLVMUnnamedAddr
137148
#[repr(C)]
138149
pub enum UnnamedAddr {

‎compiler/rustc_interface/src/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ fn test_unstable_options_tracking_hash() {
770770
tracked!(crate_attr, vec!["abc".to_string()]);
771771
tracked!(cross_crate_inline_threshold, InliningThreshold::Always);
772772
tracked!(debug_info_for_profiling, true);
773-
tracked!(default_hidden_visibility, Some(true));
773+
tracked!(default_visibility, Some(rustc_target::spec::SymbolVisibility::Hidden));
774774
tracked!(dep_info_omit_d_target, true);
775775
tracked!(direct_access_external_data, Some(true));
776776
tracked!(dual_proc_macros, true);

‎compiler/rustc_middle/src/mir/mono.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use rustc_query_system::ich::StableHashingContext;
1515
use rustc_session::config::OptLevel;
1616
use rustc_span::Span;
1717
use rustc_span::symbol::Symbol;
18+
use rustc_target::spec::SymbolVisibility;
1819
use tracing::debug;
1920

2021
use crate::dep_graph::{DepNode, WorkProduct, WorkProductId};
@@ -305,6 +306,16 @@ pub enum Visibility {
305306
Protected,
306307
}
307308

309+
impl From<SymbolVisibility> for Visibility {
310+
fn from(value: SymbolVisibility) -> Self {
311+
match value {
312+
SymbolVisibility::Hidden => Visibility::Hidden,
313+
SymbolVisibility::Protected => Visibility::Protected,
314+
SymbolVisibility::Interposable => Visibility::Default,
315+
}
316+
}
317+
}
318+
308319
impl<'tcx> CodegenUnit<'tcx> {
309320
#[inline]
310321
pub fn new(name: Symbol) -> CodegenUnit<'tcx> {

‎compiler/rustc_monomorphize/src/partitioning.rs

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -904,26 +904,22 @@ fn mono_item_visibility<'tcx>(
904904
}
905905

906906
fn default_visibility(tcx: TyCtxt<'_>, id: DefId, is_generic: bool) -> Visibility {
907-
if !tcx.sess.default_hidden_visibility() {
908-
return Visibility::Default;
909-
}
910-
911-
// Generic functions never have export-level C.
912-
if is_generic {
913-
return Visibility::Hidden;
914-
}
915-
916-
// Things with export level C don't get instantiated in
917-
// downstream crates.
918-
if !id.is_local() {
919-
return Visibility::Hidden;
920-
}
907+
let export_level = if is_generic {
908+
// Generic functions never have export-level C.
909+
SymbolExportLevel::Rust
910+
} else {
911+
match tcx.reachable_non_generics(id.krate).get(&id) {
912+
Some(SymbolExportInfo { level: SymbolExportLevel::C, .. }) => SymbolExportLevel::C,
913+
_ => SymbolExportLevel::Rust,
914+
}
915+
};
916+
match export_level {
917+
// C-export level items remain at `Default` to allow C code to
918+
// access and interpose them.
919+
SymbolExportLevel::C => Visibility::Default,
921920

922-
// C-export level items remain at `Default`, all other internal
923-
// items become `Hidden`.
924-
match tcx.reachable_non_generics(id.krate).get(&id) {
925-
Some(SymbolExportInfo { level: SymbolExportLevel::C, .. }) => Visibility::Default,
926-
_ => Visibility::Hidden,
921+
// For all other symbols, `default_visibility` determines which visibility to use.
922+
SymbolExportLevel::Rust => tcx.sess.default_visibility().into(),
927923
}
928924
}
929925

‎compiler/rustc_session/src/config.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3008,7 +3008,8 @@ pub(crate) mod dep_tracking {
30083008
use rustc_span::edition::Edition;
30093009
use rustc_target::spec::{
30103010
CodeModel, FramePointer, MergeFunctions, OnBrokenPipe, PanicStrategy, RelocModel,
3011-
RelroLevel, SanitizerSet, SplitDebuginfo, StackProtector, TargetTriple, TlsModel, WasmCAbi,
3011+
RelroLevel, SanitizerSet, SplitDebuginfo, StackProtector, SymbolVisibility, TargetTriple,
3012+
TlsModel, WasmCAbi,
30123013
};
30133014

30143015
use super::{
@@ -3101,6 +3102,7 @@ pub(crate) mod dep_tracking {
31013102
StackProtector,
31023103
SwitchWithOptPath,
31033104
SymbolManglingVersion,
3105+
SymbolVisibility,
31043106
RemapPathScopeComponents,
31053107
SourceFileHashAlgorithm,
31063108
OutFileName,

‎compiler/rustc_session/src/options.rs

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ use rustc_span::edition::Edition;
1313
use rustc_span::{RealFileName, SourceFileHashAlgorithm};
1414
use rustc_target::spec::{
1515
CodeModel, FramePointer, LinkerFlavorCli, MergeFunctions, OnBrokenPipe, PanicStrategy,
16-
RelocModel, RelroLevel, SanitizerSet, SplitDebuginfo, StackProtector, TargetTriple, TlsModel,
17-
WasmCAbi,
16+
RelocModel, RelroLevel, SanitizerSet, SplitDebuginfo, StackProtector, SymbolVisibility,
17+
TargetTriple, TlsModel, WasmCAbi,
1818
};
1919

2020
use crate::config::*;
@@ -416,6 +416,8 @@ mod desc {
416416
"one of: `disabled`, `trampolines`, or `aliases`";
417417
pub(crate) const parse_symbol_mangling_version: &str =
418418
"one of: `legacy`, `v0` (RFC 2603), or `hashed`";
419+
pub(crate) const parse_opt_symbol_visibility: &str =
420+
"one of: `hidden`, `protected`, or `interposable`";
419421
pub(crate) const parse_src_file_hash: &str = "either `md5` or `sha1`";
420422
pub(crate) const parse_relocation_model: &str =
421423
"one of supported relocation models (`rustc --print relocation-models`)";
@@ -922,6 +924,20 @@ mod parse {
922924
true
923925
}
924926

927+
pub(crate) fn parse_opt_symbol_visibility(
928+
slot: &mut Option<SymbolVisibility>,
929+
v: Option<&str>,
930+
) -> bool {
931+
if let Some(v) = v {
932+
if let Ok(vis) = SymbolVisibility::from_str(v) {
933+
*slot = Some(vis);
934+
} else {
935+
return false;
936+
}
937+
}
938+
true
939+
}
940+
925941
pub(crate) fn parse_optimization_fuel(
926942
slot: &mut Option<(String, u64)>,
927943
v: Option<&str>,
@@ -1688,8 +1704,8 @@ options! {
16881704
"compress debug info sections (none, zlib, zstd, default: none)"),
16891705
deduplicate_diagnostics: bool = (true, parse_bool, [UNTRACKED],
16901706
"deduplicate identical diagnostics (default: yes)"),
1691-
default_hidden_visibility: Option<bool> = (None, parse_opt_bool, [TRACKED],
1692-
"overrides the `default_hidden_visibility` setting of the target"),
1707+
default_visibility: Option<SymbolVisibility> = (None, parse_opt_symbol_visibility, [TRACKED],
1708+
"overrides the `default_visibility` setting of the target"),
16931709
dep_info_omit_d_target: bool = (false, parse_bool, [TRACKED],
16941710
"in dep-info output, omit targets for tracking dependencies of the dep-info files \
16951711
themselves (default: no)"),

‎compiler/rustc_session/src/session.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ use rustc_span::{FileNameDisplayPreference, RealFileName, Span, Symbol};
3131
use rustc_target::asm::InlineAsmArch;
3232
use rustc_target::spec::{
3333
CodeModel, DebuginfoKind, PanicStrategy, RelocModel, RelroLevel, SanitizerSet,
34-
SmallDataThresholdSupport, SplitDebuginfo, StackProtector, Target, TargetTriple, TlsModel,
34+
SmallDataThresholdSupport, SplitDebuginfo, StackProtector, SymbolVisibility, Target,
35+
TargetTriple, TlsModel,
3536
};
3637

3738
use crate::code_stats::CodeStats;
@@ -617,12 +618,13 @@ impl Session {
617618
}
618619
}
619620

620-
/// Whether the default visibility of symbols should be "hidden" rather than "default".
621-
pub fn default_hidden_visibility(&self) -> bool {
621+
/// Returns the default symbol visibility.
622+
pub fn default_visibility(&self) -> SymbolVisibility {
622623
self.opts
623624
.unstable_opts
624-
.default_hidden_visibility
625-
.unwrap_or(self.target.options.default_hidden_visibility)
625+
.default_visibility
626+
.or(self.target.options.default_visibility)
627+
.unwrap_or(SymbolVisibility::Interposable)
626628
}
627629
}
628630

‎compiler/rustc_target/src/spec/mod.rs

Lines changed: 60 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -830,6 +830,46 @@ impl RelroLevel {
830830
}
831831
}
832832

833+
#[derive(Clone, Copy, Debug, PartialEq, Hash)]
834+
pub enum SymbolVisibility {
835+
Hidden,
836+
Protected,
837+
Interposable,
838+
}
839+
840+
impl SymbolVisibility {
841+
pub fn desc(&self) -> &str {
842+
match *self {
843+
SymbolVisibility::Hidden => "hidden",
844+
SymbolVisibility::Protected => "protected",
845+
SymbolVisibility::Interposable => "interposable",
846+
}
847+
}
848+
}
849+
850+
impl FromStr for SymbolVisibility {
851+
type Err = ();
852+
853+
fn from_str(s: &str) -> Result<SymbolVisibility, ()> {
854+
match s {
855+
"hidden" => Ok(SymbolVisibility::Hidden),
856+
"protected" => Ok(SymbolVisibility::Protected),
857+
"interposable" => Ok(SymbolVisibility::Interposable),
858+
_ => Err(()),
859+
}
860+
}
861+
}
862+
863+
impl ToJson for SymbolVisibility {
864+
fn to_json(&self) -> Json {
865+
match *self {
866+
SymbolVisibility::Hidden => "hidden".to_json(),
867+
SymbolVisibility::Protected => "protected".to_json(),
868+
SymbolVisibility::Interposable => "interposable".to_json(),
869+
}
870+
}
871+
}
872+
833873
impl FromStr for RelroLevel {
834874
type Err = ();
835875

@@ -2326,13 +2366,12 @@ pub struct TargetOptions {
23262366
/// for this target unconditionally.
23272367
pub no_builtins: bool,
23282368

2329-
/// The default visibility for symbols in this target should be "hidden"
2330-
/// rather than "default".
2369+
/// The default visibility for symbols in this target.
23312370
///
2332-
/// This value typically shouldn't be accessed directly, but through
2333-
/// the `rustc_session::Session::default_hidden_visibility` method, which
2334-
/// allows `rustc` users to override this setting using cmdline flags.
2335-
pub default_hidden_visibility: bool,
2371+
/// This value typically shouldn't be accessed directly, but through the
2372+
/// `rustc_session::Session::default_visibility` method, which allows `rustc` users to override
2373+
/// this setting using cmdline flags.
2374+
pub default_visibility: Option<SymbolVisibility>,
23362375

23372376
/// Whether a .debug_gdb_scripts section will be added to the output object file
23382377
pub emit_debug_gdb_scripts: bool,
@@ -2623,7 +2662,7 @@ impl Default for TargetOptions {
26232662
requires_lto: false,
26242663
singlethread: false,
26252664
no_builtins: false,
2626-
default_hidden_visibility: false,
2665+
default_visibility: None,
26272666
emit_debug_gdb_scripts: true,
26282667
requires_uwtable: false,
26292668
default_uwtable: false,
@@ -2963,6 +3002,18 @@ impl Target {
29633002
Some(Ok(()))
29643003
})).unwrap_or(Ok(()))
29653004
} );
3005+
($key_name:ident, Option<SymbolVisibility>) => ( {
3006+
let name = (stringify!($key_name)).replace("_", "-");
3007+
obj.remove(&name).and_then(|o| o.as_str().and_then(|s| {
3008+
match s.parse::<SymbolVisibility>() {
3009+
Ok(level) => base.$key_name = Some(level),
3010+
_ => return Some(Err(format!("'{}' is not a valid value for \
3011+
symbol-visibility. Use 'hidden', 'protected, or 'interposable'.",
3012+
s))),
3013+
}
3014+
Some(Ok(()))
3015+
})).unwrap_or(Ok(()))
3016+
} );
29663017
($key_name:ident, DebuginfoKind) => ( {
29673018
let name = (stringify!($key_name)).replace("_", "-");
29683019
obj.remove(&name).and_then(|o| o.as_str().and_then(|s| {
@@ -3353,7 +3404,7 @@ impl Target {
33533404
key!(requires_lto, bool);
33543405
key!(singlethread, bool);
33553406
key!(no_builtins, bool);
3356-
key!(default_hidden_visibility, bool);
3407+
key!(default_visibility, Option<SymbolVisibility>)?;
33573408
key!(emit_debug_gdb_scripts, bool);
33583409
key!(requires_uwtable, bool);
33593410
key!(default_uwtable, bool);
@@ -3633,7 +3684,7 @@ impl ToJson for Target {
36333684
target_option_val!(requires_lto);
36343685
target_option_val!(singlethread);
36353686
target_option_val!(no_builtins);
3636-
target_option_val!(default_hidden_visibility);
3687+
target_option_val!(default_visibility);
36373688
target_option_val!(emit_debug_gdb_scripts);
36383689
target_option_val!(requires_uwtable);
36393690
target_option_val!(default_uwtable);

‎src/doc/unstable-book/src/compiler-flags/default-hidden-visibility.md

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# `default-visibility`
2+
3+
The tracking issue for this feature is: https://github.com/rust-lang/rust/issues/131090
4+
5+
------------------------
6+
7+
This flag can be used to override the target's
8+
[`default_visibility`](https://doc.rust-lang.org/beta/nightly-rustc/rustc_target/spec/struct.TargetOptions.html#structfield.default_visibility)
9+
setting.
10+
11+
This option only affects building of shared objects and should have no effect on executables.
12+
13+
Visibility an be set to one of three options:
14+
15+
* protected
16+
* hidden
17+
* interposable
18+
19+
## Hidden visibility
20+
21+
Using `-Zdefault-visibility=hidden` is roughly equivalent to Clang's
22+
[`-fvisibility=hidden`](https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fvisibility)
23+
cmdline flag. Hidden symbols will not be exported from the created shared object, so cannot be
24+
referenced from other shared objects or from executables.
25+
26+
## Protected visibility
27+
28+
Using `-Zdefault-visibility=protected` will cause rust-mangled symbols to be emitted with
29+
"protected" visibility. This signals the compiler, the linker and the runtime linker that these
30+
symbols cannot be overridden by the executable or by other shared objects earlier in the load order.
31+
32+
This will allow the compiler to emit direct references to symbols, which may improve performance. It
33+
also removes the need for these symbols to be resolved when a shared object built with this option
34+
is loaded.
35+
36+
Using protected visibility when linking with GNU ld prior to 2.40 will result in linker errors when
37+
building for Linux. Other linkers such as LLD are not affected.
38+
39+
## Interposable
40+
41+
Using `-Zdefault-visibility=interposable` will cause symbols to be emitted with "default"
42+
visibility. On platforms that support it, this makes it so that symbols can be interposed, which
43+
means that they can be overridden by symbols with the same name from the executable or by other
44+
shared objects earier in the load order.

‎tests/codegen/default-hidden-visibility.rs renamed to ‎tests/codegen/default-visibility.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
// Verifies that `Session::default_hidden_visibility` is affected when using the related cmdline
2-
// flag. This is a regression test for https://github.com/rust-lang/compiler-team/issues/656. See
1+
// Verifies that `Session::default_visibility` is affected when using the related cmdline
2+
// flag. This is a regression test for https://github.com/rust-lang/compiler-team/issues/782. See
33
// also https://github.com/rust-lang/rust/issues/73295 and
44
// https://github.com/rust-lang/rust/issues/37530.
55

6-
//@ revisions:DEFAULT YES NO
7-
//@[YES] compile-flags: -Zdefault-hidden-visibility=yes
8-
//@[NO] compile-flags: -Zdefault-hidden-visibility=no
6+
//@ revisions:DEFAULT HIDDEN PROTECTED INTERPOSABLE
7+
//@[HIDDEN] compile-flags: -Zdefault-visibility=hidden
8+
//@[PROTECTED] compile-flags: -Zdefault-visibility=protected
9+
//@[INTERPOSABLE] compile-flags: -Zdefault-visibility=interposable
910

1011
// The test scenario is specifically about visibility of symbols exported out of dynamically linked
1112
// libraries.
@@ -26,6 +27,7 @@ pub static tested_symbol: [u8; 6] = *b"foobar";
2627
//
2728
//@ only-x86_64-unknown-linux-gnu
2829

29-
// DEFAULT: @{{.*}}default_hidden_visibility{{.*}}tested_symbol{{.*}} = constant
30-
// YES: @{{.*}}default_hidden_visibility{{.*}}tested_symbol{{.*}} = hidden constant
31-
// NO: @{{.*}}default_hidden_visibility{{.*}}tested_symbol{{.*}} = constant
30+
// HIDDEN: @{{.*}}default_visibility{{.*}}tested_symbol{{.*}} = hidden constant
31+
// PROTECTED: @{{.*}}default_visibility{{.*}}tested_symbol{{.*}} = protected constant
32+
// INTERPOSABLE: @{{.*}}default_visibility{{.*}}tested_symbol{{.*}} = constant
33+
// DEFAULT: @{{.*}}default_visibility{{.*}}tested_symbol{{.*}} = constant

0 commit comments

Comments
 (0)
Please sign in to comment.