mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add a mode in which access control is respected for module-scope lookups.
This applies to both qualified and unqualified lookups, and is controlled by the -enable-access-control and -disable-access-control flags. I've included both so that -disable-access-control can be put into specific tests that will eventually need to bypass access control (e.g. stdlib unit tests). The default is still -disable-access-control. Swift SVN r19146
This commit is contained in:
@@ -540,6 +540,12 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
|
||||
Opts.EnableCharacterLiterals |= Args.hasArg(OPT_enable_character_literals);
|
||||
|
||||
if (auto A = Args.getLastArg(OPT_enable_access_control,
|
||||
OPT_disable_access_control)) {
|
||||
Opts.EnableAccessControl
|
||||
= A->getOption().matches(OPT_enable_access_control);
|
||||
}
|
||||
|
||||
Opts.DebugConstraintSolver |= Args.hasArg(OPT_debug_constraints);
|
||||
|
||||
Opts.DebuggerSupport |= Args.hasArg(OPT_debugger_support);
|
||||
|
||||
Reference in New Issue
Block a user