Commit Graph

2331 Commits

Author SHA1 Message Date
Xi Ge
6b699d8855 SourceEntityWalker: keep track of type reference in extension declarations' openings. (#7192)
This is necessary when we want to differentiate between type reference
on extension declaration's start, e.g "extension A {}", and other
references of "A". NFC on existing functionality.
2017-02-01 17:09:01 -08:00
Slava Pestov
b3cabb0745 Use llvm casts in various places instead of looking at {Expr,Decl,TypeBase}::getKind()
Also add some FIXMEs for some code in debug info emission that
looks incorrect.
2017-01-30 00:08:53 -08:00
Erik Eckstein
4d00ac1bba New mangling: add a -new-mangling-for-tests option.
This option enables the new mangling for everything except the Swift stdlib module.
Used to switch test files explicitly to the new mangling.
2017-01-24 15:27:45 -08:00
Slava Pestov
8289a19f53 Merge pull request #6858 from alblue/SR-1676
Enable sourcekitd to be built by default on Linux
2017-01-20 21:11:06 -08:00
Bob Wilson
24a61b5b5d Merge branch 'master-next'
This merge contains the changes to accompany the switch to the new stable
branches of llvm, clang, and compiler-rt that are based on swift-4.0-branch.
2017-01-18 09:22:52 -08:00
Argyrios Kyrtzidis
da1328f04b [sourcekit] Fix assertion hit when doing cursor-info on a subscript parameter declaration.
Fixes rdar:/30060622
2017-01-17 14:56:36 -08:00
Alex Blewitt
3e9f66c6ca Enable sourcekitd to be built by default on Linux
The Linux build has a dependency on the libdispatch library,
which is needed by the various native libraries for sourcekitd.

On macOS, the dependency for libdispatch is satisfied directly through
the base OS, but on Linux no such dependency exists.

Modify this so that if the SourceKit library is built, and the
libdispatch library is already present, then we shell out to make
the libdispatch binary project when the SourceKit is built.

Issue: SR-1676
2017-01-17 19:21:52 +00:00
Alex Blewitt
25fc295e4a Revert "Merge pull request #6807 from alblue/SR-1676"
This reverts commit c85cbe5c78, reversing
changes made to 5d293ab9d2.
2017-01-17 09:47:07 +00:00
Alex Blewitt
f7836ae0c8 Enable sourcekitd to be built by default on Linux
The Linux build has a dependency on the libdispatch library,
which is needed by the various native libraries for sourcekitd.

On macOS, the dependency for libdispatch is satisfied directly through
the base OS, but on Linux no such dependency exists.

Modify this so that if the SourceKit library is built, and the
libdispatch library is already present, then we shell out to make
the libdispatch binary project when the SourceKit is built.

Issue: SR-1676
2017-01-14 10:38:45 +00:00
Bob Wilson
c765d5e3a5 Merge remote-tracking branch 'origin/master' into master-next 2017-01-12 15:58:19 -08:00
Argyrios Kyrtzidis
7076ebbf72 [index] Switch to using the general accessor getter/setter symbol kinds. 2017-01-11 17:09:17 -08:00
Slava Pestov
d2e80da8db Merge pull request #4733 from AquaGeek/sourcekit-docs
[SourceKit] Document source.request.mangle_simple_class
2017-01-11 00:01:57 -08:00
Arnold Schwaighofer
66be1d79fd Merge pull request #6717 from apple/revert-5903-SR-1676
Revert "Enable SourceKit building by default on Linux"
2017-01-10 15:56:36 -08:00
Arnold Schwaighofer
ca12aaacd4 Revert "Enable SourceKit building by default on Linux" 2017-01-10 15:36:29 -08:00
Argyrios Kyrtzidis
db8ec19f55 [index] Use the index symbol types and APIs from the clang header.
This avoids duplication and centralizes handling of symbols.
2017-01-10 14:49:07 -08:00
Argyrios Kyrtzidis
dc25c6b646 Merge pull request #5903 from alblue/SR-1676
Enable SourceKit building by default on Linux
2017-01-10 13:37:50 -08:00
Bob Wilson
cf3a0458f2 Merge remote-tracking branch 'origin/master' into master-next 2017-01-10 09:05:23 -08:00
Doug Coleman
7b06a0425e SourceKit: Fix cmake for ASAN builds on macos. 2017-01-09 14:55:55 -08:00
Nathan Hawes
563bc04da1 Merge pull request #6677 from nathawes/swift-indexing
Add roles and relations for Swift indexing
2017-01-09 14:48:35 -08:00
Tyler Stromberg
b2a099230f [SourceKit] Document source.request.mangle_simple_class 2017-01-09 14:20:02 -08:00
Nathan Hawes
32ba5f24cb [indexer] Don't output implicit symbol names in order to maintain the existing swift index responses 2017-01-09 13:48:47 -08:00
Slava Pestov
dfebf20670 Merge pull request #6387 from hughbe/symlink-win32
[CMake] fix symlink creation on Windows
2017-01-09 12:27:21 -08:00
Bob Wilson
37e7d1c627 Merge remote-tracking branch 'origin/master' into master-next 2017-01-08 17:07:46 -08:00
Brian Gesiak
663b92ece9 [AST] Completely replace Module with ModuleDecl
The typedef `swift::Module` was a temporary solution that allowed
`swift::Module` to be renamed to `swift::ModuleDecl` without requiring
every single callsite to be modified.

Modify all the callsites, and get rid of the typedef.
2017-01-08 00:36:08 -05:00
swift-ci
fa0189510c Merge pull request #6628 from nkcsgexi/synthesized-target-check 2017-01-06 17:28:10 -08:00
Xi Ge
264057dc04 [DocSupport] Ensure synthesized target is correct for enclosed nominal decls inside extension declarations. rdar://29857103 2017-01-06 15:40:14 -08:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
Bob Wilson
4ca0676a34 Merge remote-tracking branch 'origin/master' into master-next 2017-01-05 17:11:16 -08:00
Nathan Hawes
8c45e20d3f [indexer] Add relations to IndexSymbol add a -print-indexed-symbols option to swift-ide-test for testing 2017-01-05 15:01:53 -08:00
Jordan Rose
577b99e232 Merge pull request #6541 from mxswd/fix-cmake
Fixed LIBEDIT failure, not enough global mutable state for CMake!
2017-01-04 17:26:25 -08:00
Xi Ge
4fe46c0a77 [SourceKit][CursorInfo] Add two optional fields when configuring curso-infor request, key.length and key.actionable. NFC
This serves as a skeleton for future extensions on cursor info request.
2017-01-04 13:38:25 -08:00
Maxwell Swadling
35b2c68bd5 Revert "Revert "Introduce and use SWIFT_HAVE_LIBEDIT""
This reverts commit ef49338283.
2017-01-03 17:04:24 -08:00
Bob Wilson
78b28243ff Merge remote-tracking branch 'origin/master' into master-next 2017-01-03 14:22:59 -08:00
Mishal Shah
ef49338283 Revert "Introduce and use SWIFT_HAVE_LIBEDIT" 2017-01-03 11:36:47 -08:00
Hugh Bellamy
888afe139c Fix creating symlinks on Windows 2016-12-27 14:55:05 +00:00
Hugh Bellamy
76a6f87890 Introduce and use SWIFT_HAVE_LIBEDIT 2016-12-22 17:56:08 +00:00
Jordan Rose
5cff812195 Merge pull request #6427 from mxswd/ios-sdk-cleanup
Handle cross-compiling the /compiler/ for iOS.
2016-12-21 16:07:18 -08:00
Maxwell Swadling
e03006d9b0 Removed XPC dependency when unavailable 2016-12-21 13:21:07 -08:00
swift-ci
e264d0207f Merge pull request #6420 from nkcsgexi/reference-kind 2016-12-20 16:56:55 -08:00
Xi Ge
14f968a5ed SourceEntityWalker: Add a parameter to visitDeclReference() describing the kind of the reference under visit. NFC 2016-12-20 14:30:02 -08:00
Arnold Schwaighofer
f38c912878 Add support of a IRGen lowering SIL pipeline.
This pipeline is run as part of IRGen and has access to the IRGenModule.

Passes that run as part of this pipeline can query for the IRGenModule.

We will use it for the AllocStackHoisting pass. It wants to know if a type is of
non-fixed size.

To break the cyclic dependency between IRGen -> SILOptimizer -> IRGen that would
arise from the SILPassManager having to know about the createIRGENPASS()
function IRGen passes instead of exposing this function dynamically have to add
themselves to the pass manager.
2016-12-20 07:51:47 -08:00
practicalswift
9d0b2abfc2 [gardening] Normalize end-of-namespace comments 2016-12-17 22:29:07 +01:00
practicalswift
38be6125e5 [gardening] C++ gardening: Terminate namespaces, fix argument names, ...
Changes:
* Terminate all namespaces with the correct closing comment.
* Make sure argument names in comments match the corresponding parameter name.
* Remove redundant get() calls on smart pointers.
* Prefer using "override" or "final" instead of "virtual". Remove "virtual" where appropriate.
2016-12-17 00:32:42 +01:00
Slava Pestov
2c6b9f71b6 AST: Change TypeAliasDecls to store an interface type as their underlying type
- TypeAliasDecl::getAliasType() is gone. Now, getDeclaredInterfaceType()
  always returns the NameAliasType.

- NameAliasTypes now always desugar to the underlying type as an
  interface type.

- The NameAliasType of a generic type alias no longer desugars to an
  UnboundGenericType; call TypeAliasDecl::getUnboundGenericType() if you
  want that.

- The "lazy mapTypeOutOfContext()" hack for deserialized TypeAliasDecls
  is gone.

- The process of constructing a synthesized TypeAliasDecl is much simpler
  now; instead of calling computeType(), setInterfaceType() and then
  setting the recursive properties in the right order, just call
  setUnderlyingType(), passing it either an interface type or a
  contextual type.

  In particular, many places weren't setting the recursive properties,
  such as the ClangImporter and deserialization. This meant that queries
  such as hasArchetype() or hasTypeParameter() would return incorrect
  results on NameAliasTypes, which caused various subtle problems.

- Finally, add some more tests for generic typealiases, most of which
  fail because they're still pretty broken.
2016-12-15 22:46:15 -08:00
Erik Eckstein
7208b18410 Mangling: support the new mangling prefix in various prefix checks 2016-12-15 14:08:11 -08:00
Bob Wilson
deddf19aae Merge remote-tracking branch 'origin/master' into master-next 2016-12-13 10:23:03 -08:00
practicalswift
76f0fdd670 [gardening] NULL → nullptr 2016-12-09 23:17:54 +01:00
Erik Eckstein
11d8207d0e Mangling: Select the correct mangling scheme for the re-mangler in the compiler 2016-12-09 09:05:15 -08:00
Bob Wilson
13da3fa8b1 Merge remote-tracking branch 'origin/master' into master-next 2016-12-04 18:16:09 -08:00
Doug Gregor
bcde6567d5 [AST] Introduce DeclContext::mapType(Into|OutOf)Context()
Use them to eliminate some more instances of getSelfTypeInContext().
2016-12-02 15:31:04 -08:00