Commit Graph

9 Commits

Author SHA1 Message Date
practicalswift
cc852042c9 [gardening] Fix accidental trailing whitespace. 2016-10-29 10:22:58 +02:00
Doug Gregor
3739470553 [Clang importer] Fix rawValue initializer for swift_newtype'd types.
The code was creating a new "self" rather than using the existing
"self", which was caught by DI.
2016-05-08 00:00:50 -07:00
Joe Groff
0cdbe89576 Fix some regressions with handling of blocks.
- If a @convention(block) function parameter was also marked @noescape, then during type-checking, we would accidentally propagate the convention directly onto a literal closure expr, instead of going through a function_conversion, which SILGen didn't handle. Fixes rdar://problem/23261912.
- If an Objective-C API declared a block parameter with a _Nonnull return of a bridged type, such as NSString *_Nonnull, then native-to-bridged thunking would fail to recognize this case, since we still bridge to an Optional type in the lowered ObjC interface. Fixes rdar://problem/23285766.
2015-11-03 19:29:51 -08:00
Jordan Rose
5af23345f1 Dynamic properties should have dynamic accessors, always.
In particular, observing overrides of Objective-C properties in extensions
were getting non-dynamic accessors synthesized.

rdar://problem/18213447

Swift SVN r22107
2014-09-18 23:39:20 +00:00
Joe Groff
8f52302f8e SILGen: Implement artificial main for NSApplicationMain.
We're not sure how to trigger this from source code yet, so trigger it with a hidden -emit-NSApplicationMain frontend flag for now.

Swift SVN r21563
2014-08-29 04:45:47 +00:00
Joe Groff
793fe06a34 SILGen: Emit an artificial toplevel for files with @UIApplicationMain classes.
If a source file contains the main class for its module, then implicitly emit a top_level_code that invokes UIApplicationMain with the name of the marked class.

Swift SVN r18088
2014-05-15 00:53:38 +00:00
Doug Gregor
6bbbda2798 Make the structure of SILGen's "fake" bridging SDK look more like the real thing.
Specifically, introduce an ObjectiveC model written in Objective-C, and put the relevant, de-duplicated bits (such as NSObject) there. Use -I %S/Inputs -enable-source-import wherever we need to use this bridging SDK.

Swift SVN r17836
2014-05-10 19:50:58 +00:00
John McCall
a83e5740de Import CF types as managed pointers when they are:
- the type of a const global variable
  - the type of a parameter, always
  - the return type of a function that has been audited
    or has an explicit retained/not-retained attribute
  - the return type of an ObjC method that has an explicit
    retain/not-retained/inner-pointer attribute

Additionally, choose the correct conventions for all
these cases during SIL type lowering.

All this importing logic is still only enabled under
-Xfrontend -import-cf-types.

Swift SVN r17543
2014-05-06 08:29:44 +00:00
Stephen Lin
bb92973204 Reorganize test/SIL to match lib/SIL reorganization
Swift SVN r7247
2013-08-15 00:08:20 +00:00