Fixes rdar://problem/14776565 (AnyObject lookup for Objective-C
properties with custom getters) and rdar://problem/17184411 (allowing
__attribute__((swift_name("foo"))) to work on anything).
The Swift name lookup tables record name -> declaration mappings
without respect to submodule visibility. When we do name lookup via
those lookup tables, filter out declarations that are not visible.
Note that this implementation is broken in the same way that the
pre-name-lookup-tables implementation is broken, because it uses
Clang's declaration visibility indicators rather than filtering out
based on submodule lookups. We should fix this behavior to provide
proper submodule lookup, but not until after we've matched the
existing behavior with Swift's name lookup tables.
OpenAL.AL is gone.
This module no longer has only explicit submodules, so just remove it.
I'll file a radar to add a synthetic test to fill in the gap since there
are no longer any other modules in the SDK that have this structure.
rdar://21118411
Swift SVN r29077
This came out of today's language review meeting.
The intent is to match #available with the attribute
that describes availability.
This is a divergence from Objective-C.
Swift SVN r28484
Enable checking for uses of potentially unavailable APIs. There is
a frontend option to disable it: -disable-availability-checking.
This commit updates the SDK overlays with @availability() annotations for the
declarations where the overlay refers to potentially unavailable APIs. It also changes
several tests that refer to potentially unavailable APIs to use either #available()
or @availability annotations.
Swift SVN r27272
Per Ben's suggestion, use OpenAL as an example of a module with only
explicit submodules. Continue testing OpenGL on OS X since we've gotten
several bugs about it.
Swift SVN r20320
Specifically, handle them by also importing the top-level module. This is
unfortunate, but at least lets people /access/ things in explicit submodules,
even if it doesn't let them limit their import to a specific submodule.
(swift) import OpenGL.GL3
(swift) glGetString
// r0 : (GLenum) -> ConstUnsafePointer<GLubyte> = (Function)
(swift) OpenGL.glGetString
// r1 : (GLenum) -> ConstUnsafePointer<GLubyte> = (Function)
One unfortunate side effect of having a single Clang ASTContext is that if
one Swift module imports a Clang submodule, every Swift module can now see
it. That means /mixing/ incompatible submodules, such as OpenGL.GL and
OpenGL.GL3, still won't work. Filed <rdar://problem/17756745> for that.
<rdar://problem/13140302>
Swift SVN r20288