Commit Graph

37 Commits

Author SHA1 Message Date
Saleem Abdulrasool
a8334dba30 test: fix after 45dc14a275
Fix the tests after 45dc14a275.
2020-03-26 15:36:51 -07:00
Nathan Hawes
45dc14a275 [Index][test] Fix test/Index/Store/cross-import-overly.swift to handle units being printed out of order.
c-index-test sorts the units by their file name, which for the modules in
in this test is just [target-triple].swiftinterface-[hash-of-full-output-path]
and so changes depending on where it's run.
2020-03-25 20:51:56 -07:00
Nathan Hawes
a785fa6cee [Frontend][Index] Add frontend option to skip indexing the stdlib (for test performance)
Several tests related to indexing system modules were taking a considerable
amount of time (100+ seconds in the worst case) indexing the standard library.
This adds a frontend option to skip it and updates those tests to pass it.
2020-03-25 14:36:23 -07:00
Nathan Hawes
8b03b05f1d [Index] Add index support for cross import overlays.
Resolves rdar://problem/59445445
2020-03-25 10:04:41 -07:00
Suyash Srijan
d62411535b [CSSimplify] Guard against null locator in isSelfRecursiveKeyPathDynamicMemberLookup (#29886) 2020-02-17 21:28:44 +00:00
Joe Groff
fb34044408 Merge remote-tracking branch 'origin/master' into master-next 2019-12-10 12:46:41 -08:00
Nathan Hawes
77f3cb013f [Index] Fix pseudo accessor USRs generation to distinguish instance vs static accessors
It was hard-coding IsStatic to false rather than passing it through from the
VarDecl, giving the same USR for the two getters in the below:

class FixtureClass95 {
    private static var someVar: String!
    private var someVar: String!
}

Resolves rdar://problem/44531531
2019-11-21 15:11:47 -08:00
swift-ci
4f4bf165e8 Merge remote-tracking branch 'origin/master' into master-next 2019-10-07 19:29:21 -07:00
Daniel Rodríguez Troitiño
70b1d91315 [windows] Allow EXE and exe capitalizations in tests.
Clang 8 or 9 seems to have changed from EXE to exe. Allow both
capitalizations (which is not important in Windows) as a workaround.

Maybe in the future we can remove the uppercase option.
2019-10-03 11:09:03 -07:00
swift-ci
cdffb88fe8 Merge remote-tracking branch 'origin/master' into master-next 2019-09-12 18:10:45 -07:00
Jordan Rose
9e6d4db6d0 [Frontend] Avoid doing whole-module work under primary-file typecheck (#27153)
...a situation we get into with indexing. The way Xcode generates
indexing invocations is to take a build command and add additional
flags to it; in order for the Driver to produce a single frontend
command from /that/, it currently plans as if it's going to do a
whole-module -typecheck and then turns around and uses -primary-file
anyway. This is questionable practice, to be sure...

...but meanwhile, let's not crash by trying to access declarations
that haven't been type-checked yet.

rdar://problem/53117124
2019-09-12 17:53:06 -07:00
swift-ci
1d2afc4bb0 Merge remote-tracking branch 'origin/master' into master-next 2019-09-11 21:10:13 -07:00
Doug Gregor
7151d0e3d7 [Type checker] Fix a crash triggered from index-while-building. 2019-09-11 14:28:35 -07:00
Jonas Devlieghere
b4d268e9e1 Migrate llvm::make_unique to std::make_unique
Now that we've moved to C++14, we no longer need the llvm::make_unique
implementation from STLExtras.h. This patch is a mechanical replacement
of (hopefully) all the llvm::make_unique instances in the swift repo.
2019-08-15 11:32:39 -07:00
Argyrios Kyrtzidis
e23d3e3fbb [driver] For -index-file mode add -disable-typo-correction
We don't need typo-correction for that since the errors will be ignored and it can be expensive to do typo-correction.
2019-06-20 08:22:15 -07:00
Saleem Abdulrasool
3223750f20 test: disable Index.Store.output-failure on Windows
`chmod -w` really doesn't make sense on Windows.  Although NTFS allows
for readonly directories, it is something done through file system level
ACLs.  This test doesn't really apply to Windows.
2019-03-27 13:02:05 -07:00
Saleem Abdulrasool
348520c4f1 Merge pull request #22688 from sarveshtamba/master
Changes for test failures on PowerPC64LE when running as non-root user
2019-02-25 08:26:54 -08:00
swift-ci
b52472bac2 Merge pull request #22724 from compnerd/a-spotlight-on-indexing 2019-02-19 15:12:59 -08:00
Jordan Rose
43feb9cbe1 On Apple platforms, use swiftmodule directories for the stdlib (#21797)
This changes the Swift resource directory from looking like

    lib/
      swift/
        macosx/
          libswiftCore.dylib
          libswiftDarwin.dylib
          x86_64/
            Swift.swiftmodule
            Swift.swiftdoc
            Darwin.swiftmodule
            Darwin.swiftdoc

to

    lib/
      swift/
        macosx/
          libswiftCore.dylib
          libswiftDarwin.dylib
          Swift.swiftmodule/
            x86_64.swiftmodule
            x86_64.swiftdoc
          Darwin.swiftmodule/
            x86_64.swiftmodule
            x86_64.swiftdoc

matching the layout we use for multi-architecture swiftmodules
everywhere else (particularly frameworks).

There's no change in this commit to how Linux swiftmodules are
packaged. There's been past interest in going the /opposite/ direction
for Linux, since there's not standard support for fat
(multi-architecture) .so libraries. Moving the .so search path /down/
to an architecture-specific directory on Linux would allow the same
resource directory to be used for both host-compiling and
cross-compiling.

rdar://problem/43545560
2019-02-19 14:47:21 -08:00
Saleem Abdulrasool
9c860b2dc2 test: adjustments for Windows
Adjust the invocation on Windows to improve the Index test coverage.
2019-02-19 13:52:06 -08:00
sarveshtamba
acc551f9bc Changes for test failures on PowerPC64LE when running as non-root user 2019-02-18 08:25:53 +00:00
sarveshtamba
7cb42b740c Changes for #SR-9413:Swift 5.0 test failures on PowerPC #21541 2019-01-16 11:05:02 +00:00
sarveshtamba
56318f3e1f Changes for #SR-9413:Swift 5.0 test failures on PowerPC 2018-12-24 11:37:38 +00:00
Saleem Abdulrasool
364a473ed3 test: normalize paths and check variant
Update the path separator checks to account for differences across
platforms.
2018-12-01 11:58:33 -08:00
Bruno Rocha
bf84b297f8 [SourceKit] Allow module references to be indexed (#19243)
Module references get indexed as a 'module' symbol; they get USRs similar to how clang would assign a USR for a module reference.

JIRA: https://bugs.swift.org/browse/SR-8677
2018-09-28 12:21:38 -07:00
Argyrios Kyrtzidis
eb27ab8cc1 [test/Index/Store] For a test, replace 'XFAIL: linux' with 'REQUIRES: objc_interop' 2018-09-12 11:43:50 -07:00
Argyrios Kyrtzidis
3ce71a37bf [test/Index/Store] Remove the XFAILs for linux on some tests 2018-09-11 17:40:02 -07:00
Argyrios Kyrtzidis
2fe4235ee8 [test/index] Make matching for unit depedency printing less strict
This makes the tests more focused on what they are interested in testing
and allows flexibility on changing dependency printing on the clang side
without breaking the swift tests.
2018-08-26 12:24:57 -07:00
Doug Gregor
3df16e1109 Un-XFAIL new test on Linux. This doesn't crash on Linux. 2018-06-27 11:25:19 -07:00
Doug Gregor
71e2a014fe [Type checker] Make sure we get all conformances for extended nominal types.
Index-while-building ends up querying some conformances that aren’t
strictly needed by the type-checker, but which require us to pre-check all
conformances for any extension we have. Long-term, this is wasted effort, but
for now it eliminates a recent regression caused by the request-evaluator,
which (intentionally) tries to perform less work for non-primary files.

Fixes rdar://problem/41392714.
2018-06-27 10:53:26 -07:00
Argyrios Kyrtzidis
8207212f0b [driver/index] Fix an issue where the -index-file invocation was not working when there are 5 or more input files
When the supplementary-outputs file is written for an -index-file invocation it writes out the first input file
given in arguments instead of the input file that is provided by -index-file-path option. This then causes the frontend
index invocation to fail with an error because there is a mismatch in the primary input file and the input file that is written
in the supplementary-outputs file.
2018-04-12 19:37:44 -07:00
David Ungar
90773d298c Write out filemaps for supplementary outputs.
Add -driver-force-one-batch-repartition and enhance  batch_mode-overlong_argv test.
2018-03-20 09:42:13 -07:00
Saleem Abdulrasool
b67d5f0cf7 test: convert rm -rf && mkdir -p into %empty-directory
This converts the instances of the pattern for which we have a proper
substitution in lit.  This will make it easier to replace it
appropriately with Windows equivalents.
2018-03-06 14:30:54 -08:00
David Ungar
28b206008f FrontendInputs data structure redo.
- Outlaw duplicate input files, fix driver, fix tests, and add test.
- Reflect that no buffer is present without a (possibly pseudo) named file.
- Reflect fact that every input has a (possible pseudo) name.
- Break up CompilerInstance::setup.

Don't bail on dups.
2017-12-05 17:28:03 -08:00
Jordan Rose
98949efe93 [test] Tweak tests to not depend on the host stdlib or SDK (#12423)
Otherwise, we get into trouble when only building iOS libraries and
then running tests (on macOS).

rdar://problem/33971531&33971705
2017-10-13 17:22:40 -07:00
Alex Hoppen
1c7e289b96 [Mangling] Adjust subscript mangling to not include "subscript"
Change the mangling of accessors to have a variable or subscript node
as their only child node, while subscript nodes no longer contain a decl
name.
2017-09-10 19:44:07 +02:00
David Farler
645aaad551 [index/build] Upstream indexing while building changes
This patch upstreams previously AppleInternal changes for
indexing while building.
2017-06-29 16:20:06 -07:00