Commit Graph

22 Commits

Author SHA1 Message Date
Xi Ge
8cce226621 USR: Also add nominal check for the inheritance. 2016-03-16 19:27:34 -07:00
Xi Ge
e9e2a264c3 USR: Not crashing when extended type are not nominal, say, a type alias. 2016-03-16 19:20:50 -07:00
Xi Ge
aa44cfcbf0 [Serialization] Mock USRs for inheritance-only extensions so that their comments can be serialized as well.
Suggested by @jrose-apple
2016-03-16 17:29:37 -07:00
Xi Ge
f81d82efd5 [Serialization] Change the prefix to make extension USR be consistent with other Swift USRs.
Suggested by @@benlangmuir
2016-03-16 17:29:37 -07:00
Xi Ge
2751bb96b6 [Serialization] Shorten extension USRs.
We actually do not need to pre-append the USR of the extended nominal;
a short mangling-incompatible prefix will sufficiently do the trick.

Suggested by @jrose-apple.
2016-03-15 18:10:58 -07:00
Xi Ge
d0e176810f [Serialization] Serialize doc comments for extensions. Need this for rdar://25157796
We did not serialize them because getting USR for extensions is tricky (USRs are
usually for value decls). This commit starts to make up an USR for an extension by combining
the extended nominal's USR with the USR of the first value member of the extension. We use
this made-up USR to associate doc comments when (de)serializing them.
2016-03-15 13:35:07 -07:00
Chris Lattner
ae919bd447 implement mangling support for typealias archetypes, allowing them to get basic USRs. 2016-03-08 21:18:39 -08:00
Ben Langmuir
bac7521af7 [SourceKit] Fix crash with cursor info on generic typealias
For now, just skip mangling the name since we know the decl context will
crash the mangler.
2016-03-08 18:03:42 -08:00
Slava Pestov
6af7f95a5a We don't need to plumb a resilience expansion through mangling, NFC
I'm going to be adding deployment target info ResilienceExpansion
soon so removing unnecessary usages helps reduce the amount of
work there.
2016-01-07 08:15:26 -08:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Nadav Rotem
07d4558c1c [Mangler] Change the Swift mangler into a symbol builder.
This commit changes the Swift mangler from a utility that writes tokens into a
stream into a name-builder that has two phases: "building a name", and "ready".
This clear separation is needed for the implementation of the compression layer.

Users of the mangler can continue to build the name using the mangleXXX methods,
but to access the results the users of the mangler need to call the finalize()
method. This method can write the result into a stream, like before, or return
an std::string.
2015-12-25 21:40:25 -08:00
practicalswift
cd7d8dfaff Fix alignment as requested by @gribozavr in #692 2015-12-21 08:54:24 +01:00
practicalswift
176f487d76 Fix incorrect filenames in headers. 2015-12-20 23:59:05 +01:00
John McCall
dc4431ebff Split addressors into unsafe, owning, and pinning variants.
Change all the existing addressors to the unsafe variant.

Update the addressor mangling to include the variant.

The addressor and mutable-addressor may be any of the
variants, independent of the choice for the other.

SILGen and code synthesis for the new variants is still
untested.

Swift SVN r24387
2015-01-13 03:09:16 +00:00
Argyrios Kyrtzidis
2e99e4da12 [IDE] Fix crash when trying to get the USR of an invalid enum element.
rdar://18314290

Swift SVN r21937
2014-09-13 03:54:11 +00:00
Argyrios Kyrtzidis
918f373d97 [AST] For USR generation, ignore symbols coming from the builtin module.
Swift SVN r17858
2014-05-11 00:00:57 +00:00
Argyrios Kyrtzidis
cc0fa4e1f7 [AST] Ignore unnamed vars for USR generation.
Swift SVN r17831
2014-05-10 19:15:09 +00:00
Argyrios Kyrtzidis
489d1d62cb [IDE] ide::printDeclUSR() should not try to get the USR for ValueDecls without types, due to invalid code.
Test case on SourceKit side.
Fixes crash of rdar://16746734.

Swift SVN r17023
2014-04-29 06:46:04 +00:00
Dmitri Hrybenko
28b05c99b4 Rework r16878. Now we refuse to generate a USR for 'self' in destructors
Filed rdar://16734962 to investigate the real bug.


Swift SVN r16881
2014-04-26 14:12:31 +00:00
Dmitri Hrybenko
c2354eb365 USR generation: generate USRs for imported macros
I do feel bad about introducing ClangModuleLoader, but it is better than a
layering violation (using libClangImporter from libAST).


Swift SVN r15679
2014-03-31 15:13:00 +00:00
Dmitri Hrybenko
866511e27d Add mangling for SubscriptDecls to allow us to produce USRs for them
<rdar://problem/16237251> USR generator skips SubscriptDecls


Swift SVN r14923
2014-03-11 18:03:04 +00:00
Dmitri Hrybenko
49754619ee Move USR generation to AST library, so that Serialization library can use it
Swift SVN r14681
2014-03-05 11:31:31 +00:00