Commit Graph

6 Commits

Author SHA1 Message Date
Harlan Haskins
d3b8ce7ae2 [test] Update ParseableInterface to ModuleInterface
Also remove uses of -emit-parseable-module-interface from tests
2019-09-13 14:55:48 -07:00
Jordan Rose
73d5ebaad2 Rename "textual interface" to "parseable interface" (#19713)
We already have something called "module interfaces" -- it's the
generated interface view that you can see in Xcode, the interface
that's meant for developers using a library. Of course, that's also a
textual format. To reduce confusion, rename the new module stability
feature to "parseable [module] interfaces".
2018-10-04 17:49:55 -07:00
Jordan Rose
3ea754481e [Frontend] Allow -emit-interface with -typecheck (#19676)
Textual module interfaces don't actually depend on SILGen, so we
shouldn't need to run SILGen (or serialize an entire binary module) if
we're just trying to emit a textual interface. On the other hand, if
we /are/ going to run SILGen and then SIL diagnostics, we shouldn't
delay those diagnostics by spending time emitting a textual interface,
or for that matter a TBD file.

Using this, update all the ModuleInterface tests that use
`-emit-module -o /dev/null` to use `-typecheck` instead, except for
those using `-merge-modules`.
2018-10-03 15:07:31 -07:00
Jordan Rose
61057b88db [ModuleInterface] Print names for @usableFromInline struct properties (#19465)
Because they weren't 'public' we were treating them as layout-only
properties and printing `var _`, but they get referenced in inlinable
functions. We need the actual name!
2018-09-26 14:57:44 -07:00
Harlan
eb75ad80dc [AST] Remove stored TypeLoc from TypedPattern (#19175)
* [AST] Remove stored TypeLoc from TypedPattern

TypedPattern was only using this TypeLoc as a means to a TypeRepr, which
caused it to store the pattern type twice (through the superclass and through
the TypeLoc itself.)

This also fixes a bug where deserializing a TypedPattern doesn't store
the type correctly and generally cleans up TypedPattern initialization.

Resolves rdar://44144435

* Address review comments
2018-09-07 21:14:04 -07:00
Harlan
ad7e1d0e67 [InterfaceGen] Print private/internal properties (#19127)
* [Interface] Print private/internal properties

All properties which contribute to the storage of a type should be
printed, and their names should be hidden from interfaces. Print them
with '_' as their name, and teach the parser to recognize these special
patterns when parsing interface files.

Partially resolves rdar://43810647

* Address review comments

* Disable accessor generation for nameless vars

* Test to ensure interface files preserve type layout

* Ignore attribute differences on Linux
2018-09-06 09:58:33 -07:00