From 73b01dccfcec8b0ad1464369922dbf9b439c1678 Mon Sep 17 00:00:00 2001 From: Artem Chikin Date: Mon, 27 Mar 2023 15:02:55 -0700 Subject: [PATCH] Remove incremental builds from the Legacy driver The C++-based driver is deprecated and this will help reduce the code surface that requires maintenance as the legacy driver is fully sunset. --- include/swift/AST/DiagnosticsDriver.def | 3 + include/swift/Driver/Action.h | 78 +- include/swift/Driver/Compilation.h | 100 +- include/swift/Driver/Driver.h | 3 - .../Driver/FineGrainedDependencyDriverGraph.h | 597 ------------ include/swift/Driver/Job.h | 21 - lib/Driver/Action.cpp | 2 - lib/Driver/CMakeLists.txt | 1 - lib/Driver/Compilation.cpp | 711 +------------- lib/Driver/CompilationRecord.h | 91 -- lib/Driver/Driver.cpp | 541 +---------- .../FineGrainedDependencyDriverGraph.cpp | 739 -------------- lib/Driver/ToolChains.cpp | 4 - lib/DriverTool/driver.cpp | 3 +- test/CMakeLists.txt | 2 - .../Inputs/bindings-build-record/added.swift | 1 - .../Inputs/bindings-build-record/main.o | 0 .../Inputs/bindings-build-record/main.swift | 1 - .../bindings-build-record/main.swiftdeps.yaml | 38 - .../Inputs/bindings-build-record/other.o | 0 .../Inputs/bindings-build-record/other.swift | 1 - .../other.swiftdeps.yaml | 38 - .../Inputs/bindings-build-record/output.json | 21 - .../bindings-build-record/yet-another.o | 0 .../bindings-build-record/yet-another.swift | 1 - .../yet-another.swiftdeps.yaml | 38 - .../chained-additional-kinds-fine/main.swift | 46 - .../chained-additional-kinds-fine/other.swift | 38 - .../chained-additional-kinds-fine/output.json | 17 - .../yet-another.swift | 30 - .../Inputs/chained-after-fine/main.swift | 46 - .../Inputs/chained-after-fine/main.swiftdeps | Bin 416 -> 0 bytes .../Inputs/chained-after-fine/other.swift | 38 - .../Inputs/chained-after-fine/other.swiftdeps | Bin 424 -> 0 bytes .../Inputs/chained-after-fine/output.json | 17 - .../chained-after-fine/yet-another.swift | 30 - .../chained-after-fine/yet-another.swiftdeps | Bin 428 -> 0 bytes .../Inputs/chained-fine/main.swift | 46 - .../Inputs/chained-fine/other.swift | 38 - .../Inputs/chained-fine/output.json | 17 - .../Inputs/chained-fine/yet-another.swift | 30 - .../chained-private-after-fine/main.swift | 46 - .../chained-private-after-fine/main.swiftdeps | Bin 444 -> 0 bytes .../chained-private-after-fine/other.swift | 38 - .../other.swiftdeps | Bin 424 -> 0 bytes .../chained-private-after-fine/output.json | 17 - .../yet-another.swift | 30 - .../yet-another.swiftdeps | Bin 428 -> 0 bytes .../main.swift | 62 -- .../main.swiftdeps | Bin 464 -> 0 bytes .../other.swift | 38 - .../other.swiftdeps | Bin 424 -> 0 bytes .../output.json | 17 - .../yet-another.swift | 30 - .../yet-another.swiftdeps | Bin 428 -> 0 bytes .../main.swift | 86 -- .../main.swiftdeps | Bin 500 -> 0 bytes .../other.swift | 38 - .../other.swiftdeps | Bin 436 -> 0 bytes .../output.json | 17 - .../yet-another.swift | 30 - .../yet-another.swiftdeps | Bin 428 -> 0 bytes .../Inputs/chained-private-fine/main.swift | 47 - .../Inputs/chained-private-fine/other.swift | 38 - .../Inputs/chained-private-fine/output.json | 17 - .../chained-private-fine/yet-another.swift | 30 - .../Dependencies/Inputs/chained/main.swift | 3 - .../Dependencies/Inputs/chained/other.swift | 2 - .../Dependencies/Inputs/chained/output.json | 17 - .../Inputs/chained/yet-another.swift | 2 - .../a.swift | 38 - .../bad.swift | 46 - .../c.swift | 46 - .../output.json | 33 - .../Inputs/crash-simple-fine/crash.swift | 54 -- .../Inputs/crash-simple-fine/main.swift | 46 - .../Inputs/crash-simple-fine/other.swift | 54 -- .../Inputs/crash-simple-fine/output.json | 17 - .../crash.swift | 38 - .../crash.swiftdeps | Bin 400 -> 0 bytes .../main.swift | 30 - .../main.swiftdeps | Bin 400 -> 0 bytes .../other.swift | 30 - .../other.swiftdeps | Bin 400 -> 0 bytes .../output.json | 17 - .../Inputs/fail-chained-fine/a.swift | 38 - .../Inputs/fail-chained-fine/b.swift | 38 - .../Inputs/fail-chained-fine/bad.swift | 54 -- .../Inputs/fail-chained-fine/c.swift | 46 - .../Inputs/fail-chained-fine/d.swift | 46 - .../Inputs/fail-chained-fine/e.swift | 46 - .../Inputs/fail-chained-fine/f.swift | 46 - .../Inputs/fail-chained-fine/output.json | 33 - .../Inputs/fail-interface-hash-fine/bad.swift | 39 - .../fail-interface-hash-fine/bad.swiftdeps | Bin 424 -> 0 bytes .../depends-on-bad.swift | 31 - .../depends-on-bad.swiftdeps | Bin 424 -> 0 bytes .../depends-on-main.swift | 30 - .../depends-on-main.swiftdeps | Bin 424 -> 0 bytes .../fail-interface-hash-fine/main.swift | 39 - .../fail-interface-hash-fine/main.swiftdeps | Bin 424 -> 0 bytes .../fail-interface-hash-fine/output.json | 21 - .../Inputs/fail-simple-fine/bad.swift | 38 - .../Inputs/fail-simple-fine/main.swift | 30 - .../Inputs/fail-simple-fine/other.swift | 30 - .../Inputs/fail-simple-fine/output.json | 17 - .../Inputs/fail-with-bad-deps-fine/bad.swift | 55 -- .../fail-with-bad-deps-fine/bad.swiftdeps | Bin 484 -> 0 bytes .../depends-on-bad.swift | 46 - .../depends-on-bad.swiftdeps | Bin 452 -> 0 bytes .../depends-on-main.swift | 46 - .../depends-on-main.swiftdeps | Bin 452 -> 0 bytes .../Inputs/fail-with-bad-deps-fine/main.swift | 46 - .../fail-with-bad-deps-fine/main.swiftdeps | Bin 484 -> 0 bytes .../fail-with-bad-deps-fine/output.json | 21 - .../Inputs/fake-build-for-bitcode.py | 37 - .../Inputs/fake-build-whole-module.py | 31 - .../Inputs/independent-fine/main.swift | 22 - .../Inputs/independent-fine/other.swift | 22 - .../Inputs/independent-fine/output.json | 13 - .../Inputs/malformed-after-fine/main.swift | 30 - .../malformed-after-fine/main.swiftdeps | Bin 416 -> 0 bytes .../Inputs/malformed-after-fine/other.swift | 2 - .../malformed-after-fine/other.swiftdeps | Bin 400 -> 0 bytes .../Inputs/malformed-after-fine/output.json | 13 - .../malformed-but-valid-yaml-fine/main.swift | 30 - .../main.swiftdeps | Bin 416 -> 0 bytes .../malformed-but-valid-yaml-fine/other.swift | 24 - .../other.swiftdeps | Bin 400 -> 0 bytes .../malformed-but-valid-yaml-fine/output.json | 13 - .../Inputs/modify-non-primary-files.py | 49 - .../Inputs/mutual-fine/main.swift | 78 -- .../Inputs/mutual-fine/other.swift | 78 -- .../Inputs/mutual-fine/output.json | 13 - .../does-change.swift | 78 -- .../does-change.swiftdeps | Bin 532 -> 0 bytes .../does-not-change.swift | 78 -- .../does-not-change.swiftdeps | Bin 536 -> 0 bytes .../mutual-interface-hash-fine/output.json | 13 - .../mutual-with-swiftdeps-fine/main.swift | 46 - .../mutual-with-swiftdeps-fine/main.swiftdeps | Bin 400 -> 0 bytes .../mutual-with-swiftdeps-fine/other.swift | 46 - .../other.swiftdeps | Bin 400 -> 0 bytes .../mutual-with-swiftdeps-fine/output.json | 13 - .../Inputs/nominal-members-fine/a-ext.swift | 102 -- .../Inputs/nominal-members-fine/a.swift | 78 -- .../depends-on-a-ext.swift | 70 -- .../depends-on-a-foo.swift | 70 -- .../Inputs/nominal-members-fine/output.json | 21 - .../one-way-depends-after-fine/main.swift | 30 - .../one-way-depends-after-fine/main.swiftdeps | Bin 400 -> 0 bytes .../one-way-depends-after-fine/other.swift | 38 - .../other.swiftdeps | Bin 428 -> 0 bytes .../one-way-depends-after-fine/output.json | 13 - .../one-way-depends-before-fine/main.swift | 22 - .../main.swiftdeps | Bin 416 -> 0 bytes .../one-way-depends-before-fine/other.swift | 38 - .../other.swiftdeps | Bin 428 -> 0 bytes .../one-way-depends-before-fine/output.json | 13 - .../Inputs/one-way-external-fine/main.swift | 62 -- .../one-way-external-fine/main1-external | 0 .../one-way-external-fine/main2-external | 0 .../Inputs/one-way-external-fine/other.swift | 70 -- .../one-way-external-fine/other1-external | 0 .../one-way-external-fine/other2-external | 0 .../Inputs/one-way-external-fine/output.json | 13 - .../Inputs/one-way-fine/main.swift | 30 - .../Inputs/one-way-fine/other.swift | 38 - .../Inputs/one-way-fine/output.json | 17 - .../one-way-provides-after-fine/main.swift | 30 - .../main.swiftdeps | Bin 416 -> 0 bytes .../one-way-provides-after-fine/other.swift | 54 -- .../other.swiftdeps | Bin 400 -> 0 bytes .../one-way-provides-after-fine/output.json | 13 - .../one-way-provides-before-fine/main.swift | 30 - .../main.swiftdeps | Bin 416 -> 0 bytes .../one-way-provides-before-fine/other.swift | 22 - .../other.swiftdeps | Bin 480 -> 0 bytes .../one-way-provides-before-fine/output.json | 13 - .../one-way-with-swiftdeps-fine/main.swift | 30 - .../main.swiftdeps | Bin 400 -> 0 bytes .../one-way-with-swiftdeps-fine/other.swift | 38 - .../other.swiftdeps | Bin 400 -> 0 bytes .../one-way-with-swiftdeps-fine/output.json | 17 - .../Dependencies/Inputs/one-way/main.swift | 2 - .../Dependencies/Inputs/one-way/other.swift | 2 - .../Dependencies/Inputs/one-way/output.json | 17 - .../Inputs/only-skip-once/file1.swift | 3 - .../Inputs/only-skip-once/file2.swift | 3 - .../Inputs/only-skip-once/main.swift | 2 - .../only-skip-once/output-file-map.json | 23 - .../Inputs/private-after-fine/a.swift | 38 - .../Inputs/private-after-fine/a.swiftdeps | Bin 424 -> 0 bytes .../Inputs/private-after-fine/b.swift | 54 -- .../Inputs/private-after-fine/b.swiftdeps | Bin 464 -> 0 bytes .../Inputs/private-after-fine/c.swift | 46 - .../Inputs/private-after-fine/c.swiftdeps | Bin 444 -> 0 bytes .../Inputs/private-after-fine/d.swift | 46 - .../Inputs/private-after-fine/d.swiftdeps | Bin 416 -> 0 bytes .../Inputs/private-after-fine/e.swift | 46 - .../Inputs/private-after-fine/e.swiftdeps | Bin 416 -> 0 bytes .../Inputs/private-after-fine/f.swift | 46 - .../Inputs/private-after-fine/f.swiftdeps | Bin 444 -> 0 bytes .../Inputs/private-after-fine/g.swift | 46 - .../Inputs/private-after-fine/g.swiftdeps | Bin 444 -> 0 bytes .../Inputs/private-after-fine/output.json | 33 - .../Dependencies/Inputs/private-fine/a.swift | 38 - .../Dependencies/Inputs/private-fine/b.swift | 46 - .../Dependencies/Inputs/private-fine/c.swift | 54 -- .../Dependencies/Inputs/private-fine/d.swift | 46 - .../Dependencies/Inputs/private-fine/e.swift | 38 - .../Inputs/private-fine/output.json | 25 - .../Dependencies/Inputs/private/a.swift | 2 - .../Dependencies/Inputs/private/b.swift | 3 - .../Dependencies/Inputs/private/c.swift | 3 - .../Dependencies/Inputs/private/d.swift | 3 - .../Dependencies/Inputs/private/e.swift | 2 - .../Dependencies/Inputs/private/output.json | 25 - test/Driver/Dependencies/Inputs/touch.py | 37 - .../Inputs/update-dependencies-bad.py | 56 -- .../Inputs/update-dependencies.py | 65 -- test/Driver/Dependencies/README.txt | 28 - .../Dependencies/bindings-build-record.swift | 63 -- .../chained-additional-kinds-fine.swift | 26 - .../Dependencies/chained-after-fine.swift | 23 - test/Driver/Dependencies/chained-fine.swift | 32 - .../chained-private-after-fine.swift | 23 - .../chained-private-after-multiple-fine.swift | 27 - ...-after-multiple-nominal-members-fine.swift | 23 - .../Dependencies/chained-private-fine.swift | 30 - .../check-interface-implementation-fine.swift | 43 - .../Dependencies/crash-added-fine.swift | 42 - test/Driver/Dependencies/crash-new-fine.swift | 76 -- .../Dependencies/crash-simple-fine.swift | 34 - .../dependencies-preservation-fine.swift | 23 - ...iver-show-incremental-arguments-fine.swift | 28 - ...cremental-conflicting-arguments-fine.swift | 35 - .../driver-show-incremental-inputs-fine.swift | 27 - ...iver-show-incremental-malformed-fine.swift | 39 - .../driver-show-incremental-mutual-fine.swift | 22 - ...-show-incremental-swift-version-fine.swift | 29 - .../embed-bitcode-parallel-fine.swift | 99 -- .../Driver/Dependencies/fail-added-fine.swift | 35 - .../Dependencies/fail-chained-fine.swift | 132 --- .../fail-interface-hash-fine.swift | 41 - test/Driver/Dependencies/fail-new-fine.swift | 45 - .../Dependencies/fail-simple-fine.swift | 33 - .../fail-with-bad-deps-fine.swift | 50 - .../Driver/Dependencies/file-added-fine.swift | 20 - .../Dependencies/independent-fine.swift | 55 -- .../independent-half-dirty-fine.swift | 23 - .../independent-parseable-fine.swift | 79 -- .../malformed-but-valid-yaml-fine.swift | 48 - test/Driver/Dependencies/malformed-fine.swift | 48 - test/Driver/Dependencies/mutual-fine.swift | 24 - .../mutual-interface-hash-fine.swift | 50 - .../Dependencies/nominal-members-fine.swift | 39 - .../one-way-depends-after-fine.swift | 56 -- .../one-way-depends-before-fine.swift | 56 -- .../one-way-external-delete-fine.swift | 47 - .../Dependencies/one-way-external-fine.swift | 63 -- test/Driver/Dependencies/one-way-fine.swift | 75 -- .../one-way-merge-module-fine.swift | 23 - .../Dependencies/one-way-parallel-fine.swift | 61 -- .../Dependencies/one-way-parseable-fine.swift | 92 -- .../one-way-provides-after-fine.swift | 48 - .../one-way-provides-before-fine.swift | 52 - .../one-way-while-editing-fine.swift | 28 - test/Driver/Dependencies/only-skip-once.swift | 22 - .../Dependencies/private-after-fine.swift | 54 -- test/Driver/Dependencies/private-fine.swift | 87 -- .../whole-module-build-record.swift | 20 - ...h_mode_dependencies_make_wrong_order.swift | 28 - test/Driver/bindings.swift | 6 - test/Driver/cross_module.swift | 6 - test/Driver/driver-compile.swift | 12 - test/Driver/options.swift | 8 - test/Driver/working-directory.swift | 6 - .../Dependencies/Inputs/InterestingType.swift | 23 - .../Dependencies/function-fine.swift | 15 - .../function-return-type-fine.swift | 15 - .../protocol-conformer-ext-fine.swift | 20 - .../protocol-conformer-fine.swift | 19 - ...erence-dependencies-consistency-fine.swift | 19 - ...nce-dependencies-dynamic-lookup-fine.swift | 69 -- .../reference-dependencies-errors.swift | 9 - .../reference-dependencies-fine.swift | 542 ----------- .../reference-dependencies-members-fine.swift | 62 -- .../Dependencies/struct-member-fine.swift | 17 - .../Dependencies/subscript-fine.swift | 17 - .../Dependencies/tuple-member.swift | 11 - .../Dependencies/typealias-fine.swift | 17 - test/Incremental/Dependencies/var-fine.swift | 16 - .../class-fingerprint/definesAB-after.swift | 5 - .../class-fingerprint/definesAB-before.swift | 4 - .../Inputs/class-fingerprint/main.swift | 1 - .../Inputs/class-fingerprint/ofm.json | 22 - .../Inputs/class-fingerprint/usesA.swift | 1 - .../Inputs/class-fingerprint/usesB.swift | 1 - .../enum-fingerprint/definesAB-after.swift | 7 - .../enum-fingerprint/definesAB-before.swift | 6 - .../Inputs/enum-fingerprint/main.swift | 1 - .../Inputs/enum-fingerprint/ofm.json | 22 - .../Inputs/enum-fingerprint/usesA.swift | 1 - .../Inputs/enum-fingerprint/usesB.swift | 1 - .../definesAB-after.swift | 9 - .../definesAB-before.swift | 8 - .../Inputs/extension-adds-member/main.swift | 1 - .../Inputs/extension-adds-member/ofm.json | 22 - .../Inputs/extension-adds-member/usesA.swift | 1 - .../Inputs/extension-adds-member/usesB.swift | 1 - .../definesS-after.swift | 8 - .../definesS-before.swift | 8 - .../extension-changes-member/main.swift | 11 - .../Inputs/extension-changes-member/ofm.json | 14 - .../definesS-after.swift | 17 - .../definesS-before.swift | 18 - .../Inputs/member-moves-extensions/main.swift | 7 - .../Inputs/member-moves-extensions/ofm.json | 14 - .../definesAB-after.swift | 11 - .../definesAB-before.swift | 10 - .../Inputs/nested-enum-fingerprint/main.swift | 1 - .../Inputs/nested-enum-fingerprint/ofm.json | 22 - .../nested-enum-fingerprint/usesA.swift | 1 - .../nested-enum-fingerprint/usesB.swift | 1 - .../definesS-after.swift | 8 - .../definesS-before.swift | 5 - .../Inputs/nominal-adds-extension/main.swift | 11 - .../Inputs/nominal-adds-extension/ofm.json | 14 - .../definesAB-after.swift | 5 - .../definesAB-before.swift | 4 - .../Inputs/protocol-fingerprint/main.swift | 1 - .../Inputs/protocol-fingerprint/ofm.json | 22 - .../Inputs/protocol-fingerprint/usesA.swift | 3 - .../Inputs/protocol-fingerprint/usesB.swift | 2 - .../struct-fingerprint/definesAB-after.swift | 5 - .../struct-fingerprint/definesAB-before.swift | 4 - .../Inputs/struct-fingerprint/main.swift | 1 - .../Inputs/struct-fingerprint/ofm.json | 22 - .../Inputs/struct-fingerprint/usesA.swift | 1 - .../Inputs/struct-fingerprint/usesB.swift | 1 - .../Fingerprints/class-fingerprint.swift | 34 - .../Fingerprints/enum-fingerprint.swift | 34 - .../Fingerprints/extension-adds-member.swift | 33 - .../extension-changes-member.swift | 30 - .../member-moves-extensions.swift | 32 - .../nested-enum-fingerprint.swift | 36 - .../Fingerprints/nominal-adds-extension.swift | 30 - .../Fingerprints/protocol-fingerprint.swift | 34 - .../Fingerprints/struct-fingerprint.swift | 36 - .../AutolinkingTest.framework/AutolinkingTest | 0 .../Headers/AutolinkingTest.h | 3 - .../Modules/module.modulemap | 5 - .../autolinking/autolinking-other.swift | 1 - test/Incremental/Inputs/autolinking/ofm.json | 18 - .../cross-file-failure/definesA-one.swift | 1 - .../cross-file-failure/definesA-three.swift | 1 - .../cross-file-failure/definesA-two.swift | 1 - .../Inputs/cross-file-failure/main.swift | 1 - .../Inputs/cross-file-failure/ofm.json | 18 - .../Inputs/cross-file-failure/usesA.swift | 3 - .../reference-dependencies-helper.swift | 157 --- ...eference-dependencies-members-helper.swift | 6 - .../definesPoint-after.swift | 4 - .../definesPoint-before.swift | 4 - .../Inputs/superfluous-cascade/main.swift | 1 - .../Inputs/superfluous-cascade/ofm.json | 22 - .../superfluous-cascade/usesDisplay.swift | 3 - .../superfluous-cascade/usesPoint.swift | 12 - .../Verifier/gen-output-file-map.py | 74 -- .../multi-file-private/Inputs/Base.swift | 39 - .../multi-file-private/Inputs/Derived.swift | 30 - .../multi-file-private/Inputs/Inner.swift | 15 - .../multi-file-private/Inputs/UsesInner.swift | 12 - .../Verifier/multi-file-private/main.swift | 8 - .../single-file-private/AnyObject.swift | 117 --- .../single-file-private/Conformances.swift | 28 - test/Incremental/autolinking-overlay.swift | 19 - test/Incremental/autolinking.swift | 16 - test/Incremental/cross-file-failure.swift | 29 - test/Incremental/superfluous-cascade.swift | 22 - test/lit.cfg | 7 +- unittests/CMakeLists.txt | 1 - unittests/Driver/CMakeLists.txt | 11 - .../FineGrainedDependencyGraphTests.cpp | 917 ------------------ .../MockingFineGrainedDependencyGraphs.cpp | 91 -- .../MockingFineGrainedDependencyGraphs.h | 120 --- .../UnitTestSourceFileDepGraphFactory.cpp | 172 ---- .../UnitTestSourceFileDepGraphFactory.h | 83 -- utils/run-test | 1 - .../host_specific_configuration.py | 8 - .../test_early_swift_driver_and_test.test | 8 - .../Inputs/rdar23148987/helper-1.swift | 3 - .../Inputs/rdar23148987/helper-2.swift | 3 - .../Inputs/rdar23148987/output.json | 13 - .../Inputs/rdar25405605/helper-1.swift | 13 - .../Inputs/rdar25405605/helper-2.swift | 14 - .../Inputs/rdar25405605/helper-3.swift | 15 - .../Inputs/rdar25405605/output.json | 13 - .../Driver/Dependencies/rdar23148987.swift | 61 -- .../Driver/Dependencies/rdar25405605.swift | 83 -- 401 files changed, 40 insertions(+), 14016 deletions(-) delete mode 100644 include/swift/Driver/FineGrainedDependencyDriverGraph.h delete mode 100644 lib/Driver/CompilationRecord.h delete mode 100644 lib/Driver/FineGrainedDependencyDriverGraph.cpp delete mode 100644 test/Driver/Dependencies/Inputs/bindings-build-record/added.swift delete mode 100644 test/Driver/Dependencies/Inputs/bindings-build-record/main.o delete mode 100644 test/Driver/Dependencies/Inputs/bindings-build-record/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/bindings-build-record/main.swiftdeps.yaml delete mode 100644 test/Driver/Dependencies/Inputs/bindings-build-record/other.o delete mode 100644 test/Driver/Dependencies/Inputs/bindings-build-record/other.swift delete mode 100644 test/Driver/Dependencies/Inputs/bindings-build-record/other.swiftdeps.yaml delete mode 100644 test/Driver/Dependencies/Inputs/bindings-build-record/output.json delete mode 100644 test/Driver/Dependencies/Inputs/bindings-build-record/yet-another.o delete mode 100644 test/Driver/Dependencies/Inputs/bindings-build-record/yet-another.swift delete mode 100644 test/Driver/Dependencies/Inputs/bindings-build-record/yet-another.swiftdeps.yaml delete mode 100644 test/Driver/Dependencies/Inputs/chained-additional-kinds-fine/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/chained-additional-kinds-fine/other.swift delete mode 100644 test/Driver/Dependencies/Inputs/chained-additional-kinds-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/chained-additional-kinds-fine/yet-another.swift delete mode 100644 test/Driver/Dependencies/Inputs/chained-after-fine/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/chained-after-fine/main.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/chained-after-fine/other.swift delete mode 100644 test/Driver/Dependencies/Inputs/chained-after-fine/other.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/chained-after-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/chained-after-fine/yet-another.swift delete mode 100644 test/Driver/Dependencies/Inputs/chained-after-fine/yet-another.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/chained-fine/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/chained-fine/other.swift delete mode 100644 test/Driver/Dependencies/Inputs/chained-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/chained-fine/yet-another.swift delete mode 100644 test/Driver/Dependencies/Inputs/chained-private-after-fine/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/chained-private-after-fine/main.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/chained-private-after-fine/other.swift delete mode 100644 test/Driver/Dependencies/Inputs/chained-private-after-fine/other.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/chained-private-after-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/chained-private-after-fine/yet-another.swift delete mode 100644 test/Driver/Dependencies/Inputs/chained-private-after-fine/yet-another.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/chained-private-after-multiple-fine/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/chained-private-after-multiple-fine/main.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/chained-private-after-multiple-fine/other.swift delete mode 100644 test/Driver/Dependencies/Inputs/chained-private-after-multiple-fine/other.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/chained-private-after-multiple-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/chained-private-after-multiple-fine/yet-another.swift delete mode 100644 test/Driver/Dependencies/Inputs/chained-private-after-multiple-fine/yet-another.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/chained-private-after-multiple-nominal-members-fine/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/chained-private-after-multiple-nominal-members-fine/main.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/chained-private-after-multiple-nominal-members-fine/other.swift delete mode 100644 test/Driver/Dependencies/Inputs/chained-private-after-multiple-nominal-members-fine/other.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/chained-private-after-multiple-nominal-members-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/chained-private-after-multiple-nominal-members-fine/yet-another.swift delete mode 100644 test/Driver/Dependencies/Inputs/chained-private-after-multiple-nominal-members-fine/yet-another.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/chained-private-fine/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/chained-private-fine/other.swift delete mode 100644 test/Driver/Dependencies/Inputs/chained-private-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/chained-private-fine/yet-another.swift delete mode 100644 test/Driver/Dependencies/Inputs/chained/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/chained/other.swift delete mode 100644 test/Driver/Dependencies/Inputs/chained/output.json delete mode 100644 test/Driver/Dependencies/Inputs/chained/yet-another.swift delete mode 100644 test/Driver/Dependencies/Inputs/check-interface-implementation-fine/a.swift delete mode 100644 test/Driver/Dependencies/Inputs/check-interface-implementation-fine/bad.swift delete mode 100644 test/Driver/Dependencies/Inputs/check-interface-implementation-fine/c.swift delete mode 100644 test/Driver/Dependencies/Inputs/check-interface-implementation-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/crash-simple-fine/crash.swift delete mode 100644 test/Driver/Dependencies/Inputs/crash-simple-fine/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/crash-simple-fine/other.swift delete mode 100644 test/Driver/Dependencies/Inputs/crash-simple-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/crash-simple-with-swiftdeps-fine/crash.swift delete mode 100644 test/Driver/Dependencies/Inputs/crash-simple-with-swiftdeps-fine/crash.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/crash-simple-with-swiftdeps-fine/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/crash-simple-with-swiftdeps-fine/main.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/crash-simple-with-swiftdeps-fine/other.swift delete mode 100644 test/Driver/Dependencies/Inputs/crash-simple-with-swiftdeps-fine/other.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/crash-simple-with-swiftdeps-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/fail-chained-fine/a.swift delete mode 100644 test/Driver/Dependencies/Inputs/fail-chained-fine/b.swift delete mode 100644 test/Driver/Dependencies/Inputs/fail-chained-fine/bad.swift delete mode 100644 test/Driver/Dependencies/Inputs/fail-chained-fine/c.swift delete mode 100644 test/Driver/Dependencies/Inputs/fail-chained-fine/d.swift delete mode 100644 test/Driver/Dependencies/Inputs/fail-chained-fine/e.swift delete mode 100644 test/Driver/Dependencies/Inputs/fail-chained-fine/f.swift delete mode 100644 test/Driver/Dependencies/Inputs/fail-chained-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/fail-interface-hash-fine/bad.swift delete mode 100644 test/Driver/Dependencies/Inputs/fail-interface-hash-fine/bad.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/fail-interface-hash-fine/depends-on-bad.swift delete mode 100644 test/Driver/Dependencies/Inputs/fail-interface-hash-fine/depends-on-bad.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/fail-interface-hash-fine/depends-on-main.swift delete mode 100644 test/Driver/Dependencies/Inputs/fail-interface-hash-fine/depends-on-main.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/fail-interface-hash-fine/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/fail-interface-hash-fine/main.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/fail-interface-hash-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/fail-simple-fine/bad.swift delete mode 100644 test/Driver/Dependencies/Inputs/fail-simple-fine/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/fail-simple-fine/other.swift delete mode 100644 test/Driver/Dependencies/Inputs/fail-simple-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/fail-with-bad-deps-fine/bad.swift delete mode 100644 test/Driver/Dependencies/Inputs/fail-with-bad-deps-fine/bad.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/fail-with-bad-deps-fine/depends-on-bad.swift delete mode 100644 test/Driver/Dependencies/Inputs/fail-with-bad-deps-fine/depends-on-bad.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/fail-with-bad-deps-fine/depends-on-main.swift delete mode 100644 test/Driver/Dependencies/Inputs/fail-with-bad-deps-fine/depends-on-main.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/fail-with-bad-deps-fine/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/fail-with-bad-deps-fine/main.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/fail-with-bad-deps-fine/output.json delete mode 100755 test/Driver/Dependencies/Inputs/fake-build-for-bitcode.py delete mode 100755 test/Driver/Dependencies/Inputs/fake-build-whole-module.py delete mode 100644 test/Driver/Dependencies/Inputs/independent-fine/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/independent-fine/other.swift delete mode 100644 test/Driver/Dependencies/Inputs/independent-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/malformed-after-fine/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/malformed-after-fine/main.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/malformed-after-fine/other.swift delete mode 100644 test/Driver/Dependencies/Inputs/malformed-after-fine/other.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/malformed-after-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/malformed-but-valid-yaml-fine/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/malformed-but-valid-yaml-fine/main.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/malformed-but-valid-yaml-fine/other.swift delete mode 100644 test/Driver/Dependencies/Inputs/malformed-but-valid-yaml-fine/other.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/malformed-but-valid-yaml-fine/output.json delete mode 100755 test/Driver/Dependencies/Inputs/modify-non-primary-files.py delete mode 100644 test/Driver/Dependencies/Inputs/mutual-fine/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/mutual-fine/other.swift delete mode 100644 test/Driver/Dependencies/Inputs/mutual-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/mutual-interface-hash-fine/does-change.swift delete mode 100644 test/Driver/Dependencies/Inputs/mutual-interface-hash-fine/does-change.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/mutual-interface-hash-fine/does-not-change.swift delete mode 100644 test/Driver/Dependencies/Inputs/mutual-interface-hash-fine/does-not-change.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/mutual-interface-hash-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/mutual-with-swiftdeps-fine/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/mutual-with-swiftdeps-fine/main.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/mutual-with-swiftdeps-fine/other.swift delete mode 100644 test/Driver/Dependencies/Inputs/mutual-with-swiftdeps-fine/other.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/mutual-with-swiftdeps-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/nominal-members-fine/a-ext.swift delete mode 100644 test/Driver/Dependencies/Inputs/nominal-members-fine/a.swift delete mode 100644 test/Driver/Dependencies/Inputs/nominal-members-fine/depends-on-a-ext.swift delete mode 100644 test/Driver/Dependencies/Inputs/nominal-members-fine/depends-on-a-foo.swift delete mode 100644 test/Driver/Dependencies/Inputs/nominal-members-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/one-way-depends-after-fine/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/one-way-depends-after-fine/main.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/one-way-depends-after-fine/other.swift delete mode 100644 test/Driver/Dependencies/Inputs/one-way-depends-after-fine/other.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/one-way-depends-after-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/one-way-depends-before-fine/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/one-way-depends-before-fine/main.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/one-way-depends-before-fine/other.swift delete mode 100644 test/Driver/Dependencies/Inputs/one-way-depends-before-fine/other.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/one-way-depends-before-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/one-way-external-fine/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/one-way-external-fine/main1-external delete mode 100644 test/Driver/Dependencies/Inputs/one-way-external-fine/main2-external delete mode 100644 test/Driver/Dependencies/Inputs/one-way-external-fine/other.swift delete mode 100644 test/Driver/Dependencies/Inputs/one-way-external-fine/other1-external delete mode 100644 test/Driver/Dependencies/Inputs/one-way-external-fine/other2-external delete mode 100644 test/Driver/Dependencies/Inputs/one-way-external-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/one-way-fine/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/one-way-fine/other.swift delete mode 100644 test/Driver/Dependencies/Inputs/one-way-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/one-way-provides-after-fine/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/one-way-provides-after-fine/main.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/one-way-provides-after-fine/other.swift delete mode 100644 test/Driver/Dependencies/Inputs/one-way-provides-after-fine/other.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/one-way-provides-after-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/one-way-provides-before-fine/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/one-way-provides-before-fine/main.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/one-way-provides-before-fine/other.swift delete mode 100644 test/Driver/Dependencies/Inputs/one-way-provides-before-fine/other.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/one-way-provides-before-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/one-way-with-swiftdeps-fine/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/one-way-with-swiftdeps-fine/main.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/one-way-with-swiftdeps-fine/other.swift delete mode 100644 test/Driver/Dependencies/Inputs/one-way-with-swiftdeps-fine/other.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/one-way-with-swiftdeps-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/one-way/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/one-way/other.swift delete mode 100644 test/Driver/Dependencies/Inputs/one-way/output.json delete mode 100644 test/Driver/Dependencies/Inputs/only-skip-once/file1.swift delete mode 100644 test/Driver/Dependencies/Inputs/only-skip-once/file2.swift delete mode 100644 test/Driver/Dependencies/Inputs/only-skip-once/main.swift delete mode 100644 test/Driver/Dependencies/Inputs/only-skip-once/output-file-map.json delete mode 100644 test/Driver/Dependencies/Inputs/private-after-fine/a.swift delete mode 100644 test/Driver/Dependencies/Inputs/private-after-fine/a.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/private-after-fine/b.swift delete mode 100644 test/Driver/Dependencies/Inputs/private-after-fine/b.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/private-after-fine/c.swift delete mode 100644 test/Driver/Dependencies/Inputs/private-after-fine/c.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/private-after-fine/d.swift delete mode 100644 test/Driver/Dependencies/Inputs/private-after-fine/d.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/private-after-fine/e.swift delete mode 100644 test/Driver/Dependencies/Inputs/private-after-fine/e.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/private-after-fine/f.swift delete mode 100644 test/Driver/Dependencies/Inputs/private-after-fine/f.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/private-after-fine/g.swift delete mode 100644 test/Driver/Dependencies/Inputs/private-after-fine/g.swiftdeps delete mode 100644 test/Driver/Dependencies/Inputs/private-after-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/private-fine/a.swift delete mode 100644 test/Driver/Dependencies/Inputs/private-fine/b.swift delete mode 100644 test/Driver/Dependencies/Inputs/private-fine/c.swift delete mode 100644 test/Driver/Dependencies/Inputs/private-fine/d.swift delete mode 100644 test/Driver/Dependencies/Inputs/private-fine/e.swift delete mode 100644 test/Driver/Dependencies/Inputs/private-fine/output.json delete mode 100644 test/Driver/Dependencies/Inputs/private/a.swift delete mode 100644 test/Driver/Dependencies/Inputs/private/b.swift delete mode 100644 test/Driver/Dependencies/Inputs/private/c.swift delete mode 100644 test/Driver/Dependencies/Inputs/private/d.swift delete mode 100644 test/Driver/Dependencies/Inputs/private/e.swift delete mode 100644 test/Driver/Dependencies/Inputs/private/output.json delete mode 100755 test/Driver/Dependencies/Inputs/touch.py delete mode 100755 test/Driver/Dependencies/Inputs/update-dependencies-bad.py delete mode 100755 test/Driver/Dependencies/Inputs/update-dependencies.py delete mode 100644 test/Driver/Dependencies/README.txt delete mode 100644 test/Driver/Dependencies/bindings-build-record.swift delete mode 100644 test/Driver/Dependencies/chained-additional-kinds-fine.swift delete mode 100644 test/Driver/Dependencies/chained-after-fine.swift delete mode 100644 test/Driver/Dependencies/chained-fine.swift delete mode 100644 test/Driver/Dependencies/chained-private-after-fine.swift delete mode 100644 test/Driver/Dependencies/chained-private-after-multiple-fine.swift delete mode 100644 test/Driver/Dependencies/chained-private-after-multiple-nominal-members-fine.swift delete mode 100644 test/Driver/Dependencies/chained-private-fine.swift delete mode 100644 test/Driver/Dependencies/check-interface-implementation-fine.swift delete mode 100644 test/Driver/Dependencies/crash-added-fine.swift delete mode 100644 test/Driver/Dependencies/crash-new-fine.swift delete mode 100644 test/Driver/Dependencies/crash-simple-fine.swift delete mode 100644 test/Driver/Dependencies/dependencies-preservation-fine.swift delete mode 100644 test/Driver/Dependencies/driver-show-incremental-arguments-fine.swift delete mode 100644 test/Driver/Dependencies/driver-show-incremental-conflicting-arguments-fine.swift delete mode 100644 test/Driver/Dependencies/driver-show-incremental-inputs-fine.swift delete mode 100644 test/Driver/Dependencies/driver-show-incremental-malformed-fine.swift delete mode 100644 test/Driver/Dependencies/driver-show-incremental-mutual-fine.swift delete mode 100644 test/Driver/Dependencies/driver-show-incremental-swift-version-fine.swift delete mode 100644 test/Driver/Dependencies/embed-bitcode-parallel-fine.swift delete mode 100644 test/Driver/Dependencies/fail-added-fine.swift delete mode 100644 test/Driver/Dependencies/fail-chained-fine.swift delete mode 100644 test/Driver/Dependencies/fail-interface-hash-fine.swift delete mode 100644 test/Driver/Dependencies/fail-new-fine.swift delete mode 100644 test/Driver/Dependencies/fail-simple-fine.swift delete mode 100644 test/Driver/Dependencies/fail-with-bad-deps-fine.swift delete mode 100644 test/Driver/Dependencies/file-added-fine.swift delete mode 100644 test/Driver/Dependencies/independent-fine.swift delete mode 100644 test/Driver/Dependencies/independent-half-dirty-fine.swift delete mode 100644 test/Driver/Dependencies/independent-parseable-fine.swift delete mode 100644 test/Driver/Dependencies/malformed-but-valid-yaml-fine.swift delete mode 100644 test/Driver/Dependencies/malformed-fine.swift delete mode 100644 test/Driver/Dependencies/mutual-fine.swift delete mode 100644 test/Driver/Dependencies/mutual-interface-hash-fine.swift delete mode 100644 test/Driver/Dependencies/nominal-members-fine.swift delete mode 100644 test/Driver/Dependencies/one-way-depends-after-fine.swift delete mode 100644 test/Driver/Dependencies/one-way-depends-before-fine.swift delete mode 100644 test/Driver/Dependencies/one-way-external-delete-fine.swift delete mode 100644 test/Driver/Dependencies/one-way-external-fine.swift delete mode 100644 test/Driver/Dependencies/one-way-fine.swift delete mode 100644 test/Driver/Dependencies/one-way-merge-module-fine.swift delete mode 100644 test/Driver/Dependencies/one-way-parallel-fine.swift delete mode 100644 test/Driver/Dependencies/one-way-parseable-fine.swift delete mode 100644 test/Driver/Dependencies/one-way-provides-after-fine.swift delete mode 100644 test/Driver/Dependencies/one-way-provides-before-fine.swift delete mode 100644 test/Driver/Dependencies/one-way-while-editing-fine.swift delete mode 100644 test/Driver/Dependencies/only-skip-once.swift delete mode 100644 test/Driver/Dependencies/private-after-fine.swift delete mode 100644 test/Driver/Dependencies/private-fine.swift delete mode 100644 test/Driver/Dependencies/whole-module-build-record.swift delete mode 100644 test/Driver/batch_mode_dependencies_make_wrong_order.swift delete mode 100644 test/Driver/cross_module.swift delete mode 100644 test/Incremental/Dependencies/Inputs/InterestingType.swift delete mode 100644 test/Incremental/Dependencies/function-fine.swift delete mode 100644 test/Incremental/Dependencies/function-return-type-fine.swift delete mode 100644 test/Incremental/Dependencies/protocol-conformer-ext-fine.swift delete mode 100644 test/Incremental/Dependencies/protocol-conformer-fine.swift delete mode 100644 test/Incremental/Dependencies/reference-dependencies-consistency-fine.swift delete mode 100644 test/Incremental/Dependencies/reference-dependencies-dynamic-lookup-fine.swift delete mode 100644 test/Incremental/Dependencies/reference-dependencies-errors.swift delete mode 100644 test/Incremental/Dependencies/reference-dependencies-fine.swift delete mode 100644 test/Incremental/Dependencies/reference-dependencies-members-fine.swift delete mode 100644 test/Incremental/Dependencies/struct-member-fine.swift delete mode 100644 test/Incremental/Dependencies/subscript-fine.swift delete mode 100644 test/Incremental/Dependencies/tuple-member.swift delete mode 100644 test/Incremental/Dependencies/typealias-fine.swift delete mode 100644 test/Incremental/Dependencies/var-fine.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/class-fingerprint/definesAB-after.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/class-fingerprint/definesAB-before.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/class-fingerprint/main.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/class-fingerprint/ofm.json delete mode 100644 test/Incremental/Fingerprints/Inputs/class-fingerprint/usesA.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/class-fingerprint/usesB.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/enum-fingerprint/definesAB-after.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/enum-fingerprint/definesAB-before.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/enum-fingerprint/main.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/enum-fingerprint/ofm.json delete mode 100644 test/Incremental/Fingerprints/Inputs/enum-fingerprint/usesA.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/enum-fingerprint/usesB.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/extension-adds-member/definesAB-after.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/extension-adds-member/definesAB-before.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/extension-adds-member/main.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/extension-adds-member/ofm.json delete mode 100644 test/Incremental/Fingerprints/Inputs/extension-adds-member/usesA.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/extension-adds-member/usesB.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/extension-changes-member/definesS-after.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/extension-changes-member/definesS-before.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/extension-changes-member/main.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/extension-changes-member/ofm.json delete mode 100644 test/Incremental/Fingerprints/Inputs/member-moves-extensions/definesS-after.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/member-moves-extensions/definesS-before.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/member-moves-extensions/main.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/member-moves-extensions/ofm.json delete mode 100644 test/Incremental/Fingerprints/Inputs/nested-enum-fingerprint/definesAB-after.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/nested-enum-fingerprint/definesAB-before.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/nested-enum-fingerprint/main.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/nested-enum-fingerprint/ofm.json delete mode 100644 test/Incremental/Fingerprints/Inputs/nested-enum-fingerprint/usesA.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/nested-enum-fingerprint/usesB.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/nominal-adds-extension/definesS-after.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/nominal-adds-extension/definesS-before.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/nominal-adds-extension/main.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/nominal-adds-extension/ofm.json delete mode 100644 test/Incremental/Fingerprints/Inputs/protocol-fingerprint/definesAB-after.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/protocol-fingerprint/definesAB-before.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/protocol-fingerprint/main.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/protocol-fingerprint/ofm.json delete mode 100644 test/Incremental/Fingerprints/Inputs/protocol-fingerprint/usesA.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/protocol-fingerprint/usesB.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/struct-fingerprint/definesAB-after.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/struct-fingerprint/definesAB-before.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/struct-fingerprint/main.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/struct-fingerprint/ofm.json delete mode 100644 test/Incremental/Fingerprints/Inputs/struct-fingerprint/usesA.swift delete mode 100644 test/Incremental/Fingerprints/Inputs/struct-fingerprint/usesB.swift delete mode 100644 test/Incremental/Fingerprints/class-fingerprint.swift delete mode 100644 test/Incremental/Fingerprints/enum-fingerprint.swift delete mode 100644 test/Incremental/Fingerprints/extension-adds-member.swift delete mode 100644 test/Incremental/Fingerprints/extension-changes-member.swift delete mode 100644 test/Incremental/Fingerprints/member-moves-extensions.swift delete mode 100644 test/Incremental/Fingerprints/nested-enum-fingerprint.swift delete mode 100644 test/Incremental/Fingerprints/nominal-adds-extension.swift delete mode 100644 test/Incremental/Fingerprints/protocol-fingerprint.swift delete mode 100644 test/Incremental/Fingerprints/struct-fingerprint.swift delete mode 100644 test/Incremental/Inputs/autolinking/AutolinkingTest.framework/AutolinkingTest delete mode 100644 test/Incremental/Inputs/autolinking/AutolinkingTest.framework/Headers/AutolinkingTest.h delete mode 100644 test/Incremental/Inputs/autolinking/AutolinkingTest.framework/Modules/module.modulemap delete mode 100644 test/Incremental/Inputs/autolinking/autolinking-other.swift delete mode 100644 test/Incremental/Inputs/autolinking/ofm.json delete mode 100644 test/Incremental/Inputs/cross-file-failure/definesA-one.swift delete mode 100644 test/Incremental/Inputs/cross-file-failure/definesA-three.swift delete mode 100644 test/Incremental/Inputs/cross-file-failure/definesA-two.swift delete mode 100644 test/Incremental/Inputs/cross-file-failure/main.swift delete mode 100644 test/Incremental/Inputs/cross-file-failure/ofm.json delete mode 100644 test/Incremental/Inputs/cross-file-failure/usesA.swift delete mode 100644 test/Incremental/Inputs/reference-dependencies-helper.swift delete mode 100644 test/Incremental/Inputs/reference-dependencies-members-helper.swift delete mode 100644 test/Incremental/Inputs/superfluous-cascade/definesPoint-after.swift delete mode 100644 test/Incremental/Inputs/superfluous-cascade/definesPoint-before.swift delete mode 100644 test/Incremental/Inputs/superfluous-cascade/main.swift delete mode 100644 test/Incremental/Inputs/superfluous-cascade/ofm.json delete mode 100644 test/Incremental/Inputs/superfluous-cascade/usesDisplay.swift delete mode 100644 test/Incremental/Inputs/superfluous-cascade/usesPoint.swift delete mode 100644 test/Incremental/Verifier/gen-output-file-map.py delete mode 100644 test/Incremental/Verifier/multi-file-private/Inputs/Base.swift delete mode 100644 test/Incremental/Verifier/multi-file-private/Inputs/Derived.swift delete mode 100644 test/Incremental/Verifier/multi-file-private/Inputs/Inner.swift delete mode 100644 test/Incremental/Verifier/multi-file-private/Inputs/UsesInner.swift delete mode 100644 test/Incremental/Verifier/multi-file-private/main.swift delete mode 100644 test/Incremental/Verifier/single-file-private/AnyObject.swift delete mode 100644 test/Incremental/Verifier/single-file-private/Conformances.swift delete mode 100644 test/Incremental/autolinking-overlay.swift delete mode 100644 test/Incremental/autolinking.swift delete mode 100644 test/Incremental/cross-file-failure.swift delete mode 100644 test/Incremental/superfluous-cascade.swift delete mode 100644 unittests/Driver/CMakeLists.txt delete mode 100644 unittests/Driver/FineGrainedDependencyGraphTests.cpp delete mode 100644 unittests/Driver/MockingFineGrainedDependencyGraphs.cpp delete mode 100644 unittests/Driver/MockingFineGrainedDependencyGraphs.h delete mode 100644 unittests/Driver/UnitTestSourceFileDepGraphFactory.cpp delete mode 100644 unittests/Driver/UnitTestSourceFileDepGraphFactory.h delete mode 100644 validation-test/BuildSystem/test_early_swift_driver_and_test.test delete mode 100644 validation-test/Driver/Dependencies/Inputs/rdar23148987/helper-1.swift delete mode 100644 validation-test/Driver/Dependencies/Inputs/rdar23148987/helper-2.swift delete mode 100644 validation-test/Driver/Dependencies/Inputs/rdar23148987/output.json delete mode 100644 validation-test/Driver/Dependencies/Inputs/rdar25405605/helper-1.swift delete mode 100644 validation-test/Driver/Dependencies/Inputs/rdar25405605/helper-2.swift delete mode 100644 validation-test/Driver/Dependencies/Inputs/rdar25405605/helper-3.swift delete mode 100644 validation-test/Driver/Dependencies/Inputs/rdar25405605/output.json delete mode 100644 validation-test/Driver/Dependencies/rdar23148987.swift delete mode 100644 validation-test/Driver/Dependencies/rdar25405605.swift diff --git a/include/swift/AST/DiagnosticsDriver.def b/include/swift/AST/DiagnosticsDriver.def index 021d446abd0d9..7874cfcbd7e5e 100644 --- a/include/swift/AST/DiagnosticsDriver.def +++ b/include/swift/AST/DiagnosticsDriver.def @@ -188,6 +188,9 @@ WARNING(warn_drv_darwin_sdk_invalid_settings, none, WARNING(warning_unsupported_driver_option,none, "option '%0' is only supported in swift-driver", (StringRef)) +WARNING(new_driver_not_found,none, + "using (deprecated) legacy driver, Swift installation does not contain swift-driver at: '%0'", (StringRef)) + WARNING(old_driver_deprecated,none, "legacy driver is now deprecated; consider avoiding specifying '%0'", (StringRef)) #define UNDEFINE_DIAGNOSTIC_MACROS diff --git a/include/swift/Driver/Action.h b/include/swift/Driver/Action.h index 375b151c5bba1..eb141b9d6c39e 100644 --- a/include/swift/Driver/Action.h +++ b/include/swift/Driver/Action.h @@ -128,78 +128,16 @@ class JobAction : public Action { } }; -class IncrementalJobAction : public JobAction { -public: - struct InputInfo { - /// The status of an input known to the driver. These are used to affect - /// the scheduling decisions made during an incremental build. - /// - /// \Note The order of cases matters. They are ordered from least to - /// greatest impact on the incremental build schedule. - enum class Status { - /// The input to this job is up to date. - UpToDate, - /// The input to this job has changed in a way that requires this job to - /// be rerun, but not in such a way that it requires a cascading rebuild. - NeedsNonCascadingBuild, - /// The input to this job has changed in a way that requires this job to - /// be rerun, and in such a way that all jobs dependent upon this one - /// must be scheduled as well. - NeedsCascadingBuild, - /// The input to this job was not known to the driver when it was last - /// run. - NewlyAdded - }; - - public: - Status status = Status::UpToDate; - llvm::sys::TimePoint<> previousModTime; - - InputInfo() = default; - InputInfo(Status stat, llvm::sys::TimePoint<> time) - : status(stat), previousModTime(time) {} - - static InputInfo makeNewlyAdded() { - return {Status::NewlyAdded, llvm::sys::TimePoint<>::max()}; - } - - static InputInfo makeNeedsCascadingRebuild() { - return {Status::NeedsCascadingBuild, llvm::sys::TimePoint<>::min()}; - } - }; - -private: - virtual void anchor() override; - InputInfo inputInfo; - -public: - IncrementalJobAction(Kind Kind, ArrayRef Inputs, - file_types::ID Type, InputInfo info) - : JobAction(Kind, Inputs, Type), inputInfo(info) {} - -public: - InputInfo getInputInfo() const { - return inputInfo; - } - -public: - static bool classof(const Action *A) { - return A->getKind() == Action::Kind::CompileJob || - A->getKind() == Action::Kind::MergeModuleJob; - } -}; -class CompileJobAction : public IncrementalJobAction { +class CompileJobAction : public JobAction { private: virtual void anchor() override; public: CompileJobAction(file_types::ID OutputType) - : IncrementalJobAction(Action::Kind::CompileJob, llvm::None, OutputType, - {}) {} - CompileJobAction(Action *Input, file_types::ID OutputType, InputInfo info) - : IncrementalJobAction(Action::Kind::CompileJob, Input, OutputType, - info) {} + : JobAction(Action::Kind::CompileJob, llvm::None, OutputType) {} + CompileJobAction(Action *Input, file_types::ID OutputType) + : JobAction(Action::Kind::CompileJob, Input, OutputType) {} static bool classof(const Action *A) { return A->getKind() == Action::Kind::CompileJob; @@ -283,12 +221,12 @@ class REPLJobAction : public JobAction { } }; -class MergeModuleJobAction : public IncrementalJobAction { +class MergeModuleJobAction : public JobAction { virtual void anchor() override; public: - MergeModuleJobAction(ArrayRef Inputs, InputInfo input) - : IncrementalJobAction(Action::Kind::MergeModuleJob, Inputs, - file_types::TY_SwiftModuleFile, input) {} + MergeModuleJobAction(ArrayRef Inputs) + : JobAction(Action::Kind::MergeModuleJob, Inputs, + file_types::TY_SwiftModuleFile) {} static bool classof(const Action *A) { return A->getKind() == Action::Kind::MergeModuleJob; diff --git a/include/swift/Driver/Compilation.h b/include/swift/Driver/Compilation.h index 89fd54813d5e6..8a169e9cdd615 100644 --- a/include/swift/Driver/Compilation.h +++ b/include/swift/Driver/Compilation.h @@ -24,7 +24,6 @@ #include "swift/Basic/OutputFileMap.h" #include "swift/Basic/Statistic.h" #include "swift/Driver/Driver.h" -#include "swift/Driver/FineGrainedDependencyDriverGraph.h" #include "swift/Driver/Job.h" #include "swift/Driver/Util.h" #include "llvm/ADT/StringRef.h" @@ -84,15 +83,9 @@ class Compilation { bool hadAbnormalExit; /// The exit code of this driver process. int exitCode; - /// The dependency graph built up during the compilation of this module. - /// - /// This data is used for cross-module module dependencies. - fine_grained_dependencies::ModuleDepGraph depGraph; - Result(bool hadAbnormalExit, int exitCode, - fine_grained_dependencies::ModuleDepGraph depGraph) - : hadAbnormalExit(hadAbnormalExit), exitCode(exitCode), - depGraph(std::move(depGraph)) {} + Result(bool hadAbnormalExit, int exitCode) + : hadAbnormalExit(hadAbnormalExit), exitCode(exitCode) {} Result(const Result &) = delete; Result &operator=(const Result &) = delete; @@ -102,8 +95,7 @@ class Compilation { /// Construct a \c Compilation::Result from just an exit code. static Result code(int code) { - return Compilation::Result{false, code, - fine_grained_dependencies::ModuleDepGraph()}; + return Compilation::Result{false, code}; } }; @@ -171,33 +163,10 @@ class Compilation { /// These apply whether the compilation succeeds or fails. If the llvm::StringMap TempFilePaths; - /// Write information about this compilation to this file. - /// - /// This is used for incremental builds. - std::string CompilationRecordPath; - - /// A hash representing all the arguments that could trigger a full rebuild. - std::string ArgsHash; - - /// When the build was started. - /// - /// This should be as close as possible to when the driver was invoked, since - /// it's used as a lower bound. - llvm::sys::TimePoint<> BuildStartTime; - - /// The time of the last build. - /// - /// If unknown, this will be some time in the past. - llvm::sys::TimePoint<> LastBuildTime = llvm::sys::TimePoint<>::min(); - /// Indicates whether this Compilation should continue execution of subtasks /// even if they returned an error status. bool ContinueBuildingAfterErrors = false; - /// Indicates whether tasks should only be executed if their output is out - /// of date. - bool EnableIncrementalBuild; - /// Indicates whether groups of parallel frontend jobs should be merged /// together and run in composite "batch jobs" when possible, to reduce /// redundant work. @@ -256,17 +225,6 @@ class Compilation { /// -disable-only-one-dependency-file on the command line. const bool OnlyOneDependencyFile; -private: - /// Helpful for debugging, but slows down the driver. So, only turn on when - /// needed. - const bool VerifyFineGrainedDependencyGraphAfterEveryImport; - /// Helpful for debugging, but slows down the driver. So, only turn on when - /// needed. - const bool EmitFineGrainedDependencyDotFileAfterEveryImport; - - /// (experimental) Enable cross-module incremental build scheduling. - const bool EnableCrossModuleIncrementalBuild; - private: template static T *unwrap(const std::unique_ptr &p) { @@ -285,11 +243,7 @@ class Compilation { std::unique_ptr InputArgs, std::unique_ptr TranslatedArgs, InputFileList InputsWithTypes, - std::string CompilationRecordPath, - StringRef ArgsHash, llvm::sys::TimePoint<> StartTime, - llvm::sys::TimePoint<> LastBuildTime, size_t FilelistThreshold, - bool EnableIncrementalBuild = false, bool EnableBatchMode = false, unsigned BatchSeed = 0, llvm::Optional BatchCount = llvm::None, @@ -297,10 +251,7 @@ class Compilation { bool SaveTemps = false, bool ShowDriverTimeCompilation = false, std::unique_ptr Stats = nullptr, - bool OnlyOneDependencyFile = false, - bool VerifyFineGrainedDependencyGraphAfterEveryImport = false, - bool EmitFineGrainedDependencyDotFileAfterEveryImport = false, - bool EnableCrossModuleIncrementalBuild = false); + bool OnlyOneDependencyFile = false); // clang-format on ~Compilation(); @@ -353,19 +304,6 @@ class Compilation { return DerivedOutputFileMap; } - bool getIncrementalBuildEnabled() const { - return EnableIncrementalBuild; - } - void disableIncrementalBuild(Twine why); - - bool getVerifyFineGrainedDependencyGraphAfterEveryImport() const { - return VerifyFineGrainedDependencyGraphAfterEveryImport; - } - - bool getEmitFineGrainedDependencyDotFileAfterEveryImport() const { - return EmitFineGrainedDependencyDotFileAfterEveryImport; - } - bool getBatchModeEnabled() const { return EnableBatchMode; } @@ -377,13 +315,6 @@ class Compilation { ContinueBuildingAfterErrors = Value; } - bool getShowIncrementalBuildDecisions() const { - return ShowIncrementalBuildDecisions; - } - void setShowIncrementalBuildDecisions(bool value = true) { - ShowIncrementalBuildDecisions = value; - } - bool getShowJobLifecycle() const { return ShowJobLifecycle; } @@ -395,10 +326,6 @@ class Compilation { return ShowDriverTimeCompilation; } - bool getEnableCrossModuleIncrementalBuild() const { - return EnableCrossModuleIncrementalBuild; - } - size_t getFilelistThreshold() const { return FilelistThreshold; } @@ -420,7 +347,7 @@ class Compilation { /// True if extra work has to be done when tracing through the dependency /// graph, either in order to print dependencies or to collect statistics. bool getTraceDependencies() const { - return getShowIncrementalBuildDecisions() || getStatsReporter(); + return getStatsReporter(); } OutputLevel getOutputLevel() const { @@ -431,12 +358,10 @@ class Compilation { return BatchSeed; } - llvm::sys::TimePoint<> getLastBuildTime() const { - return LastBuildTime; + llvm::Optional getBatchCount() const { + return BatchCount; } - llvm::Optional getBatchCount() const { return BatchCount; } - llvm::Optional getBatchSizeLimit() const { return BatchSizeLimit; } /// Requests the path to a file containing all input source files. This can @@ -448,17 +373,6 @@ class Compilation { /// \sa types::isPartOfSwiftCompilation const char *getAllSourcesPath() const; - /// Retrieve the path to the external swift deps file. - /// - /// For cross-module incremental builds, this file contains the dependencies - /// from all the modules integrated over the prior build. - /// - /// Currently this patch is relative to the build record, but we may want - /// to allow the output file map to customize this at some point. - std::string getExternalSwiftDepsFilePath() const { - return CompilationRecordPath + ".external"; - } - /// Asks the Compilation to perform the Jobs which it knows about. /// /// \param TQ The TaskQueue used to schedule jobs for execution. diff --git a/include/swift/Driver/Driver.h b/include/swift/Driver/Driver.h index 938542630ab62..f22525d73a19a 100644 --- a/include/swift/Driver/Driver.h +++ b/include/swift/Driver/Driver.h @@ -329,12 +329,9 @@ class Driver { /// \param[out] TopLevelActions The main Actions to build Jobs for. /// \param TC the default host tool chain. /// \param OI The OutputInfo for which Actions should be generated. - /// \param OutOfDateMap If present, information used to decide which files - /// need to be rebuilt. /// \param C The Compilation to which Actions should be added. void buildActions(SmallVectorImpl &TopLevelActions, const ToolChain &TC, const OutputInfo &OI, - const InputInfoMap *OutOfDateMap, Compilation &C) const; /// Construct the OutputFileMap for the driver from the given arguments. diff --git a/include/swift/Driver/FineGrainedDependencyDriverGraph.h b/include/swift/Driver/FineGrainedDependencyDriverGraph.h deleted file mode 100644 index 76469682c92d2..0000000000000 --- a/include/swift/Driver/FineGrainedDependencyDriverGraph.h +++ /dev/null @@ -1,597 +0,0 @@ -//===---- FineGrainedDependencyModuleDepGraph.h ------------------*- C++-*-===// -// -// This source file is part of the Swift.org open source project -// -// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -// -//===----------------------------------------------------------------------===// - -#ifndef SWIFT_DRIVER_FINE_GRAINED_DEPENDENCY_DRIVER_GRAPH_H -#define SWIFT_DRIVER_FINE_GRAINED_DEPENDENCY_DRIVER_GRAPH_H - -#include "swift/AST/FineGrainedDependencies.h" -#include "swift/Basic/Debug.h" -#include "swift/Basic/Fingerprint.h" -#include "swift/Basic/LLVM.h" -#include "swift/Basic/OptionSet.h" -#include "swift/Driver/Job.h" -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/IntrusiveRefCntPtr.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/ADT/iterator_range.h" -#include "llvm/Support/Path.h" -#include "llvm/Support/PointerLikeTypeTraits.h" -#include "llvm/Support/VirtualOutputBackend.h" -#include "llvm/Support/VirtualOutputBackends.h" -#include -#include -#include -#include - -// Declarations for the portion fine-grained dependency system used by the -// driver. - -namespace swift { - -class UnifiedStatsReporter; - -namespace fine_grained_dependencies { - -//============================================================================== -// MARK: ModuleDepGraphNode -//============================================================================== - -/// A node in the DriverDependencyGraph -/// Keep separate type from Node for type-checking. -class ModuleDepGraphNode : public DepGraphNode { - - /// The swiftDeps file that holds this entity iff this is a provides node. - /// If more than one source file has the same DependencyKey, then there - /// will be one node for each in the driver, distinguished by this field. - llvm::Optional swiftDeps; - - /// When finding transitive dependents, this node has been traversed. - bool hasBeenTracedAsADependent = false; - -public: - ModuleDepGraphNode(const DependencyKey &key, - llvm::Optional fingerprint, - llvm::Optional swiftDeps) - : DepGraphNode(key, fingerprint), swiftDeps(swiftDeps) {} - - bool getHasBeenTraced() const { return hasBeenTracedAsADependent; } - void setHasBeenTraced() { hasBeenTracedAsADependent = true; } - void clearHasBeenTraced() { hasBeenTracedAsADependent = false; } - - /// Integrate \p integrand's fingerprint into \p dn. - /// \returns true if there was a change requiring recompilation. - bool integrateFingerprintFrom(const SourceFileDepGraphNode *integrand) { - if (getFingerprint() == integrand->getFingerprint()) - return false; - setFingerprint(integrand->getFingerprint()); - return true; - } - - bool operator==(const ModuleDepGraphNode &other) const { - return static_cast(*this) == - static_cast(other) && - getSwiftDeps() == other.getSwiftDeps(); - } - - const llvm::Optional &getSwiftDeps() const { return swiftDeps; } - - std::string getSwiftDepsOrEmpty() const { - return getSwiftDeps().value_or(std::string()); - } - - std::string getSwiftDepsForMapKey() const { - // Use the empty string for nodes whose source file is unknown, - // i.e. depends. (Known depends are represented by arcs, not nodes.) - return getSwiftDepsOrEmpty(); - } - - const std::string &getSwiftDepsOfProvides() const { - return getSwiftDeps().value(); - } - - /// Nodes can move from file to file when the driver reads the result of a - /// compilation. - void setSwiftDeps(llvm::Optional s) { swiftDeps = s; } - - bool getIsProvides() const { return getSwiftDeps().has_value(); } - - /// Return true if this node describes a definition for which the job is known - bool isDefinedInAKnownFile() const { return getIsProvides(); } - - bool doesNodeProvideAnInterface() const { - return getKey().isInterface() && getIsProvides(); - } - - bool assertImplementationMustBeInAFile() const { - assert((isDefinedInAKnownFile() || !getKey().isImplementation()) && - "Implementations must be in some file."); - return true; - } - - std::string humanReadableName() const { - StringRef where = !getIsProvides() - ? "" - : llvm::sys::path::filename(getSwiftDepsOfProvides()); - return DepGraphNode::humanReadableName(where); - } - - void dump(raw_ostream &) const; - - SWIFT_DEBUG_DUMP; -}; - -//============================================================================== -// MARK: ModuleDepGraph -//============================================================================== - -/// See \ref Node in FineGrainedDependencies.h -class ModuleDepGraph { - - /// Find nodes, first by the swiftDeps file, then by key. - /// Supports searching specific files for a node matching a key. - /// Such a search is useful when integrating nodes from a given source file to - /// see which nodes were there before integration and so might have - /// disappeared. - /// - /// Some nodes are in no file, for instance a dependency on a Decl in a source - /// file whose swiftdeps has not been read yet. For these, the filename is the - /// empty string. - /// - /// Don't add to this collection directly; use \ref addToMap - /// instead because it enforces the correspondence with the swiftFileDeps - /// field of the node. - /// TODO: Fix above comment - /// - /// Sadly, cannot use an optional string for a key. - using NodeMap = - BiIndexedTwoStageMap; - NodeMap nodeMap; - - /// Since dependency keys use baseNames, they are coarser than individual - /// decls. So two decls might map to the same key. Given a use, which is - /// denoted by a node, the code needs to find the files to recompile. So, the - /// key indexes into the nodeMap, and that yields a submap of nodes keyed by - /// file. The set of keys in the submap are the files that must be recompiled - /// for the use. - /// (In a given file, only one node exists with a given key, but in the future - /// that would need to change if/when we can recompile a smaller unit than a - /// source file.) - - /// Tracks def-use relationships by DependencyKey. - std::unordered_map> - usesByDef; - - // Supports requests from the driver to getExternalDependencies. - std::unordered_set externalDependencies; - - /// Keyed by swiftdeps filename, so we can get back to Jobs. - std::unordered_map jobsBySwiftDeps; - - /// For debugging, a dot file can be emitted. This file can be read into - /// various graph-drawing programs. - /// The driver emits this file into the same directory as the swiftdeps - /// files it reads, so when reading a file compute the base path here. - /// Initialize to empty in case no swiftdeps file has been read. - SmallString<128> driverDotFileBasePath = StringRef(""); - - /// For debugging, the driver can write out a dot file, for instance when a - /// Frontend swiftdeps is read and integrated. In order to keep subsequent - /// files for the same name distinct, keep a sequence number for each name. - std::unordered_map dotFileSequenceNumber; - -public: - bool verifyFineGrainedDependencyGraphAfterEveryImport; - bool emitFineGrainedDependencyDotFileAfterEveryImport; - -private: - /// If tracing dependencies, holds a vector used to hold the current path - /// def - use/def - use/def - ... - llvm::Optional> currentPathIfTracing; - - /// If tracing dependencies, holds the sequence of defs used to get to the job - /// that is the key - std::unordered_multimap> - dependencyPathsToJobs; - - /// VirtualOutputBackend for emitting graphs. - llvm::IntrusiveRefCntPtr backend; - - /// For helping with performance tuning, may be null: - UnifiedStatsReporter *stats; - - //============================================================================== - // MARK: ModuleDepGraph - mutating dependencies - //============================================================================== - - /// Encapsulate the invariant between where the node resides in - /// nodesBySwiftDepsFile and the swiftDeps node instance variable here. - void addToMap(ModuleDepGraphNode *n) { - nodeMap.insert(n->getSwiftDepsForMapKey(), n->getKey(), n); - } - - /// When integrating a SourceFileDepGraph, there might be a node representing - /// a Decl that had previously been read as an expat, that is a node - /// representing a Decl in no known file (to that point). (Recall the the - /// Frontend processes name lookups as dependencies, but does not record in - /// which file the name was found.) In such a case, it is necessary to move - /// the node to the proper collection. - void moveNodeToDifferentFile(ModuleDepGraphNode *n, - llvm::Optional newFile) { - eraseNodeFromMap(n); - n->setSwiftDeps(newFile); - addToMap(n); - } - - /// Remove node from nodeMap, check invariants. - ModuleDepGraphNode *eraseNodeFromMap(ModuleDepGraphNode *nodeToErase) { - ModuleDepGraphNode *nodeActuallyErased = nodeMap.findAndErase( - nodeToErase->getSwiftDepsForMapKey(), nodeToErase->getKey()); - (void)nodeActuallyErased; - assert( - nodeToErase == nodeActuallyErased || - mapCorruption("Node found from key must be same as node holding key.")); - return nodeToErase; - } - - void eraseUsesOfNode(ModuleDepGraphNode *nodeToErase) { - for (auto &defAndUses : usesByDef) - defAndUses.second.erase(nodeToErase); - } - - void eraseNodeFromCurrentPathIfTracing(ModuleDepGraphNode *nodeToErase) { - if (currentPathIfTracing) - eraseNodeFromVector(currentPathIfTracing.value(), nodeToErase); - } - - void eraseNodeFromDependencyPathToJobs(ModuleDepGraphNode *nodeToErase) { - for (auto &jobAndPath : dependencyPathsToJobs) - eraseNodeFromVector(jobAndPath.second, nodeToErase); - } - - static void eraseNodeFromVector(std::vector &v, - const ModuleDepGraphNode *n) { - const auto where = std::find(v.begin(), v.end(), n); - if (where != v.end()) - v.erase(where); - } - - void eraseNodeFromGraphAndFreeIt(ModuleDepGraphNode *); - - /// If the programmer removes a Decl from a source file, the corresponding - /// ModuleDepGraphNode needs to be removed. - void eraseNodeFromJob(ModuleDepGraphNode *); - - //============================================================================ - // MARK: ModuleDepGraph - utilities for Job and swiftdeps - //============================================================================ -private: - static StringRef getSwiftDeps(const driver::Job *cmd) { - return cmd->getOutput().getAdditionalOutputForType( - file_types::TY_SwiftDeps); - } - - const driver::Job *getJob(llvm::Optional swiftDeps) const { - assert(swiftDeps.has_value() && "Don't call me for expats."); - auto iter = jobsBySwiftDeps.find(swiftDeps.value()); - assert(iter != jobsBySwiftDeps.end() && "All jobs should be tracked."); - return iter->second; - } - - //============================================================================ - // MARK: ModuleDepGraph - creation - //============================================================================ - -public: - /// For templates such as DotFileEmitter. - using NodeType = ModuleDepGraphNode; - - /// \p stats may be null - ModuleDepGraph(const bool verifyFineGrainedDependencyGraphAfterEveryImport, - const bool emitFineGrainedDependencyDotFileAfterEveryImport, - const bool shouldTraceDependencies, - UnifiedStatsReporter *stats) - : verifyFineGrainedDependencyGraphAfterEveryImport( - verifyFineGrainedDependencyGraphAfterEveryImport), - emitFineGrainedDependencyDotFileAfterEveryImport( - emitFineGrainedDependencyDotFileAfterEveryImport), - currentPathIfTracing( - shouldTraceDependencies - ? llvm::Optional>( - std::vector()) - : llvm::None), - stats(stats) { - assert(verify() && "ModuleDepGraph should be fine when created"); - - // Create a OnDiskOutputBackend for emitting graphs. Currently, this is - // only used by driver so the backend is not shared with a CompilerInstance. - backend = llvm::makeIntrusiveRefCnt(); - } - - /// For unit tests. - ModuleDepGraph(const bool EmitDotFilesForDebugging = false) - : ModuleDepGraph( - true, /*emitFineGrainedDependencyDotFileAfterEveryImport=*/ - EmitDotFilesForDebugging, false, nullptr) {} - - //============================================================================ - // MARK: ModuleDepGraph - updating from a switdeps file - //============================================================================ -public: - using Changes = llvm::Optional>; - - /// Unlike the standard \c CoarseGrainedDependencyGraph, returns \c - /// CoarseGrainedDependencyGraphImpl::LoadResult::AffectsDownstream when - /// loading a new file, i.e. when determining the initial set. Caller - /// compensates. - Changes loadFromPath(const driver::Job *, StringRef, DiagnosticEngine &); - - Changes loadFromSourceFileDepGraph(const driver::Job *cmd, - const SourceFileDepGraph &, - DiagnosticEngine &); - - Changes loadFromSwiftModuleBuffer(const driver::Job *, llvm::MemoryBuffer &, - DiagnosticEngine &); - -private: - /// Read a SourceFileDepGraph belonging to \p job from \p buffer - /// and integrate it into the ModuleDepGraph. - /// Used both the first time, and to reload the SourceFileDepGraph. - /// If any changes were observed, indicate same in the return vale. - Changes loadFromBuffer(const driver::Job *, llvm::MemoryBuffer &, - DiagnosticEngine &); - - /// Integrate a SourceFileDepGraph into the receiver. - /// Integration happens when the driver needs to read SourceFileDepGraph. - Changes - integrate(const SourceFileDepGraph &, StringRef swiftDepsOfJob); - - enum class LocationOfPreexistingNode { nowhere, here, elsewhere }; - - typedef llvm::Optional< - std::pair> - PreexistingNodeIfAny; - - /// Find the preexisting node here that best matches the integrand. - PreexistingNodeIfAny - findPreexistingMatch(StringRef swiftDepsOfCompilationToBeIntegrated, - const SourceFileDepGraphNode *integrand) const; - - /// Integrate the \p integrand into the receiver. - /// If an illegal value was found, return \c None, otherwise - /// return the changed node if any.. - llvm::Optional> - integrateSourceFileDepGraphNode(const SourceFileDepGraph &g, - const SourceFileDepGraphNode *integrand, - const PreexistingNodeIfAny preexistingMatch, - StringRef swiftDepsOfJob); - - /// Integrate the \p integrand, a node that represents a Decl in the swiftDeps - /// file being integrated. \p preexistingNodeInPlace holds the node - /// representing the same Decl that already exists, if there is one. \p - /// preexistingExpat holds a node with the same key that already exists, but was - /// not known to reside in any swiftDeps file. Return a bool indicating if - /// this node represents a change that must be propagated, and the integrated - /// ModuleDepGraphNode. - std::pair - integrateSourceFileDeclNode(const SourceFileDepGraphNode *integrand, - StringRef swiftDepsOfJob, - const PreexistingNodeIfAny preexistingMatch); - - /// Create a brand-new ModuleDepGraphNode to integrate \p integrand. - ModuleDepGraphNode * - integrateByCreatingANewNode(const SourceFileDepGraphNode *integrand, - llvm::Optional swiftDepsForNewNode); - - /// After importing a provides node from the frontend, record its - /// dependencies. - /// Return true if moduleUseNode picks up a new external-dependency - /// - /// \param g The source file graph being integrated into the module graph - /// \param sourceFileUseNode The source file node just integrated, which may - /// also be a use (i.e. a "depends", a declaration used by something else) - /// \param moduleUseNode The module file node corresponding to the \c - /// sourceFileUseNode - bool recordWhatUseDependsUpon(const SourceFileDepGraph &g, - const SourceFileDepGraphNode *sourceFileUseNode, - ModuleDepGraphNode *moduleUseNode); - - //============================================================================ - // MARK: ModuleDepGraph - dot file support - //============================================================================ -public: - /// For the dot file. - std::string getGraphID() const { return "driver"; } - - /// Don't want to do this after every integration--too slow-- - /// So export this hook to the driver. - bool emitDotFileAndVerify(DiagnosticEngine &) const; - - /// Use the known swiftDeps to find a directory for - /// the job-independent dot file. - std::string computePathForDotFile() const; - - /// For debugging and visualization, write out the graph to a dot file. - /// \p diags may be null if no diagnostics are needed. - void emitDotFileForJob(DiagnosticEngine &, const driver::Job *); - void emitDotFile(DiagnosticEngine &, StringRef baseName); - void emitDotFile() { emitDotFile(llvm::errs()); } - void emitDotFile(llvm::raw_ostream &); - - //============================================================================ - // MARK: ModuleDepGraph - traversal - //============================================================================ -public: - void forCorrespondingImplementationOfProvidedInterface( - const ModuleDepGraphNode *, - function_ref) const; - - void forEachUseOf(const ModuleDepGraphNode *def, - function_ref) const; - - void forEachNode(function_ref) const; - - void forEachArc(function_ref) const; - - /// Call \p fn for each node whose key matches \p key. - void - forEachMatchingNode(const DependencyKey &key, - function_ref) const; - - void forEachNodeInJob(StringRef swiftDeps, - function_ref) const; - - /// Given a definition node, transitively find all previous untraced - /// dependents and add them to the array. Also returns definition if that is - /// untraced. - void findPreviouslyUntracedDependents( - std::vector &foundDependents, - ModuleDepGraphNode *definition); - - /// Given a set of nodes, return the set of swiftDeps for the jobs those - /// nodes are in. - std::vector - computeSwiftDepsFromNodes(ArrayRef nodes) const; - - /// Record a visit to this node for later dependency printing - size_t traceArrival(const ModuleDepGraphNode *visitedNode); - /// Record end of visit to this node. - void traceDeparture(size_t pathLengthAfterArrival); - - /// For printing why a Job was compiled, record how it was found. - void recordDependencyPathToJob( - const std::vector &pathToJob, - const driver::Job *dependentJob); - - /// Dump the path that led to \p node. - void printPath(raw_ostream &out, const driver::Job *node) const; - - /// Get a printable filename, given a node's swiftDeps. - StringRef - getProvidingFilename(const llvm::Optional &swiftDeps) const; - - /// Print one node on the dependency path. - static void printOneNodeOfPath(raw_ostream &out, const DependencyKey &key, - const StringRef filename); - - bool isCurrentPathForTracingEmpty() const { - return !currentPathIfTracing.has_value() || currentPathIfTracing->empty(); - } - - //============================================================================ - // MARK: ModuleDepGraph - job-level queries and operations - //============================================================================ -public: - // This section contains the interface to the status quo code in the driver. - - bool haveAnyNodesBeenTraversedIn(const driver::Job *) const; - - /// Find all jobs (possibly including the argument) requiring recompilation - /// assuming that every entity in \p jobToBeRecompiled has changed. - std::vector - findJobsToRecompileWhenWholeJobChanges(const driver::Job *jobToBeRecompiled); - - template - std::vector - findJobsToRecompileWhenNodesChange(const Nodes &nodes) { - std::vector foundDependents; - for (ModuleDepGraphNode *n : nodes) - findPreviouslyUntracedDependents(foundDependents, n); - return jobsContaining(foundDependents); - } - -private: - std::vector - jobsContaining(const ArrayRef uses) const; - -public: - /// Record a new (to this graph) Job. - void registerJob(const driver::Job *); - - std::vector getAllJobs() const; - - /// Find jobs that were previously not known to need compilation but that - /// depend on \c externalDependency. - std::vector - findExternallyDependentUntracedJobs(StringRef externalDependency); - - //============================================================================ - // MARK: ModuleDepGraph - External dependencies - //============================================================================ - -public: - std::vector getExternalDependencies() const; - - void forEachUntracedJobDirectlyDependentOnExternalSwiftDeps( - StringRef externalDependency, function_ref fn); - void forEachUntracedJobDirectlyDependentOnExternalIncrementalSwiftDeps( - StringRef externalDependency, function_ref fn); - - //============================================================================ - // MARK: ModuleDepGraph - verification - //============================================================================ - -private: - /// Return true or abort - bool verify() const; - - void verifyNodeMapEntries() const; - - /// Called for each \ref nodeMap entry during verification. - /// \p nodesSeenInNodeMap ensures that nodes are unique in each submap - /// \p swiftDepsString is the swiftdeps file name in the map - /// \p key is the DependencyKey in the map - /// \p n is the node for that map entry - void verifyNodeMapEntry( - std::array>, - 2> &nodesSeenInNodeMap, - const std::string &swiftDepsString, const DependencyKey &, - ModuleDepGraphNode *, unsigned submapIndex) const; - - /// See ModuleDepGraph::verifyNodeMapEntry for argument descriptions - void verifyNodeIsUniqueWithinSubgraph( - std::array>, - 2> &nodesSeenInNodeMap, - const std::string &swiftDepsString, const DependencyKey &, - ModuleDepGraphNode *, unsigned submapIndex) const; - - /// See ModuleDepGraph::verifyNodeMapEntry for argument descriptions - void verifyNodeIsInRightEntryInNodeMap(const std::string &swiftDepsString, - const DependencyKey &, - const ModuleDepGraphNode *) const; - - void verifyExternalDependencyUniqueness(const DependencyKey &) const; - - void verifyCanFindEachJob() const; - void verifyEachJobInGraphIsTracked() const; - - static bool mapCorruption(const char *msg) { llvm_unreachable(msg); } - - - bool ensureJobIsTracked(const std::string &swiftDeps) const { - assert(swiftDeps.empty() || getJob(swiftDeps)); - return true; - } - - static std::vector - printJobsForDebugging(const std::vector &jobs); -}; -} // namespace fine_grained_dependencies -} // namespace swift - -#endif // SWIFT_DRIVER_FINE_GRAINED_DEPENDENCY_DRIVER_GRAPH_H diff --git a/include/swift/Driver/Job.h b/include/swift/Driver/Job.h index 3e9533f0e2fe7..01598e2aeda28 100644 --- a/include/swift/Driver/Job.h +++ b/include/swift/Driver/Job.h @@ -317,22 +317,6 @@ class Job { /// The modification time of the main input file, if any. llvm::sys::TimePoint<> InputModTime = llvm::sys::TimePoint<>::max(); -#ifndef NDEBUG - /// The "wave" of incremental jobs that this \c Job was scheduled into. - /// - /// The first "wave" of jobs is computed by the driver from the set of inputs - /// and external files that have been mutated by the user. From there, as - /// jobs from the first wave finish executing, we reload their \c swiftdeps - /// files and re-integrate them into the dependency graph to discover - /// the jobs for the second "wave". - /// - /// In +asserts builds, we ensure that no more than two "waves" occur for - /// any given incremental compilation session. This is a consequence of - /// 1) transitivity in dependency arcs - /// 2) dependency tracing from uses that affect a def's interfaces to that - /// def's uses. - mutable unsigned Wave = 1; -#endif public: Job(const JobAction &Source, SmallVectorImpl &&Inputs, @@ -425,11 +409,6 @@ class Job { /// Assumes that, if a compile job, has one primary swift input /// May return empty if none. StringRef getFirstSwiftPrimaryInput() const; - -#ifndef NDEBUG - unsigned getWave() const { return Wave; } - void setWave(unsigned WaveNum) const { Wave = WaveNum; } -#endif }; /// A BatchJob comprises a _set_ of jobs, each of which is sufficiently similar diff --git a/lib/Driver/Action.cpp b/lib/Driver/Action.cpp index 27f0d9306d95a..25117800eed96 100644 --- a/lib/Driver/Action.cpp +++ b/lib/Driver/Action.cpp @@ -43,8 +43,6 @@ void InputAction::anchor() {} void JobAction::anchor() {} -void IncrementalJobAction::anchor() {} - void CompileJobAction::anchor() {} void InterpretJobAction::anchor() {} diff --git a/lib/Driver/CMakeLists.txt b/lib/Driver/CMakeLists.txt index 679e4854ff76a..b5d95832435cc 100644 --- a/lib/Driver/CMakeLists.txt +++ b/lib/Driver/CMakeLists.txt @@ -5,7 +5,6 @@ set(swiftDriver_sources Compilation.cpp DarwinToolChains.cpp Driver.cpp - FineGrainedDependencyDriverGraph.cpp FrontendUtil.cpp Job.cpp PrettyStackTrace.cpp diff --git a/lib/Driver/Compilation.cpp b/lib/Driver/Compilation.cpp index cd6ac304f12e4..804de591a61aa 100644 --- a/lib/Driver/Compilation.cpp +++ b/lib/Driver/Compilation.cpp @@ -26,7 +26,6 @@ #include "swift/Basic/type_traits.h" #include "swift/Driver/Action.h" #include "swift/Driver/Driver.h" -#include "swift/Driver/FineGrainedDependencyDriverGraph.h" #include "swift/Driver/Job.h" #include "swift/Driver/ToolChain.h" #include "swift/Option/Options.h" @@ -45,8 +44,6 @@ #include "llvm/Support/YAMLParser.h" #include "llvm/Support/raw_ostream.h" -#include "CompilationRecord.h" - #include #include #if defined(_WIN32) @@ -112,12 +109,7 @@ Compilation::Compilation(DiagnosticEngine &Diags, std::unique_ptr InputArgs, std::unique_ptr TranslatedArgs, InputFileList InputsWithTypes, - std::string CompilationRecordPath, - StringRef ArgsHash, - llvm::sys::TimePoint<> StartTime, - llvm::sys::TimePoint<> LastBuildTime, size_t FilelistThreshold, - bool EnableIncrementalBuild, bool EnableBatchMode, unsigned BatchSeed, llvm::Optional BatchCount, @@ -125,21 +117,13 @@ Compilation::Compilation(DiagnosticEngine &Diags, bool SaveTemps, bool ShowDriverTimeCompilation, std::unique_ptr StatsReporter, - bool OnlyOneDependencyFile, - bool VerifyFineGrainedDependencyGraphAfterEveryImport, - bool EmitFineGrainedDependencyDotFileAfterEveryImport, - bool EnableCrossModuleIncrementalBuild) + bool OnlyOneDependencyFile) : Diags(Diags), TheToolChain(TC), TheOutputInfo(OI), Level(Level), RawInputArgs(std::move(InputArgs)), TranslatedArgs(std::move(TranslatedArgs)), InputFilesWithTypes(std::move(InputsWithTypes)), - CompilationRecordPath(CompilationRecordPath), - ArgsHash(ArgsHash), - BuildStartTime(StartTime), - LastBuildTime(LastBuildTime), - EnableIncrementalBuild(EnableIncrementalBuild), EnableBatchMode(EnableBatchMode), BatchSeed(BatchSeed), BatchCount(BatchCount), @@ -148,13 +132,7 @@ Compilation::Compilation(DiagnosticEngine &Diags, ShowDriverTimeCompilation(ShowDriverTimeCompilation), Stats(std::move(StatsReporter)), FilelistThreshold(FilelistThreshold), - OnlyOneDependencyFile(OnlyOneDependencyFile), - VerifyFineGrainedDependencyGraphAfterEveryImport( - VerifyFineGrainedDependencyGraphAfterEveryImport), - EmitFineGrainedDependencyDotFileAfterEveryImport( - EmitFineGrainedDependencyDotFileAfterEveryImport), - EnableCrossModuleIncrementalBuild(EnableCrossModuleIncrementalBuild) - { } + OnlyOneDependencyFile(OnlyOneDependencyFile) { } // clang-format on static bool writeFilelistIfNecessary(const Job *job, const ArgList &args, @@ -163,9 +141,6 @@ static bool writeFilelistIfNecessary(const Job *job, const ArgList &args, using CommandSetVector = llvm::SetVector; using BatchPartition = std::vector>; -using InputInfoMap = llvm::SmallMapVector; - namespace { static DetailedTaskDescription constructDetailedTaskDescription(const driver::Job &Cmd) { @@ -265,13 +240,6 @@ namespace driver { /// Only intended for source files. llvm::SmallDenseMap UnfinishedCommands; - /// Jobs that incremental-mode has decided it can skip. - CommandSet DeferredCommands; - public: - /// Dependency graphs for deciding which jobs are dirty (need running) - /// or clean (can be skipped). - fine_grained_dependencies::ModuleDepGraph FineGrainedDepGraph; - private: /// TaskQueue for execution. std::unique_ptr TQ; @@ -287,35 +255,6 @@ namespace driver { llvm::SmallDenseMap, 16> DriverTimers; - void noteBuilding(const Job *cmd, const bool willBeBuilding, - StringRef reason) const { - if (!Comp.getShowIncrementalBuildDecisions()) - return; - if (ScheduledCommands.count(cmd)) - return; - if (!willBeBuilding) - return; - - llvm::outs() << "Queuing " << reason << ": " << LogJob(cmd) << "\n"; - getFineGrainedDepGraph().printPath(llvm::outs(), cmd); - } - - template - void noteBuildingJobs(const JobsCollection &unsortedJobsArg, - const StringRef reason) const { - if (!Comp.getShowIncrementalBuildDecisions() && - !Comp.getShowJobLifecycle()) - return; - // Sigh, must manually convert SmallPtrSet to ArrayRef-able container - llvm::SmallVector unsortedJobs; - for (const Job *j : unsortedJobsArg) - unsortedJobs.push_back(j); - llvm::SmallVector sortedJobs; - Comp.sortJobsToMatchCompilationInputs(unsortedJobs, sortedJobs); - for (const Job *j : sortedJobs) - noteBuilding(j, /*willBeBuilding=*/true, reason); - } - const Job *findUnfinishedJob(ArrayRef JL) { for (const Job *Cmd : JL) { if (!FinishedCommands.count(Cmd)) @@ -344,17 +283,6 @@ namespace driver { return; } -#ifndef NDEBUG - // If we can, assert that no compile jobs are scheduled beyond the second - // wave. If this assertion fails, it indicates one of: - // 1) A failure of the driver's job tracing machinery to follow a - // dependency arc. - // 2) A failure of the frontend to emit a dependency arc. - if (isa(Cmd->getSource()) && Cmd->getWave() > 2) { - llvm_unreachable("Scheduled a command into a third wave!"); - } -#endif - // Adding to scheduled means we've committed to its completion (not // distinguished from skipping). We never remove it once inserted. ScheduledCommands.insert(Cmd); @@ -461,115 +389,6 @@ namespace driver { } } - /// Note that a .swiftdeps file failed to load and take corrective actions: - /// disable incremental logic and schedule all existing deferred commands. - void - dependencyLoadFailed(StringRef DependenciesFile, bool Warn=true) { - if (Warn && Comp.getShowIncrementalBuildDecisions()) - Comp.getDiags().diagnose(SourceLoc(), - diag::warn_unable_to_load_dependencies, - DependenciesFile); - Comp.disableIncrementalBuild( - Twine("malformed swift dependencies file '") + DependenciesFile + - "'"); - } - - /// Helper that attempts to reload a job's .swiftdeps file after the job - /// exits, and re-run transitive marking to ensure everything is properly - /// invalidated by any new dependency edges introduced by it. If reloading - /// fails, this can cause deferred jobs to be immediately scheduled. - - std::vector - reloadAndRemarkDeps(const Job *FinishedCmd, int ReturnCode) { - const CommandOutput &Output = FinishedCmd->getOutput(); - StringRef DependenciesFile = - Output.getAdditionalOutputForType(file_types::TY_SwiftDeps); - - if (DependenciesFile.empty()) { - // If this job doesn't track dependencies, it must always be run. - // Note: In theory CheckDependencies makes sense as well (for a leaf - // node in the dependency graph), and maybe even NewlyAdded (for very - // coarse dependencies that always affect downstream nodes), but we're - // not using either of those right now, and this logic should probably - // be revisited when we are. - assert(isa(FinishedCmd->getSource()) || - FinishedCmd->getCondition() == Job::Condition::Always); - return {}; - } - const bool compileExitedNormally = - ReturnCode == EXIT_SUCCESS || ReturnCode == EXIT_FAILURE; - return !compileExitedNormally - ? reloadAndRemarkDepsOnAbnormalExit(FinishedCmd) - : reloadAndRemarkDepsOnNormalExit(FinishedCmd, /*cmdFailed=*/ - ReturnCode != EXIT_SUCCESS, - DependenciesFile); - } - - // If we have a dependency file /and/ the frontend task exited normally, - // we can be discerning about what downstream files to rebuild. - std::vector - reloadAndRemarkDepsOnNormalExit(const Job *FinishedCmd, - const bool cmdFailed, - StringRef DependenciesFile) { - const auto changedNodes = getFineGrainedDepGraph().loadFromPath( - FinishedCmd, DependenciesFile, Comp.getDiags()); - const bool loadFailed = !changedNodes; - if (loadFailed) { - handleDependenciesReloadFailure(cmdFailed, DependenciesFile); - return {}; - } - return getFineGrainedDepGraph() - .findJobsToRecompileWhenNodesChange(changedNodes.value()); - } - - void handleDependenciesReloadFailure(const bool cmdFailed, - const StringRef DependenciesFile) { - if (cmdFailed) { - // let the next build handle it. - return; - } - dependencyLoadFailed(DependenciesFile); - // Better try compiling whatever was waiting on more info. - for (const Job *Cmd : DeferredCommands) - scheduleCommandIfNecessaryAndPossible(Cmd); - DeferredCommands.clear(); - }; - - std::vector - reloadAndRemarkDepsOnAbnormalExit(const Job *FinishedCmd) { - // If there's an abnormal exit (a crash), assume the worst. - switch (FinishedCmd->getCondition()) { - case Job::Condition::NewlyAdded: - // The job won't be treated as newly added next time. Conservatively - // mark it as affecting other jobs, because some of them may have - // completed already. - return findJobsToRecompileWhenWholeJobChanges(FinishedCmd); - case Job::Condition::Always: - // Any incremental task that shows up here has already been marked; - // we didn't need to wait for it to finish to start downstream - // tasks. - break; - case Job::Condition::RunWithoutCascading: - // If this file changed, it might have been a non-cascading change - // and it might not. Unfortunately, the interface hash has been - // updated or compromised, so we don't actually know anymore; we - // have to conservatively assume the changes could affect other - // files. - return findJobsToRecompileWhenWholeJobChanges(FinishedCmd); - - case Job::Condition::CheckDependencies: - // If the only reason we're running this is because something else - // changed, then we can trust the dependency graph as to whether - // it's a cascading or non-cascading change. That is, if whatever - // /caused/ the error isn't supposed to affect other files, and - // whatever /fixes/ the error isn't supposed to affect other files, - // then there's no need to recompile any other inputs. If either of - // those are false, we /do/ need to recompile other inputs. - break; - } - return {}; - } - /// Check to see if a job produced a zero-length serialized diagnostics /// file, which is used to indicate batch-constituents that were batched /// together with a failing constituent but did not, themselves, produce any @@ -675,30 +494,12 @@ namespace driver { static_cast(FinishedCmd)); } - CommandSet DependentsInEffect = - subsequentJobsNeeded(FinishedCmd, ReturnCode); - if (ReturnCode != EXIT_SUCCESS) return taskFailed(FinishedCmd, ReturnCode); // When a task finishes, we need to reevaluate the other commands that // might have been blocked. markFinished(FinishedCmd); - - noteBuildingJobs(DependentsInEffect, - "because of dependencies discovered later"); - - scheduleCommandsInSortedOrder(DependentsInEffect); - for (const Job *Cmd : DependentsInEffect) { - if (DeferredCommands.erase(Cmd)) { -#ifndef NDEBUG - if (isa(FinishedCmd->getSource())) - Cmd->setWave(FinishedCmd->getWave() + 1); -#else - continue; -#endif - } - } return TaskFinishedResponse::ContinueExecution; } @@ -776,23 +577,6 @@ namespace driver { } } - /// In order to handle both old dependencies that have disappeared and new - /// dependencies that have arisen, we need to reload the dependency file. - /// Do this whether or not the build succeeded. - /// - /// FIXME: too much global state floating around, e.g. - /// getIncrementalBuildEnabled - CommandSet subsequentJobsNeeded(const Job *FinishedCmd, - const int ReturnCode) { - if (!Comp.getIncrementalBuildEnabled()) - return {}; - auto Dependents = reloadAndRemarkDeps(FinishedCmd, ReturnCode); - CommandSet DepSet; - for (const Job *Cmd : Dependents) - DepSet.insert(Cmd); - return DepSet; - } - TaskFinishedResponse taskSignalled(ProcessId Pid, StringRef ErrorMsg, StringRef Output, StringRef Errors, void *Context, @@ -850,11 +634,6 @@ namespace driver { public: PerformJobsState(Compilation &Comp, std::unique_ptr &&TaskQueue) : Comp(Comp), - FineGrainedDepGraph( - Comp.getVerifyFineGrainedDependencyGraphAfterEveryImport(), - Comp.getEmitFineGrainedDependencyDotFileAfterEveryImport(), - Comp.getTraceDependencies(), - Comp.getStatsReporter()), TQ(std::move(TaskQueue)) {} /// Schedule and run initial, additional, and batch jobs. @@ -862,15 +641,11 @@ namespace driver { scheduleJobsBeforeBatching(); formBatchJobsAndAddPendingJobsToTaskQueue(); runTaskQueueToCompletion(); - checkUnfinishedJobs(); } private: void scheduleJobsBeforeBatching() { - if (Comp.getIncrementalBuildEnabled()) - scheduleFirstRoundJobsForIncrementalCompilation(); - else - scheduleJobsForNonIncrementalCompilation(); + scheduleJobsForNonIncrementalCompilation(); } void scheduleJobsForNonIncrementalCompilation() { @@ -878,226 +653,6 @@ namespace driver { scheduleCommandIfNecessaryAndPossible(Cmd); } - void scheduleFirstRoundJobsForIncrementalCompilation() { - - CommandSet compileJobsToSchedule = - computeFirstRoundCompileJobsForIncrementalCompilation(); - - for (const Job *Cmd : Comp.getJobs()) { - if (!isa(Cmd->getSource()) || - compileJobsToSchedule.count(Cmd)) { - scheduleCommandIfNecessaryAndPossible(Cmd); - noteBuilding(Cmd, /*willBeBuilding*/ true, ""); - } else { - DeferredCommands.insert(Cmd); - noteBuilding(Cmd, /*willBeBuilding*/ false, ""); - } - } - } - - /// Figure out the best strategy and return those jobs. May return - /// duplicates. - CommandSet computeFirstRoundCompileJobsForIncrementalCompilation() { - auto getEveryCompileJob = [&] { - CommandSet everyIncrementalJob; - for (const Job *Cmd : Comp.getJobs()) { - if (isa(Cmd->getSource())) - everyIncrementalJob.insert(Cmd); - } - return everyIncrementalJob; - }; - - bool sawModuleWrapJob = false; - const Job *mergeModulesJob = nullptr; - CommandSet jobsToSchedule; - CommandSet initialCascadingCommands; - for (const Job *cmd : Comp.getJobs()) { - // A modulewrap job consumes the output of merge-modules. If it is - // in the queue, we must run merge-modules or empty temporary files - // will be consumed by the job instead. - // FIXME: We should be able to ditch this if we compare the timestamps - // of the temporary file to the build record, if it exists. - sawModuleWrapJob |= isa(cmd->getSource()); - - // Skip jobs that have no associated incremental info. - if (!isa(cmd->getSource())) { - continue; - } - - if (isa(cmd->getSource())) { - assert(!mergeModulesJob && "multiple scheduled merge-modules jobs?"); - mergeModulesJob = cmd; - } - - const llvm::Optional> shouldSchedAndIsCascading = - computeShouldInitiallyScheduleJobAndDependents(cmd); - if (!shouldSchedAndIsCascading) - return getEveryCompileJob(); // Load error, just run them all - const bool &shouldSchedule = shouldSchedAndIsCascading->first; - const bool &isCascading = shouldSchedAndIsCascading->second; - if (shouldSchedule) - jobsToSchedule.insert(cmd); - if (isCascading) - initialCascadingCommands.insert(cmd); - } - for (const auto *cmd : collectCascadedJobsFromDependencyGraph( - initialCascadingCommands)) - jobsToSchedule.insert(cmd); - for (const auto cmd : - collectExternallyDependentJobsFromDependencyGraph()) - jobsToSchedule.insert(cmd); - - // The merge-modules job is special: it *must* be scheduled if any other - // job has been scheduled because any other job can influence the - // structure of the resulting module. Additionally, the initial scheduling - // predicate above is only aware of intra-module changes. External - // dependencies changing *must* cause merge-modules to be scheduled. - if ((!jobsToSchedule.empty() || sawModuleWrapJob) && mergeModulesJob) { - jobsToSchedule.insert(mergeModulesJob); - } - return jobsToSchedule; - } - - /// Return whether \p Cmd should be scheduled when using dependencies, and if - /// the job is cascading. Or if there was a dependency-read error, return - /// \c None to indicate don't-know. - llvm::Optional> - computeShouldInitiallyScheduleJobAndDependents(const Job *Cmd) { - auto CondAndHasDepsIfNoError = - loadDependenciesAndComputeCondition(Cmd); - if (!CondAndHasDepsIfNoError) - return llvm::None; // swiftdeps read error, abandon dependencies - - Job::Condition Cond; - bool HasDependenciesFileName; - std::tie(Cond, HasDependenciesFileName) = - CondAndHasDepsIfNoError.value(); - - const bool shouldSched = shouldScheduleCompileJobAccordingToCondition( - Cmd, Cond, HasDependenciesFileName); - - const bool isCascading = isCascadingJobAccordingToCondition( - Cmd, Cond, HasDependenciesFileName); - return std::make_pair(shouldSched, isCascading); - } - - /// Returns job condition, and whether a dependency file was specified. - /// But returns None if there was a dependency read error. - llvm::Optional> - loadDependenciesAndComputeCondition(const Job *const Cmd) { - // merge-modules Jobs do not have .swiftdeps files associated with them, - // however, their compilation condition is computed as a function of their - // inputs, so their condition can be used as normal. - if (isa(Cmd->getSource())) { - return std::make_pair(Cmd->getCondition(), true); - } - - // Try to load the dependencies file for this job. If there isn't one, we - // always have to run the job, but it doesn't affect any other jobs. If - // there should be one but it's not present or can't be loaded, we have to - // run all the jobs. - // FIXME: We can probably do better here! - - const StringRef DependenciesFile = - Cmd->getOutput().getAdditionalOutputForType(file_types::TY_SwiftDeps); - if (DependenciesFile.empty()) - return std::make_pair(Job::Condition::Always, false); - if (Cmd->getCondition() == Job::Condition::NewlyAdded) { - registerJobToDepGraph(Cmd); - return std::make_pair(Job::Condition::NewlyAdded, true); - } - const bool depGraphLoadError = - loadDepGraphFromPath(Cmd, DependenciesFile); - if (depGraphLoadError) { - dependencyLoadFailed(DependenciesFile, /*Warn=*/true); - return llvm::None; - } - return std::make_pair(Cmd->getCondition(), true); - } - - bool shouldScheduleCompileJobAccordingToCondition( - const Job *const Cmd, const Job::Condition Condition, - const bool hasDependenciesFileName) { - - switch (Condition) { - case Job::Condition::Always: - case Job::Condition::NewlyAdded: - if (Comp.getIncrementalBuildEnabled() && hasDependenciesFileName) { - // No need to do anything since after this jos is run and its - // dependencies reloaded, they will show up as changed nodes - } - LLVM_FALLTHROUGH; - case Job::Condition::RunWithoutCascading: - noteBuilding(Cmd, /*willBeBuilding=*/true, - "(initial)"); - return true; - case Job::Condition::CheckDependencies: - noteBuilding(Cmd, /*willBeBuilding=*/false, - "file is up-to-date and output exists"); - return false; - } - llvm_unreachable("invalid job condition"); - } - - bool isCascadingJobAccordingToCondition( - const Job *const Cmd, const Job::Condition Condition, - const bool hasDependenciesFileName) const { - switch (Condition) { - case Job::Condition::Always: - case Job::Condition::NewlyAdded: - return Comp.getIncrementalBuildEnabled() && hasDependenciesFileName; - case Job::Condition::RunWithoutCascading: - case Job::Condition::CheckDependencies: - return false; - } - llvm_unreachable("invalid job condition"); - } - - void forEachOutOfDateExternalDependency( - function_ref consumeExternalSwiftDeps) { - for (StringRef dependency : getExternalDependencies()) { - // If the dependency has been modified since the oldest built file, - // or if we can't stat it for some reason (perhaps it's been - // deleted?), trigger rebuilds through the dependency graph. - llvm::sys::fs::file_status depStatus; - if (llvm::sys::fs::status(dependency, depStatus) || - Comp.getLastBuildTime() < depStatus.getLastModificationTime()) - consumeExternalSwiftDeps(dependency); - } - } - - CommandSet collectCascadedJobsFromDependencyGraph( - const CommandSet &InitialCascadingCommands) { - CommandSet CascadedJobs; - // We scheduled all of the files that have actually changed. Now add the - // files that haven't changed, so that they'll get built in parallel if - // possible and after the first set of files if it's not. - for (auto *Cmd : InitialCascadingCommands) { - for (const auto *transitiveCmd : findJobsToRecompileWhenWholeJobChanges( - Cmd)) - CascadedJobs.insert(transitiveCmd); - } - noteBuildingJobs(CascadedJobs, "because of the initial set"); - return CascadedJobs; - } - - /// Return jobs dependent on other modules, and jobs dependent on those jobs - SmallVector - collectExternallyDependentJobsFromDependencyGraph() { - SmallVector ExternallyDependentJobs; - // Check all cross-module dependencies as well. - forEachOutOfDateExternalDependency([&](StringRef dependency) { - // If the dependency has been modified since the oldest built file, - // or if we can't stat it for some reason (perhaps it's been - // deleted?), trigger rebuilds through the dependency graph. - for (const Job * marked: markExternalInDepGraph(dependency)) - ExternallyDependentJobs.push_back(marked); - }); - noteBuildingJobs(ExternallyDependentJobs, - "because of external dependencies"); - return ExternallyDependentJobs; - } - /// Insert all jobs in \p Cmds (of descriptive name \p Kind) to the \c /// TaskQueue, and clear \p Cmds. template @@ -1407,22 +962,6 @@ namespace driver { continue; } - // If we got here, all the queued and pending work we know about is - // done; mark anything still in deferred state as skipped. - for (const Job *Cmd : DeferredCommands) { - if (Comp.getOutputLevel() == OutputLevel::Parseable) { - // Provide output indicating this command was skipped if parseable - // output was requested. - auto TaskDesc = constructDetailedTaskDescription(*Cmd); - parseable_output::emitSkippedMessage(llvm::errs(), - Cmd->getSource().getClassName(), - TaskDesc); - } - ScheduledCommands.insert(Cmd); - markFinished(Cmd, /*Skipped=*/true); - } - DeferredCommands.clear(); - // It's possible that by marking some jobs as skipped, we unblocked // some jobs and thus have entries in PendingExecution again; push // those through to the TaskQueue. @@ -1433,165 +972,18 @@ namespace driver { } while (ResultCode == 0 && TQ->hasRemainingTasks()); } - void checkUnfinishedJobs() { - if (ResultCode == 0) { - assert(BlockingCommands.empty() && - "some blocking commands never finished properly"); - } else { - // Make sure we record any files that still need to be rebuilt. - for (const Job *Cmd : Comp.getJobs()) { - // Skip files that don't use dependency analysis. - bool shouldHaveOutput = false; - file_types::forEachIncrementalOutputType( - [&](const file_types::ID type) { - shouldHaveOutput |= - !Cmd->getOutput().getAdditionalOutputForType(type).empty(); - }); - if (!shouldHaveOutput) - continue; - - // Don't worry about commands that finished or weren't going to run. - if (FinishedCommands.count(Cmd)) - continue; - if (!ScheduledCommands.count(Cmd)) - continue; - - const bool needsCascadingBuild = - computeNeedsCascadingBuildForUnfinishedCommand(Cmd); - UnfinishedCommands.insert({Cmd, needsCascadingBuild}); - } - } - } - - /// When the driver next runs, it will read the build record, and the - /// unfinished job status will be set to either \c NeedsCascading... or - /// \c NeedsNonCascading... - /// Decide which it will be. - /// As far as I can tell, the only difference the result of this function - /// makes is how soon - /// required dependents are recompiled. Here's my reasoning: - /// - /// When the driver next runs, the condition will be filtered through - /// \c loadDependenciesAndComputeCondition . - /// Then, the cascading predicate is returned from - /// \c isCompileJobInitiallyNeededForDependencyBasedIncrementalCompilation. - /// Then, in \c computeShouldInitiallyScheduleJobAndDependents - /// if the job needs a cascading build, it's dependents will be scheduled - /// immediately. After the job finishes, it's dependencies will be processed - /// again. If a non-cascading job failed, the driver will schedule all of - /// its dependents. (All of its dependents are assumed to have already been - /// scheduled.) If the job succeeds, the revised dependencies are consulted - /// to schedule any needed jobs. - - bool computeNeedsCascadingBuildForUnfinishedCommand(const Job *Cmd) { - if (!Comp.getIncrementalBuildEnabled()) - return true; - // See the comment on the whole function above - return false; - } - public: - void populateInputInfoMap(InputInfoMap &inputs) const { - for (auto &entry : UnfinishedCommands) { - for (auto *action : entry.first->getSource().getInputs()) { - auto inputFile = dyn_cast(action); - if (!inputFile) - continue; - - CompileJobAction::InputInfo info; - info.previousModTime = entry.first->getInputModTime(); - info.status = entry.second ? - CompileJobAction::InputInfo::Status::NeedsCascadingBuild : - CompileJobAction::InputInfo::Status::NeedsNonCascadingBuild; - inputs[&inputFile->getInputArg()] = info; - } - } - - for (const Job *entry : FinishedCommands) { - const auto *compileAction = dyn_cast(&entry->getSource()); - if (!compileAction) - continue; - - for (auto *action : compileAction->getInputs()) { - auto inputFile = dyn_cast(action); - if (!inputFile) - continue; - - CompileJobAction::InputInfo info; - info.previousModTime = entry->getInputModTime(); - info.status = CompileJobAction::InputInfo::Status::UpToDate; - inputs[&inputFile->getInputArg()] = info; - } - } - - // Sort the entries by input order. - static_assert(IsTriviallyCopyable::value, - "llvm::array_pod_sort relies on trivially-copyable data"); - using InputInfoEntry = std::decay::type; - llvm::array_pod_sort(inputs.begin(), inputs.end(), - [](const InputInfoEntry *lhs, - const InputInfoEntry *rhs) -> int { - auto lhsIndex = lhs->first->getIndex(); - auto rhsIndex = rhs->first->getIndex(); - return (lhsIndex < rhsIndex) ? -1 : (lhsIndex > rhsIndex) ? 1 : 0; - }); - } - Compilation::Result takeResult() && { if (ResultCode == 0) ResultCode = Comp.getDiags().hadAnyError(); const bool hadAbnormalExit = hadAnyAbnormalExit(); const auto resultCode = ResultCode; - auto &&graph = std::move(*this).takeFineGrainedDepGraph(); - return Compilation::Result{hadAbnormalExit, resultCode, std::move(graph)}; + return Compilation::Result{hadAbnormalExit, resultCode}; } bool hadAnyAbnormalExit() { return AnyAbnormalExit; } - - // MARK: dependency graph interface - - std::vector getExternalDependencies() const { - return getFineGrainedDepGraph().getExternalDependencies(); - } - - std::vector - markExternalInDepGraph(StringRef externalDependency) { - return getFineGrainedDepGraph() - .findExternallyDependentUntracedJobs(externalDependency); - } - - std::vector findJobsToRecompileWhenWholeJobChanges(const Job *Cmd) { - return getFineGrainedDepGraph() - .findJobsToRecompileWhenWholeJobChanges(Cmd); - } - - void registerJobToDepGraph(const Job *Cmd) { - getFineGrainedDepGraph().registerJob(Cmd); - } - - /// Return hadError - bool loadDepGraphFromPath(const Job *Cmd, const StringRef DependenciesFile) { - const auto changes = getFineGrainedDepGraph().loadFromPath( - Cmd, DependenciesFile, Comp.getDiags()); - const bool didDependencyLoadSucceed = changes.has_value(); - return !didDependencyLoadSucceed; - } - - fine_grained_dependencies::ModuleDepGraph & - getFineGrainedDepGraph() { - return FineGrainedDepGraph; - } - const fine_grained_dependencies::ModuleDepGraph & - getFineGrainedDepGraph() const { - return FineGrainedDepGraph; - } - - fine_grained_dependencies::ModuleDepGraph && - takeFineGrainedDepGraph() && { - return std::move(FineGrainedDepGraph); - } }; } // namespace driver } // namespace swift @@ -1610,83 +1002,6 @@ Job *Compilation::addExternalJob(std::unique_ptr J) { return result; } -static void checkForOutOfDateInputs(DiagnosticEngine &diags, - const InputInfoMap &inputs) { - for (const auto &inputPair : inputs) { - auto recordedModTime = inputPair.second.previousModTime; - if (recordedModTime == llvm::sys::TimePoint<>::max()) - continue; - - const char *input = inputPair.first->getValue(); - - llvm::sys::fs::file_status inputStatus; - if (auto statError = llvm::sys::fs::status(input, inputStatus)) { - diags.diagnose(SourceLoc(), diag::warn_cannot_stat_input, - llvm::sys::path::filename(input), statError.message()); - continue; - } - - if (recordedModTime != inputStatus.getLastModificationTime()) { - diags.diagnose(SourceLoc(), diag::error_input_changed_during_build, - llvm::sys::path::filename(input)); - } - } -} - -static void writeCompilationRecord(StringRef path, StringRef argsHash, - llvm::sys::TimePoint<> buildTime, - const InputInfoMap &inputs) { - // Before writing to the dependencies file path, preserve any previous file - // that may have been there. No error handling -- this is just a nicety, it - // doesn't matter if it fails. - llvm::sys::fs::rename(path, path + "~"); - - std::error_code error; - llvm::raw_fd_ostream out(path, error, llvm::sys::fs::OF_None); - if (out.has_error()) { - // FIXME: How should we report this error? - out.clear_error(); - return; - } - - auto writeTimeValue = [](llvm::raw_ostream &out, - llvm::sys::TimePoint<> time) { - using namespace std::chrono; - auto secs = time_point_cast(time); - time -= secs.time_since_epoch(); // remainder in nanoseconds - out << "[" << secs.time_since_epoch().count() - << ", " << time.time_since_epoch().count() << "]"; - }; - - using compilation_record::TopLevelKey; - // NB: We calculate effective version from getCurrentLanguageVersion() - // here because any -swift-version argument is handled in the - // argsHash that follows. - out << compilation_record::getName(TopLevelKey::Version) << ": \"" - << llvm::yaml::escape(version::getSwiftFullVersion( - swift::version::Version::getCurrentLanguageVersion())) - << "\"\n"; - out << compilation_record::getName(TopLevelKey::Options) << ": \"" - << llvm::yaml::escape(argsHash) << "\"\n"; - out << compilation_record::getName(TopLevelKey::BuildTime) << ": "; - writeTimeValue(out, buildTime); - out << "\n"; - out << compilation_record::getName(TopLevelKey::Inputs) << ":\n"; - - for (auto &entry : inputs) { - out << " \"" << llvm::yaml::escape(entry.first->getValue()) << "\": "; - - using compilation_record::getIdentifierForInputInfoStatus; - auto Name = getIdentifierForInputInfoStatus(entry.second.status); - if (!Name.empty()) { - out << Name << " "; - } - - writeTimeValue(out, entry.second.previousModTime); - out << "\n"; - } -} - static void writeInputJobsToFilelist(llvm::raw_fd_ostream &out, const Job *job, const file_types::ID infoType) { // FIXME: Duplicated from ToolChains.cpp. @@ -1783,17 +1098,7 @@ static bool writeFilelistIfNecessary(const Job *job, const ArgList &args, Compilation::Result Compilation::performJobsImpl(std::unique_ptr &&TQ) { PerformJobsState State(*this, std::move(TQ)); - State.runJobs(); - - if (!CompilationRecordPath.empty()) { - InputInfoMap InputInfo; - State.populateInputInfoMap(InputInfo); - checkForOutOfDateInputs(Diags, InputInfo); - - writeCompilationRecord(CompilationRecordPath, ArgsHash, BuildStartTime, - InputInfo); - } return std::move(State).takeResult(); } @@ -1880,7 +1185,6 @@ Compilation::Result Compilation::performJobs(std::unique_ptr &&TQ) { if (Level < OutputLevel::Parseable && !ShowDriverTimeCompilation && (SaveTemps || TempFilePaths.empty()) && - CompilationRecordPath.empty() && Jobs.size() == 1) { return performSingleCommand(Jobs.front().get()); } @@ -1923,13 +1227,6 @@ const char *Compilation::getAllSourcesPath() const { return AllSourceFilesPath; } -void Compilation::disableIncrementalBuild(Twine why) { - if (getShowIncrementalBuildDecisions()) - llvm::outs() << "Disabling incremental build: " << why << "\n"; - - EnableIncrementalBuild = false; -} - unsigned Compilation::countSwiftInputs() const { unsigned inputCount = 0; for (const auto &p : InputFilesWithTypes) diff --git a/lib/Driver/CompilationRecord.h b/lib/Driver/CompilationRecord.h deleted file mode 100644 index 364151340ac5a..0000000000000 --- a/lib/Driver/CompilationRecord.h +++ /dev/null @@ -1,91 +0,0 @@ -//===--- CompilationRecord.h ------------------------------------*- C++ -*-===// -// -// This source file is part of the Swift.org open source project -// -// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -// -//===----------------------------------------------------------------------===// - -#ifndef SWIFT_DRIVER_COMPILATIONRECORD_H -#define SWIFT_DRIVER_COMPILATIONRECORD_H - -#include "swift/Driver/Action.h" - -namespace swift { -namespace driver { -namespace compilation_record { - -/// Compilation record files (-master.swiftdeps files) are YAML files composed -/// of these top-level keys. -enum class TopLevelKey { - /// The key for the Swift compiler version used to produce the compilation - /// record. - Version, - /// The key for the list of arguments passed to the Swift compiler when - /// producing the compilation record. - Options, - /// The key for the time at which the build that produced the compilation - /// record started. - BuildTime, - /// The key for the list of inputs to the compilation that produced the - /// compilation record. - Inputs, -}; - -/// \returns A string representation of the given key. -inline static StringRef getName(TopLevelKey Key) { - switch (Key) { - case TopLevelKey::Version: return "version"; - case TopLevelKey::Options: return "options"; - case TopLevelKey::BuildTime: return "build_time"; - case TopLevelKey::Inputs: return "inputs"; - } - - // Work around MSVC warning: not all control paths return a value - llvm_unreachable("All switch cases are covered"); -} - -/// \returns The string identifier used to represent the given status in a -/// compilation record file (.swiftdeps file). -/// -/// \note Not every InputInfo::Status has a unique identifier. For example, -/// both NewlyAdded and NeedsCascadingBuild are represented as "!dirty". -/// Therefore, this will not cleanly round-trip between InputInfo::Status and -/// string identifiers. -inline static StringRef -getIdentifierForInputInfoStatus(CompileJobAction::InputInfo::Status Status) { - switch (Status) { - case CompileJobAction::InputInfo::Status::UpToDate: - return ""; - case CompileJobAction::InputInfo::Status::NewlyAdded: - case CompileJobAction::InputInfo::Status::NeedsCascadingBuild: - return "!dirty"; - case CompileJobAction::InputInfo::Status::NeedsNonCascadingBuild: - return "!private"; - } - - // Work around MSVC warning: not all control paths return a value - llvm_unreachable("All switch cases are covered"); -} - -/// \returns The status corresponding to the string identifier used in a -/// compilation record file (.swiftdeps file). -inline static llvm::Optional -getInfoStatusForIdentifier(StringRef Identifier) { - using InputStatus = CompileJobAction::InputInfo::Status; - return llvm::StringSwitch>(Identifier) - .Case("", InputStatus::UpToDate) - .Case("!dirty", InputStatus::NeedsCascadingBuild) - .Case("!private", InputStatus::NeedsNonCascadingBuild) - .Default(llvm::None); -} - -} // end namespace compilation_record -} // end namespace driver -} // end namespace swift - -#endif diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index 869a6b0f57674..fd418a2b7ddd9 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -57,8 +57,6 @@ #include "llvm/Support/PrettyStackTrace.h" #include "llvm/Support/raw_ostream.h" -#include "CompilationRecord.h" - #include using namespace swift; @@ -136,6 +134,14 @@ ArrayRef Driver::getArgsWithoutProgramNameAndDriverMode( return Args; } +static void validateLegacyUnsupportedArgs(DiagnosticEngine &diags, + const ArgList &args) { + if (args.hasArg(options::OPT_incremental)) { + diags.diagnose({}, diag::warning_unsupported_driver_option, "-incremental"); + } + return; +} + static void validateBridgingHeaderArgs(DiagnosticEngine &diags, const ArgList &args) { if (!args.hasArgNoClaim(options::OPT_import_objc_header)) @@ -246,24 +252,6 @@ static void validateDebugInfoArgs(DiagnosticEngine &diags, } } -static void validateVerifyIncrementalDependencyArgs(DiagnosticEngine &diags, - const ArgList &args) { - // No option? No problem! - if (!args.hasArg(options::OPT_verify_incremental_dependencies)) { - return; - } - - // Make sure we see -incremental but not -wmo, no matter in what order they're - // in - the build systems can pass them both and just hope the last one wins. - if (args.hasArg(options::OPT_incremental) && - !args.hasArg(options::OPT_whole_module_optimization)) { - return; - } - - diags.diagnose(SourceLoc(), - diag::verify_incremental_dependencies_needs_incremental); -} - static void validateCompilationConditionArgs(DiagnosticEngine &diags, const ArgList &args) { for (const Arg *A : args.filtered(options::OPT_D)) { @@ -318,6 +306,7 @@ static void validateLinkArgs(DiagnosticEngine &diags, const ArgList &args) { /// Perform miscellaneous early validation of arguments. static void validateArgs(DiagnosticEngine &diags, const ArgList &args, const llvm::Triple &T) { + validateLegacyUnsupportedArgs(diags, args); validateBridgingHeaderArgs(diags, args); validateWarningControlArgs(diags, args); validateProfilingArgs(diags, args); @@ -325,7 +314,6 @@ static void validateArgs(DiagnosticEngine &diags, const ArgList &args, validateDebugInfoArgs(diags, args); validateCompilationConditionArgs(diags, args); validateSearchPathArgs(diags, args); - validateVerifyIncrementalDependencyArgs(diags, args); validateLinkArgs(diags, args); } @@ -416,325 +404,6 @@ std::unique_ptr Driver::buildTaskQueue(const Compilation &C) { } } -static void computeArgsHash(SmallString<32> &out, const DerivedArgList &args) { - SmallVector interestingArgs; - interestingArgs.reserve(args.size()); - std::copy_if(args.begin(), args.end(), std::back_inserter(interestingArgs), - [](const Arg *arg) { - return !arg->getOption().hasFlag(options::DoesNotAffectIncrementalBuild) && - arg->getOption().getKind() != Option::InputClass; - }); - - llvm::array_pod_sort(interestingArgs.begin(), interestingArgs.end(), - [](const Arg * const *lhs, const Arg * const *rhs)->int { - auto cmpID = (*lhs)->getOption().getID() - (*rhs)->getOption().getID(); - if (cmpID != 0) - return cmpID; - return (*lhs)->getIndex() - (*rhs)->getIndex(); - }); - - llvm::MD5 hash; - for (const Arg *arg : interestingArgs) { - hash.update(arg->getOption().getID()); - for (const char *value : const_cast(arg)->getValues()) - hash.update(value); - } - - llvm::MD5::MD5Result hashBuf; - hash.final(hashBuf); - llvm::MD5::stringifyResult(hashBuf, out); -} - -class Driver::InputInfoMap - : public llvm::SmallDenseMap { -}; -using InputInfoMap = Driver::InputInfoMap; - -/// Get the filename for build record. Returns true if failed. -static bool getCompilationRecordPath(std::string &buildRecordPath, - const OutputInfo &OI, - const llvm::Optional &OFM, - DiagnosticEngine *Diags) { - if (!OFM) { - // FIXME: This should work without an output file map. We should have - // another way to specify a build record and where to put intermediates. - if (Diags) - Diags->diagnose(SourceLoc(), diag::incremental_requires_output_file_map); - return true; - } - - if (auto *masterOutputMap = OFM->getOutputMapForSingleOutput()) - buildRecordPath = masterOutputMap->lookup(file_types::TY_SwiftDeps); - - if (buildRecordPath.empty()) { - if (Diags) - Diags->diagnose(SourceLoc(), - diag::incremental_requires_build_record_entry, - file_types::getTypeName(file_types::TY_SwiftDeps)); - return true; - } - - return false; -} - -static std::string failedToReadOutOfDateMap(bool ShowIncrementalBuildDecisions, - StringRef buildRecordPath, - StringRef reason = "") { - std::string why = "malformed build record file"; - if (!reason.empty()) { - why += " "; - why += reason; - } - if (ShowIncrementalBuildDecisions) { - llvm::outs() << "Incremental compilation has been disabled due to " << why - << " '" << buildRecordPath << "'.\n"; - } - return why; -} - -static SmallVector findRemovedInputs( - const InputFileList &inputs, - const llvm::StringMap &previousInputs); - -static void dealWithRemovedInputs(ArrayRef removedInputs, - bool ShowIncrementalBuildDecisions); - -/// Returns why ignore incrementality -static std::string -populateOutOfDateMap(InputInfoMap &map, llvm::sys::TimePoint<> &LastBuildTime, - StringRef argsHashStr, const InputFileList &inputs, - StringRef buildRecordPath, - const bool ShowIncrementalBuildDecisions) { - // Treat a missing file as "no previous build". - auto buffer = llvm::MemoryBuffer::getFile(buildRecordPath); - if (!buffer) { - if (ShowIncrementalBuildDecisions) - llvm::outs() << "Incremental compilation could not read build record.\n"; - return "could not read build record"; - } - - namespace yaml = llvm::yaml; - using InputInfo = CompileJobAction::InputInfo; - - llvm::SourceMgr SM; - yaml::Stream stream(buffer.get()->getMemBufferRef(), SM); - - auto I = stream.begin(); - if (I == stream.end() || !I->getRoot()) - return failedToReadOutOfDateMap(ShowIncrementalBuildDecisions, - buildRecordPath); - - auto *topLevelMap = dyn_cast(I->getRoot()); - if (!topLevelMap) - return failedToReadOutOfDateMap(ShowIncrementalBuildDecisions, - buildRecordPath); - SmallString<64> scratch; - - llvm::StringMap previousInputs; - bool versionValid = false; - bool optionsMatch = true; - - auto readTimeValue = [&scratch](yaml::Node *node, - llvm::sys::TimePoint<> &timeValue) -> bool { - auto *seq = dyn_cast(node); - if (!seq) - return true; - - auto seqI = seq->begin(), seqE = seq->end(); - if (seqI == seqE) - return true; - - auto *secondsRaw = dyn_cast(&*seqI); - if (!secondsRaw) - return true; - std::time_t parsedSeconds; - if (secondsRaw->getValue(scratch).getAsInteger(10, parsedSeconds)) - return true; - - ++seqI; - if (seqI == seqE) - return true; - - auto *nanosecondsRaw = dyn_cast(&*seqI); - if (!nanosecondsRaw) - return true; - std::chrono::system_clock::rep parsedNanoseconds; - if (nanosecondsRaw->getValue(scratch).getAsInteger(10, parsedNanoseconds)) - return true; - - ++seqI; - if (seqI != seqE) - return true; - - timeValue = llvm::sys::TimePoint<>(std::chrono::seconds(parsedSeconds)); - timeValue += std::chrono::nanoseconds(parsedNanoseconds); - return false; - }; - - // FIXME: LLVM's YAML support does incremental parsing in such a way that - // for-range loops break. - SmallString<64> CompilationRecordSwiftVersion; - for (auto i = topLevelMap->begin(), e = topLevelMap->end(); i != e; ++i) { - auto *key = cast(i->getKey()); - StringRef keyStr = key->getValue(scratch); - - using compilation_record::TopLevelKey; - if (keyStr == compilation_record::getName(TopLevelKey::Version)) { - auto *value = dyn_cast(i->getValue()); - if (!value) { - auto reason = ("Malformed value for key '" + keyStr + "'.") - .toStringRef(scratch); - return failedToReadOutOfDateMap(ShowIncrementalBuildDecisions, - buildRecordPath, reason); - } - - // NB: We check against - // swift::version::Version::getCurrentLanguageVersion() here because any - // -swift-version argument is handled in the argsHashStr check that - // follows. - CompilationRecordSwiftVersion = value->getValue(scratch); - versionValid = (CompilationRecordSwiftVersion - == version::getSwiftFullVersion( - version::Version::getCurrentLanguageVersion())); - - } else if (keyStr == compilation_record::getName(TopLevelKey::Options)) { - auto *value = dyn_cast(i->getValue()); - if (!value) - return "no name node in build record"; - optionsMatch = (argsHashStr == value->getValue(scratch)); - - } else if (keyStr == compilation_record::getName(TopLevelKey::BuildTime)) { - auto *value = dyn_cast(i->getValue()); - if (!value) { - auto reason = ("Malformed value for key '" + keyStr + "'.") - .toStringRef(scratch); - return failedToReadOutOfDateMap(ShowIncrementalBuildDecisions, - buildRecordPath, reason); - } - llvm::sys::TimePoint<> timeVal; - if (readTimeValue(i->getValue(), timeVal)) - return "could not read time value in build record"; - LastBuildTime = timeVal; - - } else if (keyStr == compilation_record::getName(TopLevelKey::Inputs)) { - auto *inputMap = dyn_cast(i->getValue()); - if (!inputMap) { - auto reason = ("Malformed value for key '" + keyStr + "'.") - .toStringRef(scratch); - return failedToReadOutOfDateMap(ShowIncrementalBuildDecisions, - buildRecordPath, reason); - } - - // FIXME: LLVM's YAML support does incremental parsing in such a way that - // for-range loops break. - for (auto i = inputMap->begin(), e = inputMap->end(); i != e; ++i) { - auto *key = dyn_cast(i->getKey()); - if (!key) - return "no input entry in build record"; - - auto *value = dyn_cast(i->getValue()); - if (!value) - return "no sequence node for input entry in build record"; - - using compilation_record::getInfoStatusForIdentifier; - auto previousBuildState = - getInfoStatusForIdentifier(value->getRawTag()); - if (!previousBuildState) - return "no previous build state in build record"; - - llvm::sys::TimePoint<> timeValue; - if (readTimeValue(value, timeValue)) - return "could not read time value in build record"; - - auto inputName = key->getValue(scratch); - previousInputs[inputName] = { *previousBuildState, timeValue }; - } - } - } - - if (!versionValid) { - if (ShowIncrementalBuildDecisions) { - auto v = version::getSwiftFullVersion( - version::Version::getCurrentLanguageVersion()); - llvm::outs() << "Incremental compilation has been disabled, due to a " - << "compiler version mismatch.\n" - << "\tCompiling with: " << v << "\n" - << "\tPreviously compiled with: " - << CompilationRecordSwiftVersion << "\n"; - } - return "compiler version mismatch"; - } - - if (!optionsMatch) { - if (ShowIncrementalBuildDecisions) { - llvm::outs() << "Incremental compilation has been disabled, because " - << "different arguments were passed to the compiler.\n"; - } - return "different arguments passed to compiler"; - } - - unsigned numMatchingPreviouslyCompiledInputs = 0; - for (auto &inputPair : inputs) { - auto iter = previousInputs.find(inputPair.second->getValue()); - if (iter == previousInputs.end()) - map[inputPair.second] = CompileJobAction::InputInfo::makeNewlyAdded(); - else { - map[inputPair.second] = iter->getValue(); - ++numMatchingPreviouslyCompiledInputs; - } - } - assert(numMatchingPreviouslyCompiledInputs <= previousInputs.size()); - auto const wereAnyInputsRemoved = - numMatchingPreviouslyCompiledInputs < previousInputs.size(); - if (!wereAnyInputsRemoved) - return ""; - - const auto removedInputs = findRemovedInputs(inputs, previousInputs); - assert(!removedInputs.empty()); - - dealWithRemovedInputs(removedInputs, ShowIncrementalBuildDecisions); - return "an input was removed"; // recompile everything; could do better - // someday -} - -static SmallVector findRemovedInputs( - const InputFileList &inputs, - const llvm::StringMap &previousInputs) { - llvm::DenseSet inputArgs; - for (auto &inputPair : inputs) { - inputArgs.insert(inputPair.second->getValue()); - } - SmallVector missingInputs; - for (auto &previousInput : previousInputs) { - auto previousInputArg = previousInput.getKey(); - if (!inputArgs.contains(previousInputArg)) { - missingInputs.push_back(previousInputArg); - } - } - return missingInputs; -} - -static void showRemovedInputs(ArrayRef removedInputs); - -/// Return true if hadError -static void dealWithRemovedInputs(ArrayRef removedInputs, - const bool ShowIncrementalBuildDecisions) { - // If a file was removed, we've lost its dependency info. Rebuild everything. - // FIXME: Can we do better? - if (ShowIncrementalBuildDecisions) - showRemovedInputs(removedInputs); -} - -static void showRemovedInputs(ArrayRef removedInputs) { - - llvm::outs() << "Incremental compilation has been disabled, because " - << "the following inputs were used in the previous " - << "compilation, but not in the current compilation:\n"; - - for (auto &missing : removedInputs) - llvm::outs() << "\t" << missing << "\n"; -} - // warn if -embed-bitcode is set and the output type is not an object static void validateEmbedBitcode(DerivedArgList &Args, const OutputInfo &OI, DiagnosticEngine &Diags) { @@ -803,31 +472,6 @@ getDriverBatchCount(llvm::opt::InputArgList &ArgList, DiagnosticEngine &Diags) { return llvm::None; } -static bool computeIncremental(const llvm::opt::InputArgList *ArgList, - const bool ShowIncrementalBuildDecisions) { - if (!ArgList->hasArg(options::OPT_incremental)) - return false; - - const char *ReasonToDisable = - ArgList->hasFlag(options::OPT_whole_module_optimization, - options::OPT_no_whole_module_optimization, - false) - ? "is not compatible with whole module optimization." - : ArgList->hasArg(options::OPT_embed_bitcode) - ? "is not currently compatible with embedding LLVM IR bitcode." - : nullptr; - - if (!ReasonToDisable) - return true; - - if (ShowIncrementalBuildDecisions) { - llvm::outs() << "Incremental compilation has been disabled, because it " - << ReasonToDisable - << "\n"; - } - return false; -} - static std::string computeWorkingDirectory(const llvm::opt::InputArgList *ArgList) { if (auto *A = ArgList->getLastArg(options::OPT_working_directory)) { @@ -907,8 +551,6 @@ Driver::buildCompilation(const ToolChain &TC, bool AllowErrors) { llvm::PrettyStackTraceString CrashInfo("Compilation construction"); - llvm::sys::TimePoint<> StartTime = std::chrono::system_clock::now(); - // Claim --driver-mode here, since it's already been handled. (void) ArgList->hasArg(options::OPT_driver_mode); @@ -976,29 +618,6 @@ Driver::buildCompilation(const ToolChain &TC, } } - const bool ShowIncrementalBuildDecisions = - ArgList->hasArg(options::OPT_driver_show_incremental); - const bool Incremental = - computeIncremental(ArgList.get(), ShowIncrementalBuildDecisions); - - std::string buildRecordPath; - getCompilationRecordPath(buildRecordPath, - OI, OFM, Incremental ? &Diags : nullptr); - - SmallString<32> ArgsHash; - computeArgsHash(ArgsHash, *TranslatedArgList); - llvm::sys::TimePoint<> LastBuildTime = llvm::sys::TimePoint<>::min(); - InputInfoMap outOfDateMap; - std::string whyIgnoreIncrementality = - !Incremental - ? "" - : buildRecordPath.empty() - ? "no build record path" - : populateOutOfDateMap(outOfDateMap, LastBuildTime, ArgsHash, - Inputs, buildRecordPath, - ShowIncrementalBuildDecisions); - // FIXME: Distinguish errors from "file removed", which is benign. - size_t DriverFilelistThreshold; if (getFilelistThreshold(*TranslatedArgList, DriverFilelistThreshold, Diags)) return nullptr; @@ -1049,28 +668,13 @@ Driver::buildCompilation(const ToolChain &TC, ArgList->hasFlag(options::OPT_enable_only_one_dependency_file, options::OPT_disable_only_one_dependency_file, false); - const bool VerifyFineGrainedDependencyGraphAfterEveryImport = ArgList->hasArg( - options:: - OPT_driver_verify_fine_grained_dependency_graph_after_every_import); - const bool EmitFineGrainedDependencyDotFileAfterEveryImport = ArgList->hasArg( - options:: - OPT_driver_emit_fine_grained_dependency_dot_file_after_every_import); - const bool EnableCrossModuleDependencies - = ArgList->hasArg(options::OPT_enable_incremental_imports, - options::OPT_disable_incremental_imports, true); - // clang-format off C = std::make_unique( Diags, TC, OI, Level, std::move(ArgList), std::move(TranslatedArgList), std::move(Inputs), - buildRecordPath, - ArgsHash, - StartTime, - LastBuildTime, DriverFilelistThreshold, - Incremental, BatchMode, DriverBatchSeed, DriverBatchCount, @@ -1078,17 +682,13 @@ Driver::buildCompilation(const ToolChain &TC, SaveTemps, ShowDriverTimeCompilation, std::move(StatsReporter), - OnlyOneDependencyFile, - VerifyFineGrainedDependencyGraphAfterEveryImport, - EmitFineGrainedDependencyDotFileAfterEveryImport, - EnableCrossModuleDependencies); + OnlyOneDependencyFile); // clang-format on } // Construct the graph of Actions. SmallVector TopLevelActions; - buildActions(TopLevelActions, TC, OI, - whyIgnoreIncrementality.empty() ? &outOfDateMap : nullptr, *C); + buildActions(TopLevelActions, TC, OI, *C); if (Diags.hadAnyError() && !AllowErrors) return nullptr; @@ -1111,17 +711,9 @@ Driver::buildCompilation(const ToolChain &TC, if (ContinueBuildingAfterErrors) C->setContinueBuildingAfterErrors(); - if (ShowIncrementalBuildDecisions || ShowJobLifecycle) - C->setShowIncrementalBuildDecisions(); - if (ShowJobLifecycle) C->setShowJobLifecycle(); - // This has to happen after building jobs, because otherwise we won't even - // emit .swiftdeps files for the next build. - if (!whyIgnoreIncrementality.empty()) - C->disableIncrementalBuild(whyIgnoreIncrementality); - if (Diags.hadAnyError() && !AllowErrors) return nullptr; @@ -1936,32 +1528,13 @@ namespace { /// mode. class ModuleInputs final { private: - using InputInfo = IncrementalJobAction::InputInfo; SmallVector AllModuleInputs; - InputInfo StatusBound; public: - explicit ModuleInputs() - : StatusBound - {InputInfo::Status::UpToDate, llvm::sys::TimePoint<>::min()} {} + explicit ModuleInputs() {} public: void addInput(const Action *inputAction) { - if (auto *IJA = dyn_cast(inputAction)) { - // Take the upper bound of the status of any incremental inputs to - // ensure that the merge-modules job gets run if *any* input job is run. - const auto conservativeStatus = - std::max(StatusBound.status, IJA->getInputInfo().status); - // The modification time here is not important to the rest of the - // incremental build. We take the upper bound in case an attempt to - // compare the swiftmodule output's mod time and any input files is - // made. If the compilation has been correctly scheduled, the - // swiftmodule's mod time will always strictly exceed the mod time of - // any of its inputs when we are able to skip it. - const auto conservativeModTime = std::max( - StatusBound.previousModTime, IJA->getInputInfo().previousModTime); - StatusBound = InputInfo{conservativeStatus, conservativeModTime}; - } AllModuleInputs.push_back(inputAction); } @@ -1973,14 +1546,13 @@ class ModuleInputs final { /// Consumes this \c ModuleInputs instance and returns a merge-modules action /// from the list of input actions and status it has computed thus far. JobAction *intoAction(Compilation &C) && { - return C.createAction(AllModuleInputs, StatusBound); + return C.createAction(AllModuleInputs); } }; } // namespace void Driver::buildActions(SmallVectorImpl &TopLevelActions, const ToolChain &TC, const OutputInfo &OI, - const InputInfoMap *OutOfDateMap, Compilation &C) const { const DerivedArgList &Args = C.getArgs(); ArrayRef Inputs = C.getInputFiles(); @@ -2030,14 +1602,9 @@ void Driver::buildActions(SmallVectorImpl &TopLevelActions, case file_types::TY_SIB: { // Source inputs always need to be compiled. assert(file_types::isPartOfSwiftCompilation(InputType)); - - auto previousBuildState = - IncrementalJobAction::InputInfo::makeNeedsCascadingRebuild(); - if (OutOfDateMap) - previousBuildState = OutOfDateMap->lookup(InputArg); if (Args.hasArg(options::OPT_embed_bitcode)) { Current = C.createAction( - Current, file_types::TY_LLVM_BC, previousBuildState); + Current, file_types::TY_LLVM_BC); if (PCH) cast(Current)->addInput(PCH); AllModuleInputs.addInput(Current); @@ -2045,8 +1612,7 @@ void Driver::buildActions(SmallVectorImpl &TopLevelActions, OI.CompilerOutputType, 0); } else { Current = C.createAction(Current, - OI.CompilerOutputType, - previousBuildState); + OI.CompilerOutputType); if (PCH) cast(Current)->addInput(PCH); AllModuleInputs.addInput(Current); @@ -2848,60 +2414,6 @@ static void addDiagFileOutputForPersistentPCHAction( } } -/// If the file at \p input has not been modified since the last build (i.e. its -/// mtime has not changed), adjust the Job's condition accordingly. -static void handleCompileJobCondition(Job *J, - CompileJobAction::InputInfo inputInfo, - llvm::Optional input, - bool alwaysRebuildDependents) { - using InputStatus = CompileJobAction::InputInfo::Status; - - if (inputInfo.status == InputStatus::NewlyAdded) { - J->setCondition(Job::Condition::NewlyAdded); - return; - } - - auto output = J->getOutput().getPrimaryOutputFilename(); - bool hasValidModTime = false; - llvm::sys::fs::file_status inputStatus; - if (input.has_value() && !llvm::sys::fs::status(*input, inputStatus)) { - J->setInputModTime(inputStatus.getLastModificationTime()); - hasValidModTime = J->getInputModTime() == inputInfo.previousModTime; - } else if (!llvm::sys::fs::status(output, inputStatus)) { - J->setInputModTime(inputStatus.getLastModificationTime()); - hasValidModTime = true; - } - - Job::Condition condition; - if (hasValidModTime) { - switch (inputInfo.status) { - case InputStatus::UpToDate: - if (llvm::sys::fs::exists(output)) - condition = Job::Condition::CheckDependencies; - else - condition = Job::Condition::RunWithoutCascading; - break; - case InputStatus::NeedsCascadingBuild: - condition = Job::Condition::Always; - break; - case InputStatus::NeedsNonCascadingBuild: - condition = Job::Condition::RunWithoutCascading; - break; - case InputStatus::NewlyAdded: - llvm_unreachable("handled above"); - } - } else { - if (alwaysRebuildDependents || - inputInfo.status == InputStatus::NeedsCascadingBuild) { - condition = Job::Condition::Always; - } else { - condition = Job::Condition::RunWithoutCascading; - } - } - - J->setCondition(condition); -} - Job *Driver::buildJobsForAction(Compilation &C, const JobAction *JA, const OutputFileMap *OFM, StringRef workingDirectory, @@ -3053,23 +2565,6 @@ Job *Driver::buildJobsForAction(Compilation &C, const JobAction *JA, std::move(Output), OI); Job *J = C.addJob(std::move(ownedJob)); - // If we track dependencies for this job, we may be able to avoid running it. - if (auto incrementalJob = dyn_cast(JA)) { - const bool alwaysRebuildDependents = - C.getArgs().hasArg(options::OPT_driver_always_rebuild_dependents); - if (!J->getOutput() - .getAdditionalOutputForType(file_types::TY_SwiftDeps) - .empty()) { - if (InputActions.size() == 1) { - handleCompileJobCondition(J, incrementalJob->getInputInfo(), BaseInput, - alwaysRebuildDependents); - } - } else if (isa(JA)) { - handleCompileJobCondition(J, incrementalJob->getInputInfo(), llvm::None, - alwaysRebuildDependents); - } - } - // 5. Add it to the JobCache, so we don't construct the same Job multiple // times. JobCache[Key] = J; @@ -3436,12 +2931,6 @@ void Driver::chooseDependenciesOutputPaths(Compilation &C, workingDirectory); }); } - if (C.getIncrementalBuildEnabled()) { - file_types::forEachIncrementalOutputType([&](file_types::ID type) { - if (type == file_types::TY_SwiftDeps) - addAuxiliaryOutput(C, *Output, type, OutputMap, workingDirectory); - }); - } chooseLoadedModuleTracePath(C, workingDirectory, Buf, Output); } diff --git a/lib/Driver/FineGrainedDependencyDriverGraph.cpp b/lib/Driver/FineGrainedDependencyDriverGraph.cpp deleted file mode 100644 index 18b053230782f..0000000000000 --- a/lib/Driver/FineGrainedDependencyDriverGraph.cpp +++ /dev/null @@ -1,739 +0,0 @@ -//===--- FineGrainedDependencyGraph.cpp ------------------------------------==// -// -// This source file is part of the Swift.org open source project -// -// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -// -//===----------------------------------------------------------------------===// - -#include "swift/Driver/FineGrainedDependencyDriverGraph.h" -// Next two includes needed for reporting errors opening dot file for writing. -#include "swift/AST/DiagnosticEngine.h" -#include "swift/AST/DiagnosticsFrontend.h" -#include "swift/AST/FileSystem.h" -#include "swift/Basic/PrettyStackTrace.h" -#include "swift/Basic/ReferenceDependencyKeys.h" -#include "swift/Basic/SourceManager.h" -#include "swift/Basic/Statistic.h" -#include "swift/Demangling/Demangle.h" -#include "swift/Driver/Job.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/SmallString.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/StringSet.h" -#include "llvm/ADT/StringSwitch.h" -#include "llvm/Support/MemoryBuffer.h" -#include "llvm/Support/Path.h" -#include "llvm/Support/SourceMgr.h" -#include "llvm/Support/VirtualOutputBackend.h" -#include "llvm/Support/YAMLParser.h" -#include "llvm/Support/raw_ostream.h" -#include - -// Definitions for the portion fine-grained dependency system used by the -// driver. - -using namespace swift; - -using namespace swift::fine_grained_dependencies; -using namespace swift::driver; - -//============================================================================== -// MARK: Affordances to unit tests -//============================================================================== - -LLVM_ATTRIBUTE_UNUSED -std::vector -ModuleDepGraph::printJobsForDebugging(const std::vector &jobs) { - llvm::errs() << "\nprintForDebugging: "; - for (auto *j : jobs) { - const auto swiftDeps = - j->getOutput().getAdditionalOutputForType(file_types::TY_SwiftDeps); - assert(!swiftDeps.empty()); - llvm::errs() << "job" << swiftDeps << ", "; - } - llvm::errs() << "\n"; - return jobs; -} -//============================================================================== -// MARK: Interfacing to Compilation -//============================================================================== - -ModuleDepGraph::Changes ModuleDepGraph::loadFromPath(const Job *Cmd, - StringRef path, - DiagnosticEngine &diags) { - FrontendStatsTracer tracer(stats, "fine-grained-dependencies-loadFromPath"); - PrettyStackTraceStringAction stackTrace("loading fine-grained dependency graph", path); - - if (driverDotFileBasePath.empty()) { - driverDotFileBasePath = path; - llvm::sys::path::remove_filename(driverDotFileBasePath); - llvm::sys::path::append(driverDotFileBasePath, "driver"); - } - - auto buffer = llvm::MemoryBuffer::getFile(path); - if (!buffer) - return llvm::None; - auto r = loadFromBuffer(Cmd, *buffer.get(), diags); - assert(path == getSwiftDeps(Cmd) && "Should be reading the job's swiftdeps"); - assert(!r || !nodeMap[path.str()].empty() && - "Must have a node for the whole file"); - return r; -} - -/// Returns None for error or a set of changed keys -ModuleDepGraph::Changes -ModuleDepGraph::loadFromBuffer(const Job *job, llvm::MemoryBuffer &buffer, - DiagnosticEngine &diags) { - llvm::Optional sourceFileDepGraph = - SourceFileDepGraph::loadFromBuffer(buffer); - if (!sourceFileDepGraph) - return llvm::None; - return loadFromSourceFileDepGraph(job, sourceFileDepGraph.value(), diags); -} - -ModuleDepGraph::Changes ModuleDepGraph::loadFromSourceFileDepGraph( - const Job *job, const SourceFileDepGraph &sourceFileDepGraph, - DiagnosticEngine &diags) { - registerJob(job); - auto changes = integrate(sourceFileDepGraph, getSwiftDeps(job)); - - if (verifyFineGrainedDependencyGraphAfterEveryImport) - verify(); - if (emitFineGrainedDependencyDotFileAfterEveryImport) - emitDotFileForJob(diags, job); - return changes; -} - -ModuleDepGraph::Changes ModuleDepGraph::loadFromSwiftModuleBuffer( - const Job *Cmd, llvm::MemoryBuffer &buffer, DiagnosticEngine &diags) { - FrontendStatsTracer tracer( - stats, "fine-grained-dependencies-loadFromSwiftModuleBuffer"); - PrettyStackTraceStringAction stackTrace( - "loading fine-grained dependency graph from swiftmodule", - buffer.getBufferIdentifier()); - - llvm::Optional sourceFileDepGraph = - SourceFileDepGraph::loadFromSwiftModuleBuffer(buffer); - if (!sourceFileDepGraph) - return llvm::None; - jobsBySwiftDeps[buffer.getBufferIdentifier().str()] = Cmd; - auto changes = integrate(*sourceFileDepGraph, buffer.getBufferIdentifier()); - if (verifyFineGrainedDependencyGraphAfterEveryImport) - verify(); - if (emitFineGrainedDependencyDotFileAfterEveryImport) - emitDotFileForJob(diags, Cmd); - return changes; -} - -bool ModuleDepGraph::haveAnyNodesBeenTraversedIn(const Job *cmd) const { - std::string swiftDeps = getSwiftDeps(cmd).str(); - - // optimization - const auto fileKey = DependencyKey::createKeyForWholeSourceFile( - DeclAspect::interface, swiftDeps); - if (const auto fileNode = nodeMap.find(swiftDeps, fileKey)) { - if (fileNode && fileNode.value()->getHasBeenTraced()) - return true; - } - - bool result = false; - forEachNodeInJob(swiftDeps, [&](const ModuleDepGraphNode *n) { - if (n->getHasBeenTraced()) - result = true; - }); - return result; -} - -std::vector ModuleDepGraph::findJobsToRecompileWhenWholeJobChanges( - const Job *jobToBeRecompiled) { - std::vector allNodesInJob; - forEachNodeInJob(getSwiftDeps(jobToBeRecompiled), - [&](ModuleDepGraphNode *n) { allNodesInJob.push_back(n); }); - return findJobsToRecompileWhenNodesChange(allNodesInJob); -} - -std::vector ModuleDepGraph::computeSwiftDepsFromNodes( - ArrayRef nodes) const { - llvm::StringSet<> swiftDepsOfNodes; - for (const ModuleDepGraphNode *n : nodes) { - if (!n->getIsProvides()) - continue; - const std::string &swiftDeps = n->getSwiftDepsOfProvides(); - swiftDepsOfNodes.insert(swiftDeps); - } - std::vector swiftDepsVec; - for (const auto &entry : swiftDepsOfNodes) - swiftDepsVec.push_back(entry.getKey().str()); - return swiftDepsVec; -} - -std::vector ModuleDepGraph::jobsContaining( - ArrayRef nodes) const { - std::vector jobs; - for (StringRef swiftDeps : computeSwiftDepsFromNodes(nodes)) - jobs.push_back(getJob(swiftDeps.str())); - return jobs; -} - -void ModuleDepGraph::registerJob(const Job *job) { - // No need to create any nodes; that will happen when the swiftdeps file is - // read. Just record the correspondence. - jobsBySwiftDeps.insert(std::make_pair(getSwiftDeps(job).str(), job)); -} - -std::vector ModuleDepGraph::getAllJobs() const { - std::vector jobs; - for (auto const &entry : jobsBySwiftDeps) - jobs.push_back(entry.second); - return jobs; -} - -std::vector ModuleDepGraph::getExternalDependencies() const { - return std::vector(externalDependencies.begin(), - externalDependencies.end()); -} - -// Add every (swiftdeps) use of the external dependency to foundJobs. -// Can return duplicates, but it doesn't break anything, and they will be -// canonicalized later. -std::vector ModuleDepGraph::findExternallyDependentUntracedJobs( - StringRef externalDependency) { - FrontendStatsTracer tracer( - stats, "fine-grained-dependencies-findExternallyDependentUntracedJobs"); - std::vector foundJobs; - forEachUntracedJobDirectlyDependentOnExternalSwiftDeps( - externalDependency, [&](const Job *job) { - foundJobs.push_back(job); - for (const Job *marked : findJobsToRecompileWhenWholeJobChanges(job)) { - // findJobsToRecompileWhenWholeJobChanges is reflexive - // Don't return job twice. - if (marked != job) - foundJobs.push_back(marked); - } - }); - return foundJobs; -} - -void ModuleDepGraph::forEachUntracedJobDirectlyDependentOnExternalSwiftDeps( - StringRef externalSwiftDeps, function_ref fn) { - // TODO move nameForDep into key - // These nodes will depend on the *interface* of the external Decl. - DependencyKey key(NodeKind::externalDepend, DeclAspect::interface, "", - externalSwiftDeps.str()); - for (const ModuleDepGraphNode *useNode : usesByDef[key]) { - if (!useNode->getHasBeenTraced()) - fn(getJob(useNode->getSwiftDepsOfProvides())); - } -} - -//============================================================================== -// MARK: Integrating SourceFileDepGraph into ModuleDepGraph -//============================================================================== - -ModuleDepGraph::Changes ModuleDepGraph::integrate(const SourceFileDepGraph &g, - StringRef swiftDepsOfJob) { - FrontendStatsTracer tracer(stats, "fine-grained-dependencies-integrate"); - - // When done, disappearedNodes contains the nodes which no longer exist. - auto disappearedNodes = nodeMap[swiftDepsOfJob.str()]; - // When done, changeDependencyKeys contains a list of keys that changed - // as a result of this integration. - // Or if the integration failed, None. - llvm::Optional> changedNodes = - std::unordered_set(); - - g.forEachNode([&](const SourceFileDepGraphNode *integrand) { - const auto &key = integrand->getKey(); - auto preexistingMatch = findPreexistingMatch(swiftDepsOfJob, integrand); - if (preexistingMatch.has_value() && - preexistingMatch.value().first == LocationOfPreexistingNode::here) - disappearedNodes.erase(key); // Node was and still is. Do not erase it. - - llvm::Optional> newNodeOrChangedNode = - integrateSourceFileDepGraphNode(g, integrand, preexistingMatch, - swiftDepsOfJob); - - if (!newNodeOrChangedNode) - changedNodes = llvm::None; - else if (!changedNodes) - ; - else if (auto *n = newNodeOrChangedNode.value().getPtrOrNull()) - changedNodes.value().insert(n); - }); - if (!changedNodes) - return llvm::None; - - for (auto &p : disappearedNodes) { - changedNodes.value().insert(p.second); - eraseNodeFromJob(p.second); - } - - // Make sure the changes can be retraced: - for (auto *n : changedNodes.value()) - n->clearHasBeenTraced(); - - return changedNodes.value(); -} - -ModuleDepGraph::PreexistingNodeIfAny ModuleDepGraph::findPreexistingMatch( - StringRef swiftDepsOfCompilationToBeIntegrated, - const SourceFileDepGraphNode *integrand) const { - const auto *matches = nodeMap.find(integrand->getKey()).getPtrOrNull(); - if (!matches) - return llvm::None; - const auto &expatsIter = matches->find(""); - if (expatsIter != matches->end()) { - assert(matches->size() == 1 && - "If an expat exists, then must not be any matches in other files"); - return std::make_pair(LocationOfPreexistingNode::nowhere, - expatsIter->second); - } - if (integrand->getIsProvides()) { - const auto &preexistingNodeInPlaceIter = - matches->find(swiftDepsOfCompilationToBeIntegrated.str()); - if (preexistingNodeInPlaceIter != matches->end()) - return std::make_pair(LocationOfPreexistingNode::here, - preexistingNodeInPlaceIter->second); - } - if (!matches->empty()) - return std::make_pair(LocationOfPreexistingNode::elsewhere, - matches->begin()->second); - return llvm::None; -} - -llvm::Optional> -ModuleDepGraph::integrateSourceFileDepGraphNode( - const SourceFileDepGraph &g, const SourceFileDepGraphNode *integrand, - const PreexistingNodeIfAny preexistingMatch, - const StringRef swiftDepsOfJob) { - if (!integrand->getIsProvides()) - return NullablePtr(); // depends are captured by - // recordWhatUseDependsUpon below - - auto changedAndIntegrationResultNode = - integrateSourceFileDeclNode(integrand, swiftDepsOfJob, preexistingMatch); - - ModuleDepGraphNode *const integratedNode = - changedAndIntegrationResultNode.second; - const bool hasNewExternalDependency = - recordWhatUseDependsUpon(g, integrand, integratedNode); - - NullablePtr changedNode = - changedAndIntegrationResultNode.first || hasNewExternalDependency - ? integratedNode - : nullptr; - return changedNode; -} - -std::pair -ModuleDepGraph::integrateSourceFileDeclNode( - const SourceFileDepGraphNode *integrand, StringRef swiftDepsOfJob, - const PreexistingNodeIfAny preexistingMatch) { - - if (!preexistingMatch.has_value()) { - // The driver will be accessing nodes by the swiftDeps of the job, - // so pass that in. - auto *newNode = - integrateByCreatingANewNode(integrand, swiftDepsOfJob.str()); - return std::make_pair(true, newNode); // New node - } - const auto where = preexistingMatch.value().first; - auto *match = preexistingMatch.value().second; - switch (where) { - case LocationOfPreexistingNode::here: - return std::make_pair(match->integrateFingerprintFrom(integrand), match); - - case LocationOfPreexistingNode::nowhere: - // Some other file depended on this, but didn't know where it was. - moveNodeToDifferentFile(match, swiftDepsOfJob.str()); - match->integrateFingerprintFrom(integrand); - return std::make_pair(true, match); // New Decl, assume changed - - case LocationOfPreexistingNode::elsewhere: - auto *newNode = - integrateByCreatingANewNode(integrand, swiftDepsOfJob.str()); - return std::make_pair(true, newNode); // New node; - } - llvm_unreachable("impossible"); -} - -ModuleDepGraphNode *ModuleDepGraph::integrateByCreatingANewNode( - const SourceFileDepGraphNode *integrand, - const llvm::Optional swiftDepsForNewNode) { - assert(integrand->getIsProvides() && - "Dependencies are arcs in the module graph"); - const auto &key = integrand->getKey(); - ModuleDepGraphNode *newNode = new ModuleDepGraphNode( - key, integrand->getFingerprint(), swiftDepsForNewNode); - addToMap(newNode); - return newNode; -} - -bool ModuleDepGraph::recordWhatUseDependsUpon( - const SourceFileDepGraph &g, - const SourceFileDepGraphNode *sourceFileUseNode, - ModuleDepGraphNode *moduleUseNode) { - bool useHasNewExternalDependency = false; - g.forEachDefDependedUponBy( - sourceFileUseNode, [&](const SourceFileDepGraphNode *def) { - const bool isNewUse = - usesByDef[def->getKey()].insert(moduleUseNode).second; - if (isNewUse) { - StringRef externalSwiftDeps = def->getKey().getName(); - if (def->getKey().getKind() == NodeKind::externalDepend) { - externalDependencies.insert(externalSwiftDeps.str()); - useHasNewExternalDependency = true; - } - } - }); - return useHasNewExternalDependency; -} - -void ModuleDepGraph::eraseNodeFromGraphAndFreeIt(ModuleDepGraphNode *n) { - eraseNodeFromJob(n); - eraseNodeFromCurrentPathIfTracing(n); - eraseNodeFromDependencyPathToJobs(n); - - delete n; -} - -void ModuleDepGraph::eraseNodeFromJob(ModuleDepGraphNode *n) { - eraseNodeFromMap(n); - eraseUsesOfNode(n); -} - -//============================================================================== -// MARK: ModuleDepGraph access -//============================================================================== -void ModuleDepGraph::forEachUseOf( - const ModuleDepGraphNode *def, - function_ref fn) const { - auto iter = usesByDef.find(def->getKey()); - if (iter == usesByDef.end()) - return; - for (ModuleDepGraphNode *useNode : iter->second) - fn(useNode); - // Add in implicit interface->implementation dependency - forCorrespondingImplementationOfProvidedInterface(def, fn); -} - -void ModuleDepGraph::forCorrespondingImplementationOfProvidedInterface( - const ModuleDepGraphNode *interfaceNode, - function_ref fn) const { - if (!interfaceNode->getKey().isInterface() || !interfaceNode->getIsProvides()) - return; - const auto swiftDeps = interfaceNode->getSwiftDeps().value(); - const auto &interfaceKey = interfaceNode->getKey(); - const DependencyKey implementationKey( - interfaceKey.getKind(), DeclAspect::implementation, - interfaceKey.getContext().str(), interfaceKey.getName().str()); - if (const auto implementationNode = - nodeMap.find(swiftDeps, implementationKey)) - fn(implementationNode.value()); -} - -void ModuleDepGraph::forEachNode( - function_ref fn) const { - nodeMap.forEachEntry([&](const std::string &, const DependencyKey &, - ModuleDepGraphNode *n) { fn(n); }); -} - -void ModuleDepGraph::forEachMatchingNode( - const DependencyKey &key, - function_ref fn) const { - nodeMap.forEachValueMatching( - key, [&](const std::string &, ModuleDepGraphNode *n) { fn(n); }); -} - -void ModuleDepGraph::forEachArc( - function_ref - fn) const { - forEachNode([&](const ModuleDepGraphNode *defNode) { - forEachUseOf(defNode, [&](const ModuleDepGraphNode *const useNode) { - fn(defNode, useNode); - }); - }); -} - -void ModuleDepGraph::forEachNodeInJob( - StringRef swiftDeps, function_ref fn) const { - if (const auto *nodesByKeys = nodeMap.find(swiftDeps.str()).getPtrOrNull()) { - for (const auto &keyAndNode : *nodesByKeys) - fn(keyAndNode.second); - } -} - -//============================================================================== -// MARK: ModuleDepGraph traversal -//============================================================================== - -void ModuleDepGraph::findPreviouslyUntracedDependents( - std::vector &foundDependents, - ModuleDepGraphNode *definition) { - - if (definition->getHasBeenTraced()) - return; - definition->setHasBeenTraced(); - - foundDependents.push_back(definition); - - // If this use also provides something, follow it - if (!definition->getIsProvides()) - return; // No need to look for uses; provides nothing - - size_t pathLengthAfterArrival = traceArrival(definition); - - forEachUseOf(definition, [&](ModuleDepGraphNode *u) { - // If this use also provides something, follow it - findPreviouslyUntracedDependents(foundDependents, u); - }); - - traceDeparture(pathLengthAfterArrival); -} - -size_t ModuleDepGraph::traceArrival(const ModuleDepGraphNode *visitedNode) { - if (!currentPathIfTracing.has_value()) - return 0; - auto ¤tPath = currentPathIfTracing.value(); - currentPath.push_back(visitedNode); - const auto visitedSwiftDepsIfAny = visitedNode->getSwiftDeps(); - recordDependencyPathToJob(currentPath, getJob(visitedSwiftDepsIfAny)); - return currentPath.size(); -} - -void ModuleDepGraph::recordDependencyPathToJob( - const std::vector &pathToJob, - const driver::Job *dependentJob) { - dependencyPathsToJobs.insert(std::make_pair(dependentJob, pathToJob)); -} - -void ModuleDepGraph::traceDeparture(size_t pathLengthAfterArrival) { - if (!currentPathIfTracing) - return; - auto ¤tPath = currentPathIfTracing.value(); - assert(pathLengthAfterArrival == currentPath.size() && - "Path must be maintained throughout recursive visits."); - currentPath.pop_back(); -} - -// ============================================================================= -// MARK: Emitting Dot file for ModuleDepGraph -// ============================================================================= - -void ModuleDepGraph::emitDotFileForJob(DiagnosticEngine &diags, - const Job *job) { - emitDotFile(diags, getSwiftDeps(job)); -} - -void ModuleDepGraph::emitDotFile(DiagnosticEngine &diags, - StringRef baseName) { - unsigned seqNo = dotFileSequenceNumber[baseName.str()]++; - std::string fullName = - baseName.str() + "-post-integration." + std::to_string(seqNo) + ".dot"; - withOutputPath(diags, *backend, fullName, [&](llvm::raw_ostream &out) { - emitDotFile(out); - return false; - }); -} - -void ModuleDepGraph::emitDotFile(llvm::raw_ostream &out) { - FrontendStatsTracer tracer(stats, "fine-grained-dependencies-emitDotFile"); - DotFileEmitter(out, *this, true, false).emit(); -} - -//============================================================================== -// MARK: ModuleDepGraph debugging -//============================================================================== - -void ModuleDepGraphNode::dump(llvm::raw_ostream &out) const { - DepGraphNode::dump(out); - if (getIsProvides()) - out << " swiftDeps: <" << getSwiftDepsOfProvides() << ">\n"; - else - out << " no swiftDeps\n"; -} - -void ModuleDepGraphNode::dump() const { - DepGraphNode::dump(); - if (getIsProvides()) - llvm::errs() << " swiftDeps: <" << getSwiftDepsOfProvides() << ">\n"; - else - llvm::errs() << " no swiftDeps\n"; -} - -bool ModuleDepGraph::verify() const { - FrontendStatsTracer tracer(stats, "fine-grained-dependencies-verify"); - verifyNodeMapEntries(); - verifyCanFindEachJob(); - verifyEachJobInGraphIsTracked(); - - return true; -} - -void ModuleDepGraph::verifyNodeMapEntries() const { - FrontendStatsTracer tracer(stats, - "fine-grained-dependencies-verifyNodeMapEntries"); - // TODO: disable when not debugging - std::array< - std::unordered_map>, - 2> - nodesSeenInNodeMap; - nodeMap.verify([&](const std::string &swiftDepsString, - const DependencyKey &key, ModuleDepGraphNode *n, - unsigned submapIndex) { - verifyNodeMapEntry(nodesSeenInNodeMap, swiftDepsString, key, n, - submapIndex); - }); -} - -void ModuleDepGraph::verifyNodeMapEntry( - std::array>, - 2> &nodesSeenInNodeMap, - const std::string &swiftDepsString, const DependencyKey &key, - ModuleDepGraphNode *n, const unsigned submapIndex) const { - verifyNodeIsUniqueWithinSubgraph(nodesSeenInNodeMap, swiftDepsString, key, n, - submapIndex); - verifyNodeIsInRightEntryInNodeMap(swiftDepsString, key, n); - key.verify(); - verifyExternalDependencyUniqueness(key); -} - -void ModuleDepGraph::verifyNodeIsUniqueWithinSubgraph( - std::array>, - 2> &nodesSeenInNodeMap, - const std::string &swiftDepsString, const DependencyKey &key, - ModuleDepGraphNode *const n, const unsigned submapIndex) const { - assert(submapIndex < nodesSeenInNodeMap.size() && - "submapIndex is out of bounds."); - auto iterInserted = nodesSeenInNodeMap[submapIndex][n->getKey()].insert( - std::make_pair(n->getSwiftDepsForMapKey(), n)); - if (!iterInserted.second) { - llvm_unreachable("duplicate driver keys"); - } -} - -void ModuleDepGraph::verifyNodeIsInRightEntryInNodeMap( - const std::string &swiftDepsString, const DependencyKey &key, - const ModuleDepGraphNode *const n) const { - const DependencyKey &nodeKey = n->getKey(); - const llvm::Optional swiftDeps = - swiftDepsString.empty() ? llvm::None - : llvm::Optional(swiftDepsString); - (void)nodeKey; - (void)swiftDeps; - assert(n->getSwiftDeps() == swiftDeps || - mapCorruption("Node misplaced for swiftDeps")); - assert(nodeKey == key || mapCorruption("Node misplaced for key")); -} - -void ModuleDepGraph::verifyExternalDependencyUniqueness( - const DependencyKey &key) const { - assert((key.getKind() != NodeKind::externalDepend || - externalDependencies.count(key.getName().str()) == 1) && - "Ensure each external dependency is tracked exactly once"); -} - -void ModuleDepGraph::verifyCanFindEachJob() const { - FrontendStatsTracer tracer(stats, - "fine-grained-dependencies-verifyCanFindEachJob"); - for (const auto &p : jobsBySwiftDeps) { - getJob(p.first); - } -} - -void ModuleDepGraph::verifyEachJobInGraphIsTracked() const { - FrontendStatsTracer tracer( - stats, "fine-grained-dependencies-verifyEachJobIsTracked"); - nodeMap.forEachKey1( - [&](const std::string &swiftDeps, const typename NodeMap::Key2Map &) { - ensureJobIsTracked(swiftDeps); - }); -} - -/// Dump the path(s) that led to \p node. -/// TODO: break up -void ModuleDepGraph::printPath(raw_ostream &out, - const driver::Job *jobToBeBuilt) const { - assert(currentPathIfTracing.has_value() && - "Cannot print paths of paths weren't tracked."); - - for (auto paths = dependencyPathsToJobs.find(jobToBeBuilt); - paths != dependencyPathsToJobs.end() && paths->first == jobToBeBuilt; - ++paths) { - const auto &path = paths->second; - bool first = true; - out << "\t"; - for (const ModuleDepGraphNode *n : path) { - if (first) - first = false; - else - out << " -> "; - - const StringRef providerName = getProvidingFilename(n->getSwiftDeps()); - printOneNodeOfPath(out, n->getKey(), providerName); - } - out << "\n"; - } -} - -StringRef ModuleDepGraph::getProvidingFilename( - const llvm::Optional &swiftDeps) const { - if (!swiftDeps) - return "getFirstSwiftPrimaryInput()); - // FineGrainedDependencyGraphTests work with simulated jobs with empty - // input names. - return !inputName.empty() ? inputName : StringRef(swiftDeps.value()); -} - -void ModuleDepGraph::printOneNodeOfPath(raw_ostream &out, - const DependencyKey &key, - const StringRef filename) { - switch (key.getKind()) { - case NodeKind::topLevel: - out << key.aspectName() << " of top-level name '" << key.humanReadableName() - << "' in " << filename; - break; - case NodeKind::nominal: - out << key.aspectName() << " of type '" << key.humanReadableName() - << "' in " << filename; - break; - case NodeKind::potentialMember: - out << key.aspectName() << " of non-private members '" - << key.humanReadableName() << "' in " << filename; - break; - case NodeKind::member: - out << key.aspectName() << " of member '" << key.humanReadableName() - << "' in " << filename; - break; - case NodeKind::dynamicLookup: - out << key.aspectName() << " of AnyObject member '" - << key.humanReadableName() << "' in " << filename; - break; - case NodeKind::externalDepend: - out << filename << " depends on " << key.aspectName() << " of module '" - << key.humanReadableName() << "'"; - break; - case NodeKind::sourceFileProvide: - out << key.aspectName() << " of source file " << key.humanReadableName(); - break; - default: - llvm_unreachable("unknown NodeKind"); - } -} diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 4f1dfd6779265..aa8d7c1ae45b5 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -334,8 +334,6 @@ void ToolChain::addCommonFrontendArgs(const OutputInfo &OI, inputArgs.AddLastArg(arguments, options::OPT_diagnostic_style); inputArgs.AddLastArg(arguments, options::OPT_enable_experimental_concise_pound_file); - inputArgs.AddLastArg(arguments, - options::OPT_verify_incremental_dependencies); inputArgs.AddLastArg(arguments, options::OPT_access_notes_path); inputArgs.AddLastArg(arguments, options::OPT_library_level); inputArgs.AddLastArg(arguments, options::OPT_enable_bare_slash_regex); @@ -1202,8 +1200,6 @@ ToolChain::constructInvocation(const MergeModuleJobAction &job, context.Args.AddLastArg(Arguments, options::OPT_import_objc_header); - context.Args.AddLastArg(Arguments, options::OPT_disable_incremental_imports); - Arguments.push_back("-module-name"); Arguments.push_back(context.Args.MakeArgString(context.OI.ModuleName)); diff --git a/lib/DriverTool/driver.cpp b/lib/DriverTool/driver.cpp index 3e149d6c4ae8c..f3d4919c6b4ae 100644 --- a/lib/DriverTool/driver.cpp +++ b/lib/DriverTool/driver.cpp @@ -357,7 +357,8 @@ static int run_driver(StringRef ExecName, llvm::errs() << "error: unable to invoke subcommand: " << subCommandArgs[0] << " (" << ErrorString << ")\n"; return 2; - } + } else + Diags.diagnose(SourceLoc(), diag::new_driver_not_found, NewDriverPath); } // We are in the fallback to legacy driver mode. diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 9481c4de4fe67..b60ad5345a9fa 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -232,7 +232,6 @@ set(TEST_SUBSETS only_validation only_long only_stress - only_early_swiftdriver ) if(NOT "${COVERAGE_DB}" STREQUAL "") @@ -426,7 +425,6 @@ foreach(SDK ${SWIFT_SDKS}) (test_subset STREQUAL "validation") OR (test_subset STREQUAL "only_long") OR (test_subset STREQUAL "only_stress") OR - (test_subset STREQUAL "only_early_swiftdriver") OR (test_subset STREQUAL "all")) list(APPEND directories "${test_bin_dir}") endif() diff --git a/test/Driver/Dependencies/Inputs/bindings-build-record/added.swift b/test/Driver/Dependencies/Inputs/bindings-build-record/added.swift deleted file mode 100644 index 8b137891791fe..0000000000000 --- a/test/Driver/Dependencies/Inputs/bindings-build-record/added.swift +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/Driver/Dependencies/Inputs/bindings-build-record/main.o b/test/Driver/Dependencies/Inputs/bindings-build-record/main.o deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/test/Driver/Dependencies/Inputs/bindings-build-record/main.swift b/test/Driver/Dependencies/Inputs/bindings-build-record/main.swift deleted file mode 100644 index 8b137891791fe..0000000000000 --- a/test/Driver/Dependencies/Inputs/bindings-build-record/main.swift +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/Driver/Dependencies/Inputs/bindings-build-record/main.swiftdeps.yaml b/test/Driver/Dependencies/Inputs/bindings-build-record/main.swiftdeps.yaml deleted file mode 100644 index aea4f045af438..0000000000000 --- a/test/Driver/Dependencies/Inputs/bindings-build-record/main.swiftdeps.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: './main.swiftdeps' - fingerprint: d41d8cd98f00b204e9800998ecf8427e - sequenceNumber: 0 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: './main.swiftdeps' - fingerprint: d41d8cd98f00b204e9800998ecf8427e - sequenceNumber: 1 - defsIDependUpon: [ 2, 3 ] - isProvides: true - - key: - kind: externalDepend - aspect: interface - context: '' - name: '/Volumes/AS/s/dec/build/Ninja-DebugAssert/swift-macosx-x86_64/lib/swift/macosx/Swift.swiftmodule/x86_64-apple-macos.swiftmodule' - sequenceNumber: 2 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: externalDepend - aspect: interface - context: '' - name: '/Volumes/AS/s/dec/build/Ninja-DebugAssert/swift-macosx-x86_64/lib/swift/macosx/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule' - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/bindings-build-record/other.o b/test/Driver/Dependencies/Inputs/bindings-build-record/other.o deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/test/Driver/Dependencies/Inputs/bindings-build-record/other.swift b/test/Driver/Dependencies/Inputs/bindings-build-record/other.swift deleted file mode 100644 index 8b137891791fe..0000000000000 --- a/test/Driver/Dependencies/Inputs/bindings-build-record/other.swift +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/Driver/Dependencies/Inputs/bindings-build-record/other.swiftdeps.yaml b/test/Driver/Dependencies/Inputs/bindings-build-record/other.swiftdeps.yaml deleted file mode 100644 index 052793f68d6f3..0000000000000 --- a/test/Driver/Dependencies/Inputs/bindings-build-record/other.swiftdeps.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: './other.swiftdeps' - fingerprint: d41d8cd98f00b204e9800998ecf8427e - sequenceNumber: 0 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: './other.swiftdeps' - fingerprint: d41d8cd98f00b204e9800998ecf8427e - sequenceNumber: 1 - defsIDependUpon: [ 2, 3 ] - isProvides: true - - key: - kind: externalDepend - aspect: interface - context: '' - name: '/Volumes/AS/s/dec/build/Ninja-DebugAssert/swift-macosx-x86_64/lib/swift/macosx/Swift.swiftmodule/x86_64-apple-macos.swiftmodule' - sequenceNumber: 2 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: externalDepend - aspect: interface - context: '' - name: '/Volumes/AS/s/dec/build/Ninja-DebugAssert/swift-macosx-x86_64/lib/swift/macosx/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule' - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/bindings-build-record/output.json b/test/Driver/Dependencies/Inputs/bindings-build-record/output.json deleted file mode 100644 index 58c50b2f269fb..0000000000000 --- a/test/Driver/Dependencies/Inputs/bindings-build-record/output.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "./main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "./other.swift": { - "object": "./other.o", - "swift-dependencies": "./other.swiftdeps" - }, - "./yet-another.swift": { - "object": "./yet-another.o", - "swift-dependencies": "./yet-another.swiftdeps" - }, - "./added.swift": { - "object": "./added.o", - "swift-dependencies": "./added.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/bindings-build-record/yet-another.o b/test/Driver/Dependencies/Inputs/bindings-build-record/yet-another.o deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/test/Driver/Dependencies/Inputs/bindings-build-record/yet-another.swift b/test/Driver/Dependencies/Inputs/bindings-build-record/yet-another.swift deleted file mode 100644 index 8b137891791fe..0000000000000 --- a/test/Driver/Dependencies/Inputs/bindings-build-record/yet-another.swift +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/Driver/Dependencies/Inputs/bindings-build-record/yet-another.swiftdeps.yaml b/test/Driver/Dependencies/Inputs/bindings-build-record/yet-another.swiftdeps.yaml deleted file mode 100644 index 6a2a08a00eb74..0000000000000 --- a/test/Driver/Dependencies/Inputs/bindings-build-record/yet-another.swiftdeps.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: './yet-another.swiftdeps' - fingerprint: d41d8cd98f00b204e9800998ecf8427e - sequenceNumber: 0 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: './yet-another.swiftdeps' - fingerprint: d41d8cd98f00b204e9800998ecf8427e - sequenceNumber: 1 - defsIDependUpon: [ 2, 3 ] - isProvides: true - - key: - kind: externalDepend - aspect: interface - context: '' - name: '/Volumes/AS/s/dec/build/Ninja-DebugAssert/swift-macosx-x86_64/lib/swift/macosx/Swift.swiftmodule/x86_64-apple-macos.swiftmodule' - sequenceNumber: 2 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: externalDepend - aspect: interface - context: '' - name: '/Volumes/AS/s/dec/build/Ninja-DebugAssert/swift-macosx-x86_64/lib/swift/macosx/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule' - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/chained-additional-kinds-fine/main.swift b/test/Driver/Dependencies/Inputs/chained-additional-kinds-fine/main.swift deleted file mode 100644 index 39cf040875f08..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained-additional-kinds-fine/main.swift +++ /dev/null @@ -1,46 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: main.swiftdeps - fingerprint: 8276a546203ebde599da50b466729230 - sequenceNumber: 0 - defsIDependUpon: [ 4, 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: main.swiftdeps - fingerprint: 8276a546203ebde599da50b466729230 - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: dynamicLookup - aspect: interface - context: '' - name: z - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: dynamicLookup - aspect: implementation - context: '' - name: z - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 4 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/chained-additional-kinds-fine/other.swift b/test/Driver/Dependencies/Inputs/chained-additional-kinds-fine/other.swift deleted file mode 100644 index fdebaf57ebfb4..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained-additional-kinds-fine/other.swift +++ /dev/null @@ -1,38 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: other.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: other.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: a - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true -... diff --git a/test/Driver/Dependencies/Inputs/chained-additional-kinds-fine/output.json b/test/Driver/Dependencies/Inputs/chained-additional-kinds-fine/output.json deleted file mode 100644 index 78134f1ab01d1..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained-additional-kinds-fine/output.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "./main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "./other.swift": { - "object": "./other.o", - "swift-dependencies": "./other.swiftdeps" - }, - "./yet-another.swift": { - "object": "./yet-another.o", - "swift-dependencies": "./yet-another.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/chained-additional-kinds-fine/yet-another.swift b/test/Driver/Dependencies/Inputs/chained-additional-kinds-fine/yet-another.swift deleted file mode 100644 index b12cbada09730..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained-additional-kinds-fine/yet-another.swift +++ /dev/null @@ -1,30 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: yet-another.swiftdeps - fingerprint: f0a22821b1bfd1d40363b3f89c7a7693 - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: yet-another.swiftdeps - fingerprint: f0a22821b1bfd1d40363b3f89c7a7693 - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: dynamicLookup - aspect: interface - context: '' - name: z - sequenceNumber: 2 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/chained-after-fine/main.swift b/test/Driver/Dependencies/Inputs/chained-after-fine/main.swift deleted file mode 100644 index 2e54000a1b441..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained-after-fine/main.swift +++ /dev/null @@ -1,46 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: main.swiftdeps - fingerprint: 42e5bb8d6f23bfc1b055b85bd466a86c - sequenceNumber: 0 - defsIDependUpon: [ 2, 4 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: main.swiftdeps - fingerprint: 42e5bb8d6f23bfc1b055b85bd466a86c - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1zV - name: '' - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: nominal - aspect: implementation - context: 4main1zV - name: '' - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 4 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/chained-after-fine/main.swiftdeps b/test/Driver/Dependencies/Inputs/chained-after-fine/main.swiftdeps deleted file mode 100644 index 81660f09be680d7a7dfa370dbc3cb2b02b11cf7a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 416 zcmaiuJ5Rz;7>2(dxs-(%6Ze`J!{M~_elcOd3QU-okT~1Yl3*elF}RY-$l$=p;LyQQ zojNcy2Zs)f{u~AmA-cMJ!}~t(ldsvj>~cH+0e~X+nPx7YQIa9Ni7M}u%xJZKd`9L- znj$=9m#$9Mlzd0x%w-6U5t&o@#l)udkPp@X!^brSba_R f`#sfHOw)HvKQJuIbF5wwLB700|7G(4Ii`jmLUVgD diff --git a/test/Driver/Dependencies/Inputs/chained-after-fine/other.swift b/test/Driver/Dependencies/Inputs/chained-after-fine/other.swift deleted file mode 100644 index fdebaf57ebfb4..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained-after-fine/other.swift +++ /dev/null @@ -1,38 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: other.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: other.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: a - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true -... diff --git a/test/Driver/Dependencies/Inputs/chained-after-fine/other.swiftdeps b/test/Driver/Dependencies/Inputs/chained-after-fine/other.swiftdeps deleted file mode 100644 index ba6beb7b84d725a6843c93892c9dc797b8c97374..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 424 zcmaiuJx{_=6oyX^AZ1Zw;$9PDxZFZNC=?6>R$#)!gv8kkZ6gk1fZ$3hBZC7YgF^>L zbz)#37Y7DLe-49}5M5o)@V?J^&Z$(d8;d1bGkyZ36k%ej(MtddO;_c z9w8Zt$(LtqPQL?n>&C_u1R7vp4xt28F<}ZyYryrGTF524U}ZPesiUGE@K6~pzB%J zu$!i;?BEu&ZM$e#ET1(j(;^@r0Cf6yUN_U*+Fb9k2eObe;g9VBmLodYrdQ1Q7Bh@y nv0$2Z%kcBe&3nxD^DVc@;s~+*9r`aD1BfmnFvKXJB5wQuV!VBZ diff --git a/test/Driver/Dependencies/Inputs/chained-after-fine/output.json b/test/Driver/Dependencies/Inputs/chained-after-fine/output.json deleted file mode 100644 index 78134f1ab01d1..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained-after-fine/output.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "./main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "./other.swift": { - "object": "./other.o", - "swift-dependencies": "./other.swiftdeps" - }, - "./yet-another.swift": { - "object": "./yet-another.o", - "swift-dependencies": "./yet-another.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/chained-after-fine/yet-another.swift b/test/Driver/Dependencies/Inputs/chained-after-fine/yet-another.swift deleted file mode 100644 index 463b4dfae1c71..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained-after-fine/yet-another.swift +++ /dev/null @@ -1,30 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: yet-another.swiftdeps - fingerprint: aae342945c458d008a9989daac618092 - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: yet-another.swiftdeps - fingerprint: aae342945c458d008a9989daac618092 - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1zV - name: '' - sequenceNumber: 2 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/chained-after-fine/yet-another.swiftdeps b/test/Driver/Dependencies/Inputs/chained-after-fine/yet-another.swiftdeps deleted file mode 100644 index 9004a3ab9d472398f336af5d22387a4ab1baef50..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 428 zcmaiwzfZzI6vwZp{924LVK0d>9M{4XTG~bitiXhc2??_&tq~K^0Kw=)DkFmfBZET+ zM|JAJKn@26M*kcJA0fJW!yDfB^FHt8D%JCb6i0|6gksX?eCd#}pi4~Fe)?U|vB;DT zPv``zBTPn6#o}ls=(n$o9Y9Ec=|tpS95NTVsjrN%@+xwnpwKB*o=M=-sY8}nSvr{z zt81UmFqw!&Z8PDJ5R;Y2&3w9sF35ZuU^Ngl{BxA689-q)fEY}_0ZLsUbPP9RcQ}{X z+mOho*tj{^{gRUViFj1{C?_z)H3>@Np?%et2VS?=zU#un&CM3)hS`th|V-2p&$;jZq$l%by zQJp$4G>1b6M*kcJuOYhfhBth_pZ9%tuhqWk2_gUifQ;}JMkZb`5+S^!g%3s+tk^ia zBuk{s5uWqTHs@PLeyF@KIf8vemP~y$amdsamFGx)V`{(%R~oGs>{GHbafIZ^ECxu~ zQL;vO$u^yM!o&f>Tc)ll*>RPJQQ{-TXC(N~Xts+S<)c2gdD5Q&`2oNMe>1YZP}1H# zEL|bv_Bi=1oE~MxwD8%?B5rpC-g?iI@sl)j9^J|PR5D7sVmmXb(CzlGCEKW5x~}Qv zk!Dp!BU#$Rj#0HMjx*NnnlY@`Fo-#TJ8Lp6xpA27Jh%WNzgs01%fr6N7g>B)Dh;Ta f(4cytG6+(+J$jf;LMjgsCcvX700RNM_*?J`uU~yW diff --git a/test/Driver/Dependencies/Inputs/chained-private-after-fine/other.swift b/test/Driver/Dependencies/Inputs/chained-private-after-fine/other.swift deleted file mode 100644 index fdebaf57ebfb4..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained-private-after-fine/other.swift +++ /dev/null @@ -1,38 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: other.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: other.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: a - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true -... diff --git a/test/Driver/Dependencies/Inputs/chained-private-after-fine/other.swiftdeps b/test/Driver/Dependencies/Inputs/chained-private-after-fine/other.swiftdeps deleted file mode 100644 index ba6beb7b84d725a6843c93892c9dc797b8c97374..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 424 zcmaiuJx{_=6oyX^AZ1Zw;$9PDxZFZNC=?6>R$#)!gv8kkZ6gk1fZ$3hBZC7YgF^>L zbz)#37Y7DLe-49}5M5o)@V?J^&Z$(d8;d1bGkyZ36k%ej(MtddO;_c z9w8Zt$(LtqPQL?n>&C_u1R7vp4xt28F<}ZyYryrGTF524U}ZPesiUGE@K6~pzB%J zu$!i;?BEu&ZM$e#ET1(j(;^@r0Cf6yUN_U*+Fb9k2eObe;g9VBmLodYrdQ1Q7Bh@y nv0$2Z%kcBe&3nxD^DVc@;s~+*9r`aD1BfmnFvKXJB5wQuV!VBZ diff --git a/test/Driver/Dependencies/Inputs/chained-private-after-fine/output.json b/test/Driver/Dependencies/Inputs/chained-private-after-fine/output.json deleted file mode 100644 index 78134f1ab01d1..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained-private-after-fine/output.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "./main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "./other.swift": { - "object": "./other.o", - "swift-dependencies": "./other.swiftdeps" - }, - "./yet-another.swift": { - "object": "./yet-another.o", - "swift-dependencies": "./yet-another.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/chained-private-after-fine/yet-another.swift b/test/Driver/Dependencies/Inputs/chained-private-after-fine/yet-another.swift deleted file mode 100644 index 6c6e6bd8f844a..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained-private-after-fine/yet-another.swift +++ /dev/null @@ -1,30 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: yet-another.swiftdeps - fingerprint: 0435fef7d7170574edab927508293b15 - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: yet-another.swiftdeps - fingerprint: 0435fef7d7170574edab927508293b15 - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1bV - name: '' - sequenceNumber: 2 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/chained-private-after-fine/yet-another.swiftdeps b/test/Driver/Dependencies/Inputs/chained-private-after-fine/yet-another.swiftdeps deleted file mode 100644 index 0e7587eb39bff10cbdad3bfb6062a51c1060e14f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 428 zcmaiwu}{K46o;>;Kv|42VK0d>9M?iiTMr@wR$#)!goN4FmWYX9fMDE6Wn^$*WN_%< zs7@Ui$l=g|(Laa5M~JT8@P_yM-uGUvTDxirB0>})ln_3bkwvDQMwo2;%sZ!3o-H4r z(-~GKm`tGZ)ybOEZ(p8TfRF&w8PC61WXbb$U!Gw3mFGiFp;N9tlfb8Qi$qwCtZayt zjZYVt%=oIlov=uV$(rXEKHWeUWIheB5^x&+IV!a*pfDOh45r@zrLPe>gPXBCUP|iQ zm`E4cygSkgrF)n;mk{IH;0HyiZX%D55*B^9xUCGSpitCM}Orz1dlswnAi)v9- zbys6fL6&y#jm;P+iNqIX-qYl0ehTMfthNtP|_XEOkfl{*rETju{11!_XF_6e!Bnw diff --git a/test/Driver/Dependencies/Inputs/chained-private-after-multiple-fine/main.swift b/test/Driver/Dependencies/Inputs/chained-private-after-multiple-fine/main.swift deleted file mode 100644 index 154ad90f112e5..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained-private-after-multiple-fine/main.swift +++ /dev/null @@ -1,62 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: main.swiftdeps - fingerprint: a4e513b4b5693bf6f50d6c0d531b542b - sequenceNumber: 0 - defsIDependUpon: [ 2, 4, 5, 6 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: main.swiftdeps - fingerprint: a4e513b4b5693bf6f50d6c0d531b542b - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1bV - name: '' - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: nominal - aspect: implementation - context: 4main1bV - name: '' - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: z - sequenceNumber: 4 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 5 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: topLevel - aspect: interface - context: '' - name: x - sequenceNumber: 6 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/chained-private-after-multiple-fine/main.swiftdeps b/test/Driver/Dependencies/Inputs/chained-private-after-multiple-fine/main.swiftdeps deleted file mode 100644 index c87981860e1166cb09e36a06b7307f8709adfb83..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 464 zcmaiwy-&hW6vb~JUu7Z2=w1?Ic)S8F{QwdMtiXhc2?;YTEeR%~5rdATGBP+YGB9*- zR3`=o@^D~a^v_}N5~8ciy~#P}ckaup)~=g^2*3a!CVZ|o7M*amA#~@b-Z`7_bouOp zO-W`<=olwopKm$)_T`C%5gHIS<+)dju6S!{Sy7)3Nd8=HO&NVWm0_-5jcR+92I zqS7TXZjQrW!s$_5j0zu>I6=EE;AlSex{uP(dl>ZY`jU~=GOjn2QjJFIO7dLWE-FPu z(Ok9Q{8LNM}A O0NMhKggJ6}8h!v_wt-Us diff --git a/test/Driver/Dependencies/Inputs/chained-private-after-multiple-fine/other.swift b/test/Driver/Dependencies/Inputs/chained-private-after-multiple-fine/other.swift deleted file mode 100644 index fdebaf57ebfb4..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained-private-after-multiple-fine/other.swift +++ /dev/null @@ -1,38 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: other.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: other.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: a - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true -... diff --git a/test/Driver/Dependencies/Inputs/chained-private-after-multiple-fine/other.swiftdeps b/test/Driver/Dependencies/Inputs/chained-private-after-multiple-fine/other.swiftdeps deleted file mode 100644 index ba6beb7b84d725a6843c93892c9dc797b8c97374..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 424 zcmaiuJx{_=6oyX^AZ1Zw;$9PDxZFZNC=?6>R$#)!gv8kkZ6gk1fZ$3hBZC7YgF^>L zbz)#37Y7DLe-49}5M5o)@V?J^&Z$(d8;d1bGkyZ36k%ej(MtddO;_c z9w8Zt$(LtqPQL?n>&C_u1R7vp4xt28F<}ZyYryrGTF524U}ZPesiUGE@K6~pzB%J zu$!i;?BEu&ZM$e#ET1(j(;^@r0Cf6yUN_U*+Fb9k2eObe;g9VBmLodYrdQ1Q7Bh@y nv0$2Z%kcBe&3nxD^DVc@;s~+*9r`aD1BfmnFvKXJB5wQuV!VBZ diff --git a/test/Driver/Dependencies/Inputs/chained-private-after-multiple-fine/output.json b/test/Driver/Dependencies/Inputs/chained-private-after-multiple-fine/output.json deleted file mode 100644 index 78134f1ab01d1..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained-private-after-multiple-fine/output.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "./main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "./other.swift": { - "object": "./other.o", - "swift-dependencies": "./other.swiftdeps" - }, - "./yet-another.swift": { - "object": "./yet-another.o", - "swift-dependencies": "./yet-another.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/chained-private-after-multiple-fine/yet-another.swift b/test/Driver/Dependencies/Inputs/chained-private-after-multiple-fine/yet-another.swift deleted file mode 100644 index 045438f5550d6..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained-private-after-multiple-fine/yet-another.swift +++ /dev/null @@ -1,30 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: yet-another.swiftdeps - fingerprint: 913de1b71ef48d4c730689fd99d7090e - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: yet-another.swiftdeps - fingerprint: 913de1b71ef48d4c730689fd99d7090e - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1bV - name: '' - sequenceNumber: 2 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/chained-private-after-multiple-fine/yet-another.swiftdeps b/test/Driver/Dependencies/Inputs/chained-private-after-multiple-fine/yet-another.swiftdeps deleted file mode 100644 index 784c9a37a773c0755f137923d0cd566bf4a25529..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 428 zcmaiwu}{K46o;>;Kv|42VK0d>9M{s87TQJztiXhc2??`>J0d260fKQOm65@Lk-?#Z zqdIk9AcsQ-M*kcJj}Tpb!yDf3d*5ANrFz{EL;x@VAR&CNA{WgVjv(6lnRkX~EL%Fg zz;mcfA)4~e)@K`rzkPY;as&ks&zbt-q7_pYzC4BUD^o*;`J_~NMuCqPE{dQWx!DjZ zTOThWnzMCnx8b4?q774*KHl;vm-#q=O2BaV=O|aR9ObJ4kGbhL0O=b5&iS7qnXDx3 zZGxmrShzbm{1Q^fNii;bl#`IhHG#LrW4AMs#&j_3_IpwxXDEb@rA)ovypkyKJX^Ch z%^MqsGk=`` diff --git a/test/Driver/Dependencies/Inputs/chained-private-after-multiple-nominal-members-fine/main.swift b/test/Driver/Dependencies/Inputs/chained-private-after-multiple-nominal-members-fine/main.swift deleted file mode 100644 index b4ed07232136b..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained-private-after-multiple-nominal-members-fine/main.swift +++ /dev/null @@ -1,86 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: main.swiftdeps - fingerprint: d281713b8f6ef5935679e8b3cbe6d5ce - sequenceNumber: 0 - defsIDependUpon: [ 2, 4, 5, 6, 7, 8, 9 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: main.swiftdeps - fingerprint: d281713b8f6ef5935679e8b3cbe6d5ce - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1bV - name: '' - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: nominal - aspect: implementation - context: 4main1bV - name: '' - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1aV - name: '' - sequenceNumber: 4 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: nominal - aspect: interface - context: 4main1zV - name: '' - sequenceNumber: 5 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: member - aspect: interface - context: 4main1zV - name: z - sequenceNumber: 6 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: nominal - aspect: interface - context: 4main1xV - name: '' - sequenceNumber: 7 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: member - aspect: interface - context: 4main1aV - name: a - sequenceNumber: 8 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: member - aspect: interface - context: 4main1xV - name: x - sequenceNumber: 9 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/chained-private-after-multiple-nominal-members-fine/main.swiftdeps b/test/Driver/Dependencies/Inputs/chained-private-after-multiple-nominal-members-fine/main.swiftdeps deleted file mode 100644 index 54b9dc29742c98b902e98992c352340757bfb3d4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 500 zcmah_J5Rz;6h6H?S`tHy(ZsPP#&Ed>T1sh27_b79CMG1zw6r9ch(?S$lFG>7!05ox z!BL$U9LU9ifzhAC;33Ax=5o%-_sW-3t(`Um34j5BD7?-VHXU)cAaoU^o;e%wbb0@f zjY(!m=nyBLA1pch2$YeH5*iXV=D7!(&Uo%IP=-XA@Z6L$M9S5B8V2mqrVFAh?DUjm zRsnk>bj;`VwZo=ULYF-E7O)kf7#6UQWJ1oSKN*!;8l`9rk;bHN0`^(}C)k;IgPE*8 z4XAuXjI*uiyRfsFkmABiB|(s`3pg6L-Ojaq<6rf=7d_d?>KV_!kyFRV%@f)89LG{E zRnrWr z0S7y*_Z{w797rXif|s{6Q`23mQ}jDVNjHjS$+uj+?fON}X!~Lu#2AQC5JeCP#FAgO ge|@n%fLR0v!8Snaa06f>W6M)DGJ(`CX<-9^PZ3dxhyVZp diff --git a/test/Driver/Dependencies/Inputs/chained-private-after-multiple-nominal-members-fine/other.swift b/test/Driver/Dependencies/Inputs/chained-private-after-multiple-nominal-members-fine/other.swift deleted file mode 100644 index ee50c4b42ca6f..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained-private-after-multiple-nominal-members-fine/other.swift +++ /dev/null @@ -1,38 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: other.swiftdeps - fingerprint: 2221cd1a52ad1f50cba3610cd9d80d45 - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: other.swiftdeps - fingerprint: 2221cd1a52ad1f50cba3610cd9d80d45 - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: member - aspect: interface - context: 4main1aV - name: a - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: member - aspect: implementation - context: 4main1aV - name: a - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true -... diff --git a/test/Driver/Dependencies/Inputs/chained-private-after-multiple-nominal-members-fine/other.swiftdeps b/test/Driver/Dependencies/Inputs/chained-private-after-multiple-nominal-members-fine/other.swiftdeps deleted file mode 100644 index 23bda7b3c432b41af3ba3905b30f74e6dcb07293..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 436 zcmaiwy-xx`5XI*ffum7lVt+7PU45~8im6z~1!y~&iyH#JEHAOH}RK7*BmC!DMh-gxnMP9{82IJ+cM zlpG^G7LzZ}*PMKN>ckNU_7R!#^oxT7o}PK?7^$y3J?BIyh0-(jJu-9f3aKk6F-OUb zM-~WA`LeRzaPS=AHBT=*vJt8X^N5dT9A#O%&6e!x; z2rE~}zCYUgl8z5!azy$l#*nZpk{Gq8c59#v-Cn=l?I?E2Ofq+<#H-c%wc;{Lb6QT* zOr~cWhN|q~Ce3EEdEKHJQ@0EYgM0wc9o)ISRDYYs+{Zr1;&0XiZFh89mqig3UEv6z yVn_qSF!UzVsclfEw`{H1pk_wbnk>(98nf&ug7E$h{g(}&LL>;m$UBCR0suc_GJpvH diff --git a/test/Driver/Dependencies/Inputs/chained-private-after-multiple-nominal-members-fine/output.json b/test/Driver/Dependencies/Inputs/chained-private-after-multiple-nominal-members-fine/output.json deleted file mode 100644 index 78134f1ab01d1..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained-private-after-multiple-nominal-members-fine/output.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "./main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "./other.swift": { - "object": "./other.o", - "swift-dependencies": "./other.swiftdeps" - }, - "./yet-another.swift": { - "object": "./yet-another.o", - "swift-dependencies": "./yet-another.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/chained-private-after-multiple-nominal-members-fine/yet-another.swift b/test/Driver/Dependencies/Inputs/chained-private-after-multiple-nominal-members-fine/yet-another.swift deleted file mode 100644 index c279ebaf043ab..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained-private-after-multiple-nominal-members-fine/yet-another.swift +++ /dev/null @@ -1,30 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: yet-another.swiftdeps - fingerprint: d7ad1a83584a3d3976404bcb830d57d1 - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: yet-another.swiftdeps - fingerprint: d7ad1a83584a3d3976404bcb830d57d1 - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1bV - name: '' - sequenceNumber: 2 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/chained-private-after-multiple-nominal-members-fine/yet-another.swiftdeps b/test/Driver/Dependencies/Inputs/chained-private-after-multiple-nominal-members-fine/yet-another.swiftdeps deleted file mode 100644 index e797c48145ddd8a8e01b739d767b116792473020..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 428 zcmaiwu}{K46o;>;Kv|42VK0d>9M{s8wzNbBtiXhc2??`Tu0~8m0|etnDkFmfBZET+ zM|JAJKn{lvjQ%+c9wEB=hBv(5_rANlTK%#mhyY*!KuY*r#x9yN97D7Ta_HPo-y^sMN6j619<}FSEfb`^GT)ljKToVT@*t(cJmQb zHUVBhG-IpAcEd#xL~Eul0=(fr7m5|}+&rz-CIm%Z<9&^)g0J2vAobo?II$lcJ z+Zajb(7HX^{}M8XX)!5$RMU{h4S~1TWA}O}jr{(gd*73+f}v12*BE(5PioJq1DHV2A$8CbIkyUOx_{e`f#y diff --git a/test/Driver/Dependencies/Inputs/chained-private-fine/main.swift b/test/Driver/Dependencies/Inputs/chained-private-fine/main.swift deleted file mode 100644 index cd55008fda157..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained-private-fine/main.swift +++ /dev/null @@ -1,47 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: main.swiftdeps - fingerprint: ea2e880fb7f4944d6f6093dad31c2ff9 - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: main.swiftdeps - fingerprint: ea2e880fb7f4944d6f6093dad31c2ff9 - sequenceNumber: 1 - defsIDependUpon: [ 4 ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1zV - name: '' - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: nominal - aspect: implementation - context: 4main1zV - name: '' - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 4 - defsIDependUpon: [ ] - isProvides: false - -... diff --git a/test/Driver/Dependencies/Inputs/chained-private-fine/other.swift b/test/Driver/Dependencies/Inputs/chained-private-fine/other.swift deleted file mode 100644 index fdebaf57ebfb4..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained-private-fine/other.swift +++ /dev/null @@ -1,38 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: other.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: other.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: a - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true -... diff --git a/test/Driver/Dependencies/Inputs/chained-private-fine/output.json b/test/Driver/Dependencies/Inputs/chained-private-fine/output.json deleted file mode 100644 index 78134f1ab01d1..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained-private-fine/output.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "./main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "./other.swift": { - "object": "./other.o", - "swift-dependencies": "./other.swiftdeps" - }, - "./yet-another.swift": { - "object": "./yet-another.o", - "swift-dependencies": "./yet-another.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/chained-private-fine/yet-another.swift b/test/Driver/Dependencies/Inputs/chained-private-fine/yet-another.swift deleted file mode 100644 index 3c9d96f11c369..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained-private-fine/yet-another.swift +++ /dev/null @@ -1,30 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: yet-another.swiftdeps - fingerprint: 59c8ff39595b320cb70847063b7410b9 - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: yet-another.swiftdeps - fingerprint: 59c8ff39595b320cb70847063b7410b9 - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1zV - name: '' - sequenceNumber: 2 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/chained/main.swift b/test/Driver/Dependencies/Inputs/chained/main.swift deleted file mode 100644 index e0e8f251340b0..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained/main.swift +++ /dev/null @@ -1,3 +0,0 @@ -# Dependencies after compilation: -depends-top-level: [a] -provides-nominal: [z] diff --git a/test/Driver/Dependencies/Inputs/chained/other.swift b/test/Driver/Dependencies/Inputs/chained/other.swift deleted file mode 100644 index 7e7daa298c540..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained/other.swift +++ /dev/null @@ -1,2 +0,0 @@ -# Dependencies after compilation: -provides-top-level: [a] diff --git a/test/Driver/Dependencies/Inputs/chained/output.json b/test/Driver/Dependencies/Inputs/chained/output.json deleted file mode 100644 index 78134f1ab01d1..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained/output.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "./main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "./other.swift": { - "object": "./other.o", - "swift-dependencies": "./other.swiftdeps" - }, - "./yet-another.swift": { - "object": "./yet-another.o", - "swift-dependencies": "./yet-another.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/chained/yet-another.swift b/test/Driver/Dependencies/Inputs/chained/yet-another.swift deleted file mode 100644 index 16c64afc2b66a..0000000000000 --- a/test/Driver/Dependencies/Inputs/chained/yet-another.swift +++ /dev/null @@ -1,2 +0,0 @@ -# Dependencies after compilation: -depends-nominal: [z] diff --git a/test/Driver/Dependencies/Inputs/check-interface-implementation-fine/a.swift b/test/Driver/Dependencies/Inputs/check-interface-implementation-fine/a.swift deleted file mode 100644 index 1b37c49d62fb4..0000000000000 --- a/test/Driver/Dependencies/Inputs/check-interface-implementation-fine/a.swift +++ /dev/null @@ -1,38 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: a.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: a.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: a - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true -... diff --git a/test/Driver/Dependencies/Inputs/check-interface-implementation-fine/bad.swift b/test/Driver/Dependencies/Inputs/check-interface-implementation-fine/bad.swift deleted file mode 100644 index f9b4faa7b636c..0000000000000 --- a/test/Driver/Dependencies/Inputs/check-interface-implementation-fine/bad.swift +++ /dev/null @@ -1,46 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: b.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 0 - defsIDependUpon: [ 2, 4 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: b.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: b - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: b - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: a - sequenceNumber: 4 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/check-interface-implementation-fine/c.swift b/test/Driver/Dependencies/Inputs/check-interface-implementation-fine/c.swift deleted file mode 100644 index 5238c4cef26d2..0000000000000 --- a/test/Driver/Dependencies/Inputs/check-interface-implementation-fine/c.swift +++ /dev/null @@ -1,46 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: c.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 0 - defsIDependUpon: [ 2, 4 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: c.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: c - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: c - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: b - sequenceNumber: 4 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/check-interface-implementation-fine/output.json b/test/Driver/Dependencies/Inputs/check-interface-implementation-fine/output.json deleted file mode 100644 index 438752aa2616a..0000000000000 --- a/test/Driver/Dependencies/Inputs/check-interface-implementation-fine/output.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "./a.swift": { - "object": "./a.o", - "swift-dependencies": "./a.swiftdeps" - }, - "./b.swift": { - "object": "./b.o", - "swift-dependencies": "./b.swiftdeps" - }, - "./c.swift": { - "object": "./c.o", - "swift-dependencies": "./c.swiftdeps" - }, - "./d.swift": { - "object": "./d.o", - "swift-dependencies": "./d.swiftdeps" - }, - "./e.swift": { - "object": "./e.o", - "swift-dependencies": "./e.swiftdeps" - }, - "./f.swift": { - "object": "./f.o", - "swift-dependencies": "./f.swiftdeps" - }, - "./bad.swift": { - "object": "./bad.o", - "swift-dependencies": "./bad.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/crash-simple-fine/crash.swift b/test/Driver/Dependencies/Inputs/crash-simple-fine/crash.swift deleted file mode 100644 index 85eaae84fcadc..0000000000000 --- a/test/Driver/Dependencies/Inputs/crash-simple-fine/crash.swift +++ /dev/null @@ -1,54 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: './crash.swiftdeps' - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 0 - defsIDependUpon: [ 5, 4, 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: './crash.swiftdeps' - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: a - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: IntegerLiteralType - sequenceNumber: 4 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: topLevel - aspect: interface - context: '' - name: FloatLiteralType - sequenceNumber: 5 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/crash-simple-fine/main.swift b/test/Driver/Dependencies/Inputs/crash-simple-fine/main.swift deleted file mode 100644 index b8d18969d5a2c..0000000000000 --- a/test/Driver/Dependencies/Inputs/crash-simple-fine/main.swift +++ /dev/null @@ -1,46 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: './main.swiftdeps' - fingerprint: 316328d5be8544f05f3cc73c32cea2d2 - sequenceNumber: 0 - defsIDependUpon: [ 4, 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: './main.swiftdeps' - fingerprint: 316328d5be8544f05f3cc73c32cea2d2 - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: M - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: M - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 4 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/crash-simple-fine/other.swift b/test/Driver/Dependencies/Inputs/crash-simple-fine/other.swift deleted file mode 100644 index 965cdbd4552c1..0000000000000 --- a/test/Driver/Dependencies/Inputs/crash-simple-fine/other.swift +++ /dev/null @@ -1,54 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: './other.swiftdeps' - fingerprint: 0665c1c79514536cfd19ee3359008f19 - sequenceNumber: 0 - defsIDependUpon: [ 2, 4 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: './other.swiftdeps' - fingerprint: 0665c1c79514536cfd19ee3359008f19 - sequenceNumber: 1 - defsIDependUpon: [ 5 ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: F - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: F - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: AssignmentPrecedence - sequenceNumber: 4 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 5 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/crash-simple-fine/output.json b/test/Driver/Dependencies/Inputs/crash-simple-fine/output.json deleted file mode 100644 index 55ef51f19bb04..0000000000000 --- a/test/Driver/Dependencies/Inputs/crash-simple-fine/output.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "./main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "./crash.swift": { - "object": "./crash.o", - "swift-dependencies": "./crash.swiftdeps" - }, - "./other.swift": { - "object": "./other.o", - "swift-dependencies": "./other.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/crash-simple-with-swiftdeps-fine/crash.swift b/test/Driver/Dependencies/Inputs/crash-simple-with-swiftdeps-fine/crash.swift deleted file mode 100644 index 22d8fe572608b..0000000000000 --- a/test/Driver/Dependencies/Inputs/crash-simple-with-swiftdeps-fine/crash.swift +++ /dev/null @@ -1,38 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: crash.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: crash.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: a - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true -... diff --git a/test/Driver/Dependencies/Inputs/crash-simple-with-swiftdeps-fine/crash.swiftdeps b/test/Driver/Dependencies/Inputs/crash-simple-with-swiftdeps-fine/crash.swiftdeps deleted file mode 100644 index ce820ec2d03139972991d0be6c3665d036c78662..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 400 zcma)$zfZzI9L2vq1z}NR;$9PDIIg8XC@mxmSb+%>6B1{S{)jlJp$1oSGBP+YGB|W_ zRHqIMxq8{Yf8m)C4vbfp{s0e~IpW0AUe!bytonibwSnebx$_>@eM zI!1UblrK+KoP055;tB-Eh)lWm?BWI2W=t6)<%MerC&H;WpK#2`%*82EQn#2ObdxZ==yF3RF~M5sRhY0FJHzEb$rnqlK)$j<9@& zDmMq)pVHxeK9`l=8+jz+wj`wc*bg7%VK9jLceiq-R95|9C>J`N%X2yKDXr>NT`&8F z(=!$M2llArI5oqfcG<8@3qx)Xz#Gu$x)g2J{NO%|Kr3}_y$Mydx!u4 diff --git a/test/Driver/Dependencies/Inputs/crash-simple-with-swiftdeps-fine/main.swift b/test/Driver/Dependencies/Inputs/crash-simple-with-swiftdeps-fine/main.swift deleted file mode 100644 index 75f41afc9a28c..0000000000000 --- a/test/Driver/Dependencies/Inputs/crash-simple-with-swiftdeps-fine/main.swift +++ /dev/null @@ -1,30 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: main.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: main.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/crash-simple-with-swiftdeps-fine/main.swiftdeps b/test/Driver/Dependencies/Inputs/crash-simple-with-swiftdeps-fine/main.swiftdeps deleted file mode 100644 index 6e3d208be60f581cdb8c94c280fd6c23c6ece506..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 400 zcma)$zfZzI9L2vq1z{n^#QjW+;kcImptO)MUjOh}wPxHiE=G-7Zim65@Lk-?#Z zqdIk9AcsQ-M*kcJj~Ja@-tgY%y}U;AqN8L0C;;p!AIroeQ$Z6%Hevov(5WcYj!)?f zX%j>yQpM_IE$COMPCbc`2+^6)pFOe^`aD!8NPQ7{EU0v9jVBU?bncM^sfkyJk+uox z0+E?mwYCk9#E7hgz6j|?x^gU}5z-<-00`*%ZtR2ooy#{k#ztL4CErrE7lEX(bg Vfy21tGdFO0yvtI#|8epvd;=pDdm8`% diff --git a/test/Driver/Dependencies/Inputs/crash-simple-with-swiftdeps-fine/other.swift b/test/Driver/Dependencies/Inputs/crash-simple-with-swiftdeps-fine/other.swift deleted file mode 100644 index 70e509c947cbd..0000000000000 --- a/test/Driver/Dependencies/Inputs/crash-simple-with-swiftdeps-fine/other.swift +++ /dev/null @@ -1,30 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: other.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 0 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: other.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 1 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/crash-simple-with-swiftdeps-fine/other.swiftdeps b/test/Driver/Dependencies/Inputs/crash-simple-with-swiftdeps-fine/other.swiftdeps deleted file mode 100644 index 910ebfb367811a90cf9cc2f4923e9fa5cad22821..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 400 zcma)$zfZzI9L2vq1z}NR;$9PDIIg8XC@mxmSb+%>6B1_+u8lZ|0fH;3j2#>p85}w| zs#6CBayWEg^v_}Nh|$^Q4ex#4%d0o8+ENC90KlH~u}oYXa*`mt336|oggjq8Jts4y zP7$68<*TzbCtraQx&pxwA~UW%yLid9d7w;@^1`*46X8_rPdEz5+{Fn}5;q?sbrX;U z!ZW^VZW}I+5ngj`5s-~=#aKWhq(+>?e;c(%UZA2HiC8TC25@o%V2RI&O_s9$I>GV< zD%~CJeoDuO*-Tn`uVs;lo05?BW6vMSV{b6*_3!0Up{O!%EazIS>r2^Vl$Q0ft{0i% zbWBD5fxFakoQh#lyJ%RZg&}hQ&>!7;gTipT#=M6iq|$(DJ32U~S1I`xHH=QBY?@Bj V@NLR$k2=2HWgVK@{~sr=!Z%Kfdzk%|GBP+YGB|W_ zRHqIM&Ee32(Laa5L!v7;yy5%(ywAIOEQF|3eD40yD^=BIRZ067ywb;prsIPoB zM>-XY=6b`SA=0HV=001=RLXo7pdJVo{yS=oyhP<{AZuy*E8y@N;8gw@xfc=h&7dtq`ewsrA+nV;=RRMPOJzO}&gCriP8xHfhqLPKN|VZ1tYE{rMHMyS0BBN9v|mD&ppIh#5(MlE)75$Y?> zW=JPu(O6$NG(x%*#*DL-Or?yo5cN>7=-*MT=OijmLs?7HUjauq0B7=Nbcb_dz7Hw6 zK>Kb#@vR)}Wz>}NSo4YhdJ$CaU8f(rL zNM~Z%+-$fsM7k2@g0r=BWf^Ay8i8Qpe@Cs6m#AC~WGtKh0yw+|IF&b}H;#z)KBnXx zo!fo&TRGUvXes5hmO&Xe6)ElKe(#Bl{KsMcen6apZFv5O+lqqOgfV)nAP#A8?JpW+`ps8CgnF6dOEGX`nG(s}FMR&4E O05wX$7*#+bfA|H^Rd}`l diff --git a/test/Driver/Dependencies/Inputs/fail-interface-hash-fine/output.json b/test/Driver/Dependencies/Inputs/fail-interface-hash-fine/output.json deleted file mode 100644 index 981629c77c49e..0000000000000 --- a/test/Driver/Dependencies/Inputs/fail-interface-hash-fine/output.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "./main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "./bad.swift": { - "object": "./bad.o", - "swift-dependencies": "./bad.swiftdeps" - }, - "./depends-on-main.swift": { - "object": "./depends-on-main.o", - "swift-dependencies": "./depends-on-main.swiftdeps" - }, - "./depends-on-bad.swift": { - "object": "./depends-on-bad.o", - "swift-dependencies": "./depends-on-bad.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/fail-simple-fine/bad.swift b/test/Driver/Dependencies/Inputs/fail-simple-fine/bad.swift deleted file mode 100644 index f3494a74be563..0000000000000 --- a/test/Driver/Dependencies/Inputs/fail-simple-fine/bad.swift +++ /dev/null @@ -1,38 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: bad.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: bad.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: a - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true -... diff --git a/test/Driver/Dependencies/Inputs/fail-simple-fine/main.swift b/test/Driver/Dependencies/Inputs/fail-simple-fine/main.swift deleted file mode 100644 index 75f41afc9a28c..0000000000000 --- a/test/Driver/Dependencies/Inputs/fail-simple-fine/main.swift +++ /dev/null @@ -1,30 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: main.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: main.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/fail-simple-fine/other.swift b/test/Driver/Dependencies/Inputs/fail-simple-fine/other.swift deleted file mode 100644 index ddc5106f05d1c..0000000000000 --- a/test/Driver/Dependencies/Inputs/fail-simple-fine/other.swift +++ /dev/null @@ -1,30 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: other.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 0 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: other.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 1 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/fail-simple-fine/output.json b/test/Driver/Dependencies/Inputs/fail-simple-fine/output.json deleted file mode 100644 index 32ad1dd72d6f7..0000000000000 --- a/test/Driver/Dependencies/Inputs/fail-simple-fine/output.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "./main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "./bad.swift": { - "object": "./bad.o", - "swift-dependencies": "./bad.swiftdeps" - }, - "./other.swift": { - "object": "./other.o", - "swift-dependencies": "./other.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/fail-with-bad-deps-fine/bad.swift b/test/Driver/Dependencies/Inputs/fail-with-bad-deps-fine/bad.swift deleted file mode 100644 index 2118101ae247a..0000000000000 --- a/test/Driver/Dependencies/Inputs/fail-with-bad-deps-fine/bad.swift +++ /dev/null @@ -1,55 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: './bad.swiftdeps' - fingerprint: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - sequenceNumber: 0 - defsIDependUpon: [ 2, 5, 4 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: './bad.swiftdeps' - fingerprint: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: bad - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: bad - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: FloatLiteralType - sequenceNumber: 4 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: topLevel - aspect: interface - context: '' - name: IntegerLiteralType - sequenceNumber: 5 - defsIDependUpon: [ ] - isProvides: false -garbage: "" -... diff --git a/test/Driver/Dependencies/Inputs/fail-with-bad-deps-fine/bad.swiftdeps b/test/Driver/Dependencies/Inputs/fail-with-bad-deps-fine/bad.swiftdeps deleted file mode 100644 index 510ae334d1fcaebeda460d7ecf83cc32544524ef..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 484 zcmaiwy-&hW6vb~Ztu2cZ68D-I!{ZfNrNbotbWsrCgd?b?l z+XsA%sUfl4hG(oZnavz+|c)oI8 zqjS`!NT#Cm)y10ApFo>A0wE#NIX7M%5_4k_Xj9bQxDjzGluG@DgaKVRBtb24@)7Er zfG&~D`Kr0ya7ct?&5dP1H$oL*0S!?PIgS1^s*Sur#cC*Qk@RQ4SqGpd-i*wTRrB2^ z>NVQ;$MUyya+FmLq|a&=h24}yYd;VAPwK>b91liA)h<{%^CoJp)w;V;nO$}*%d{?g zrd#awG<64i_7y97Uf*IRyIU?1P)-2~2J;@gAsg$Xq26^_VZ03%+896)*XoX#DF9(X j`T($+GQr(b8H9`s>BAijd-*hg9H+oX8L%UPzy04Ymt={c diff --git a/test/Driver/Dependencies/Inputs/fail-with-bad-deps-fine/depends-on-main.swift b/test/Driver/Dependencies/Inputs/fail-with-bad-deps-fine/depends-on-main.swift deleted file mode 100644 index 19da2f186aef5..0000000000000 --- a/test/Driver/Dependencies/Inputs/fail-with-bad-deps-fine/depends-on-main.swift +++ /dev/null @@ -1,46 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: './depends-on-main.swiftdeps' - fingerprint: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - sequenceNumber: 0 - defsIDependUpon: [ 2, 4 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: './depends-on-main.swiftdeps' - fingerprint: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: M - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: M - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: main - sequenceNumber: 4 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/fail-with-bad-deps-fine/depends-on-main.swiftdeps b/test/Driver/Dependencies/Inputs/fail-with-bad-deps-fine/depends-on-main.swiftdeps deleted file mode 100644 index 675fd4bd4c4fd58be22092bf3d54524edb86696b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 452 zcmaivu}{KK5XP@ZfwCB5;^a~jV|cul)|5s_7@z_ZBqk)zR9X^D1S1C5rZO@(FfurF za8#!b49&x#1EYTqgRddFa>EVZ_q*@z8qMpjAOTPS$O>OkY>_#mF_NvH|6p{^3e~eZ zU7$KcGUJ`C&o_+z_{!Yk2nmobnD%Osh-ph-nW6H=w2)D*R2wfO@afVbF)FcD2vObo zbcJNW)~#g1A|a9u(^fv+a+QbqG(a_AH2lw~H47Z&qXD;h(w_mRJ%BpD867W@^>>fR zS7_cHiQmHUVNS{jpS2uvyCv|}eI5>;6EE2I$1JxW+`J-=1g@MJbN{ z8;dTGOxdcmC3NB-Su=HE(G6F5nMG}k+Kf7X9r%S9n>YO$a8w1j;5%b|w3M~i z5s}X^bsrKxg~MP#@(J(x0CKw|@KJeeHU{$0?Dd=lK!*BKW=FJ=g*Kjy*`+3m`5%FhUWqD!@pX IbBKSyH<>?&)&Kwi diff --git a/test/Driver/Dependencies/Inputs/fail-with-bad-deps-fine/output.json b/test/Driver/Dependencies/Inputs/fail-with-bad-deps-fine/output.json deleted file mode 100644 index 981629c77c49e..0000000000000 --- a/test/Driver/Dependencies/Inputs/fail-with-bad-deps-fine/output.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "./main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "./bad.swift": { - "object": "./bad.o", - "swift-dependencies": "./bad.swiftdeps" - }, - "./depends-on-main.swift": { - "object": "./depends-on-main.o", - "swift-dependencies": "./depends-on-main.swiftdeps" - }, - "./depends-on-bad.swift": { - "object": "./depends-on-bad.o", - "swift-dependencies": "./depends-on-bad.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/fake-build-for-bitcode.py b/test/Driver/Dependencies/Inputs/fake-build-for-bitcode.py deleted file mode 100755 index 3652d13d62f48..0000000000000 --- a/test/Driver/Dependencies/Inputs/fake-build-for-bitcode.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python3 -# fake-build-for-bitcode.py - Fake build with -embed-bitcode -*- python -*- -# -# This source file is part of the Swift.org open source project -# -# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors -# Licensed under Apache License v2.0 with Runtime Library Exception -# -# See https://swift.org/LICENSE.txt for license information -# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -# -# ---------------------------------------------------------------------------- -# -# Emulates the frontend of an -embed-bitcode job. That means we have to handle -# -emit-bc and -c actions. -# -# ---------------------------------------------------------------------------- - -import os -import sys - -assert sys.argv[1] == '-frontend' - -primaryFile = sys.argv[sys.argv.index('-primary-file') + 1] -outputFile = sys.argv[sys.argv.index('-o') + 1] - -# Update the output file mtime, or create it if necessary. -# From http://stackoverflow.com/a/1160227. -with open(outputFile, 'a'): - os.utime(outputFile, None) - -if '-emit-bc' in sys.argv: - print("Handled", os.path.basename(primaryFile)) -elif '-c' in sys.argv: - print("Produced", os.path.basename(outputFile)) -else: - assert False, "unknown action" diff --git a/test/Driver/Dependencies/Inputs/fake-build-whole-module.py b/test/Driver/Dependencies/Inputs/fake-build-whole-module.py deleted file mode 100755 index 0574cf9418b37..0000000000000 --- a/test/Driver/Dependencies/Inputs/fake-build-whole-module.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python3 -# fake-build-for-whole-module.py - Optimized fake build -*- python -*- -# -# This source file is part of the Swift.org open source project -# -# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors -# Licensed under Apache License v2.0 with Runtime Library Exception -# -# See https://swift.org/LICENSE.txt for license information -# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -# -# ---------------------------------------------------------------------------- -# -# Emulates the frontend of a -whole-module-optimization compilation. -# -# ---------------------------------------------------------------------------- - -import os -import sys - -assert sys.argv[1] == '-frontend' -assert '-primary-file' not in sys.argv - -outputFile = sys.argv[sys.argv.index('-o') + 1] - -# Update the output file mtime, or create it if necessary. -# From http://stackoverflow.com/a/1160227. -with open(outputFile, 'a'): - os.utime(outputFile, None) - -print("Produced", os.path.basename(outputFile)) diff --git a/test/Driver/Dependencies/Inputs/independent-fine/main.swift b/test/Driver/Dependencies/Inputs/independent-fine/main.swift deleted file mode 100644 index 9143f163412ce..0000000000000 --- a/test/Driver/Dependencies/Inputs/independent-fine/main.swift +++ /dev/null @@ -1,22 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: main.swiftdeps - fingerprint: d41d8cd98f00b204e9800998ecf8427e - sequenceNumber: 0 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: main.swiftdeps - fingerprint: d41d8cd98f00b204e9800998ecf8427e - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true -... diff --git a/test/Driver/Dependencies/Inputs/independent-fine/other.swift b/test/Driver/Dependencies/Inputs/independent-fine/other.swift deleted file mode 100644 index 3d9348aa25859..0000000000000 --- a/test/Driver/Dependencies/Inputs/independent-fine/other.swift +++ /dev/null @@ -1,22 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: other.swiftdeps - fingerprint: d41d8cd98f00b204e9800998ecf8427e - sequenceNumber: 0 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: other.swiftdeps - fingerprint: d41d8cd98f00b204e9800998ecf8427e - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true -... diff --git a/test/Driver/Dependencies/Inputs/independent-fine/output.json b/test/Driver/Dependencies/Inputs/independent-fine/output.json deleted file mode 100644 index f847af2da52ff..0000000000000 --- a/test/Driver/Dependencies/Inputs/independent-fine/output.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "./main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "./other.swift": { - "object": "./other.o", - "swift-dependencies": "./other.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/malformed-after-fine/main.swift b/test/Driver/Dependencies/Inputs/malformed-after-fine/main.swift deleted file mode 100644 index a9561fcf725d2..0000000000000 --- a/test/Driver/Dependencies/Inputs/malformed-after-fine/main.swift +++ /dev/null @@ -1,30 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: main.swiftdeps - fingerprint: ec443bb982c3a06a433bdd47b85eeba2 - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: main.swiftdeps - fingerprint: ec443bb982c3a06a433bdd47b85eeba2 - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 2 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/malformed-after-fine/main.swiftdeps b/test/Driver/Dependencies/Inputs/malformed-after-fine/main.swiftdeps deleted file mode 100644 index 1d859f6bc6a2d6d3d9eeb3824680494206e2e868..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 416 zcmaiuzfZzI7>2)|{3r`CChj#chT~dV+CodhfEAc9F(GmGN^63NXvE-3PDTa?Mh1rt zj_TBbfgBDU82xh?JVJDJ`G)s>-X~wPb2sNQc*;qF@P-xMIhpce{rHs3 zkTyYhA}(K@tU38+>eLemju4q~{l&veuFsh|LFy~lV@^a;Z$9IQk-3Kxq$XZ5M%spv z1;R7FYHt@FjuBpSeZj~^q(a6>gtUm0_|MU36$L7$k*I~~w}7K709X8sg7H!@-o{ut zLzSC@)R%O)pOZ7vMjOiY|D+!1jQ0|Zx685tZH85}w| zs#6CBayWEg^v_}Nh|$^Q4e!S%uUfmjQZfJp0Ctp*MdIU$APK_jF!v_NMC8lIXJm@> zF~Vc1VtKL>5(AuAEQ#s%c`74GM1#@0FG_|Z21|n(L$xKBdngI z(%r%Kr*gQT&7_t0N*2kuu1L9h?6e2!koWqX?!8(n6m`ajYOc|^zEC*}0++g!7MbZZ zElvF?w*tp;Jkt(Ni>7Va7&3bR-N7yI75W<*;}3mEr2$p8C@|Y(Zi{(to6@F5ZSF~) T=efMqc5Tbysonqe2)|{3r`CChj#chT~dV+CodhfEAc9F(GmGN^63NXvE-3PDTa?Mh1rt zj_TBbfgBDU82xh?JVJDJ`G)s>-X~wPb2sNQc*;qF@P-xMIhpce{rHs3 zkTyYhA}(K@tU38+>eLemju4q~{l&veuFsh|LFy~lV@^a;Z$9IQk-3Kxq$XZ5M%spv z1;R7FYHt@FjuBpSeZj~^q(a6>gtUm0_|MU36$L7$k*I~~w}7K709X8sg7H!@-o{ut zLzSC@)R%O)pOZ7vMjOiY|D+!1jQ0|Zx685tZH85}w| zs#6CBayWEg^v_}Nh|$^Q4e!S%uUfmjQZfJp0Ctp*MdIU$APK_jF!v_NMC8lIXJm@> zF~Vc1VtKL>5(AuAEQ#s%c`74GM1#@0FG_|Z21|n(L$xKBdngI z(%r%Kr*gQT&7_t0N*2kuu1L9h?6e2!koWqX?!8(n6m`ajYOc|^zEC*}0++g!7MbZZ zElvF?w*tp;Jkt(Ni>7Va7&3bR-N7yI75W<*;}3mEr2$p8C@|Y(Zi{(to6@F5ZSF~) T=efMqc5TbysonqelGL$XI~H5L`e)N+l#{)e#dvAP6NWiKy5tH)Dnl z85tNnbZk3iV6Ywx85sLR`U5g>BWTr)H{2tguXnb0_74mTkN`~MS3VBKK+7?SNm~A) z?9m$u}P+&+muUw!}XQOn<{GYHutGLl1G{T7N`S8r0MPtL8bjBiOZSQ*`?DrI$&lety#kpClWc;kn63e>=pMx*Wlb(I0I^AZwWe3Z?8>=h3T(5un zV8_8m-nSCu;Pn1md>px{b4_b*h%T)6Q63cDdi; zPqtq0_ywaW&I5a`o;p>Xdb6iG(Z%8QrDA@Lhh4Oz-hXVd1ggz=@Lzdm0j33$V45&X mD86})y_zcmg?t7H6+lM@65|hW3nRy8AVC?}#{%H-YTyZy$&L>I diff --git a/test/Driver/Dependencies/Inputs/mutual-interface-hash-fine/does-not-change.swift b/test/Driver/Dependencies/Inputs/mutual-interface-hash-fine/does-not-change.swift deleted file mode 100644 index d828415d99e10..0000000000000 --- a/test/Driver/Dependencies/Inputs/mutual-interface-hash-fine/does-not-change.swift +++ /dev/null @@ -1,78 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: does-not-change.swiftdeps - fingerprint: 11111111111111111111111111111111 - sequenceNumber: 0 - defsIDependUpon: [ 8, 7, 2, 4, 6 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: does-not-change.swiftdeps - fingerprint: 11111111111111111111111111111111 - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: B - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: B - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 4 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: a - sequenceNumber: 5 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: IntegerLiteralType - sequenceNumber: 6 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: topLevel - aspect: interface - context: '' - name: b - sequenceNumber: 7 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: topLevel - aspect: interface - context: '' - name: FloatLiteralType - sequenceNumber: 8 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/mutual-interface-hash-fine/does-not-change.swiftdeps b/test/Driver/Dependencies/Inputs/mutual-interface-hash-fine/does-not-change.swiftdeps deleted file mode 100644 index fc0ef2857914279aae67be953890661d92ccfcee..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 536 zcmah@y-Vv*6#wPeHgOS==inAW9=*MZjl`gWLtp#=p@N{u8;#A?SCLlQptyzDvBMiW zIyhu_qdIkP2v>&=j{YI<59si2smj|t!#Qw%pPO5I`=4Sd#>d_ZiN6z?VP z%F_D658flYL#(5=eE$9_`CDRjeMMm@@t!RI_E{#&w~5su>rR&YlB>`9<_${|e(SRV zSp&b+CwrLiCt^MMyggF*tWWG!mY)(nR9|J5@RaOS^8TksWvis9N}4KIIeh?_KLQR_ zXA0xYbpFK5+#v64CikMvPEQ&I?V&PB3f|V#+P|uwMCPSvwd>7>=`Ff;C@#%nwR*T~ zhTdA>x{kY4bAshs%`(Si;jM(rLY%nas&~A$%3#a^VNi p9P|S6Q)Ahex;&7}CJ<8&bfh8H{sMQk;j}rg@ diff --git a/test/Driver/Dependencies/Inputs/mutual-interface-hash-fine/output.json b/test/Driver/Dependencies/Inputs/mutual-interface-hash-fine/output.json deleted file mode 100644 index dfbb111fcdce4..0000000000000 --- a/test/Driver/Dependencies/Inputs/mutual-interface-hash-fine/output.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "./does-change.swift": { - "object": "./does-change.o", - "swift-dependencies": "./does-change.swiftdeps" - }, - "./does-not-change.swift": { - "object": "./does-not-change.o", - "swift-dependencies": "./does-not-change.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/mutual-with-swiftdeps-fine/main.swift b/test/Driver/Dependencies/Inputs/mutual-with-swiftdeps-fine/main.swift deleted file mode 100644 index 2e42e0cc8b47d..0000000000000 --- a/test/Driver/Dependencies/Inputs/mutual-with-swiftdeps-fine/main.swift +++ /dev/null @@ -1,46 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: main.swiftdeps - fingerprint: 741650dd633ae2cd89de22c880ddadc9 - sequenceNumber: 0 - defsIDependUpon: [ 2, 4 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: main.swiftdeps - fingerprint: 741650dd633ae2cd89de22c880ddadc9 - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: b - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: b - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 4 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/mutual-with-swiftdeps-fine/main.swiftdeps b/test/Driver/Dependencies/Inputs/mutual-with-swiftdeps-fine/main.swiftdeps deleted file mode 100644 index 9c737691f83ea24fb8587966e1166254047b23e7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 400 zcma)$zfZzI9L2vq1z{n^#JwiQa9m4&LQBGc6__wFA#wKX)dUmKh{2Vdj0_Hp3=SO} z)u{smIUG7L`sXls#OUnuhW9@20dl5z=h;-`BCmeG!3vi0GG$M#{{8Wt?rM~H#ro$}n z($>@;IHaEE)hw4*9m};{47mcp4ej;IgUuL=?gjvvETG1g37%_JD<)%A$DxrOGQY+m S+YWtSdX$B=OyPf=yb9kIO?tTi diff --git a/test/Driver/Dependencies/Inputs/mutual-with-swiftdeps-fine/other.swift b/test/Driver/Dependencies/Inputs/mutual-with-swiftdeps-fine/other.swift deleted file mode 100644 index 8e9d62c832e6b..0000000000000 --- a/test/Driver/Dependencies/Inputs/mutual-with-swiftdeps-fine/other.swift +++ /dev/null @@ -1,46 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: other.swiftdeps - fingerprint: e12419713170057a991bc883225f56fc - sequenceNumber: 0 - defsIDependUpon: [ 4, 2] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: other.swiftdeps - fingerprint: e12419713170057a991bc883225f56fc - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: a - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: b - sequenceNumber: 4 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/mutual-with-swiftdeps-fine/other.swiftdeps b/test/Driver/Dependencies/Inputs/mutual-with-swiftdeps-fine/other.swiftdeps deleted file mode 100644 index 4553662ac74050f58fc6cc9f44c9a685727832ce..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 400 zcma)$zfZzI9L2vq1z}NR;$9PDIIg9={-ABbfEAc9F(Glb&=PSFLkX^=GBP+YGB|W_ zRHqIMxq8{Yf8mshJ_wS*i10f0T>W0|^m%1DavCMvu!GG)ce={cDp zd4lkSD_fnd8TpE&sml=@BQj&kvx}EZnMcwDNiR%E7~xK(_Jrez%w3!!DRqkpk~a}q zAUtEM#CkXI<-{Qv^>Y5 V?T&5hnr3#*a<`M&{~yP%!Z+Kfc$WYG diff --git a/test/Driver/Dependencies/Inputs/mutual-with-swiftdeps-fine/output.json b/test/Driver/Dependencies/Inputs/mutual-with-swiftdeps-fine/output.json deleted file mode 100644 index f847af2da52ff..0000000000000 --- a/test/Driver/Dependencies/Inputs/mutual-with-swiftdeps-fine/output.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "./main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "./other.swift": { - "object": "./other.o", - "swift-dependencies": "./other.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/nominal-members-fine/a-ext.swift b/test/Driver/Dependencies/Inputs/nominal-members-fine/a-ext.swift deleted file mode 100644 index a68fd33d3ee02..0000000000000 --- a/test/Driver/Dependencies/Inputs/nominal-members-fine/a-ext.swift +++ /dev/null @@ -1,102 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: a-ext.swiftdeps - fingerprint: d19650fa01b61a0a8d27eee5258aa70e - sequenceNumber: 0 - defsIDependUpon: [ 4, 10, 7, 11, 6 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: a-ext.swiftdeps - fingerprint: d19650fa01b61a0a8d27eee5258aa70e - sequenceNumber: 1 - defsIDependUpon: [ 9, 8 ] - isProvides: true - - key: - kind: potentialMember - aspect: interface - context: 4main1aV - name: '' - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: potentialMember - aspect: implementation - context: 4main1aV - name: '' - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: member - aspect: interface - context: 4main1aV - name: ext - sequenceNumber: 4 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: member - aspect: implementation - context: 4main1aV - name: ext - sequenceNumber: 5 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: Int - sequenceNumber: 6 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: topLevel - aspect: interface - context: '' - name: aaa - sequenceNumber: 7 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: topLevel - aspect: interface - context: '' - name: IntegerLiteralType - sequenceNumber: 8 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: topLevel - aspect: interface - context: '' - name: FloatLiteralType - sequenceNumber: 9 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: nominal - aspect: interface - context: 4main1aaaV - name: '' - sequenceNumber: 10 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: member - aspect: interface - context: 4main1aaaV - name: Int - sequenceNumber: 11 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/nominal-members-fine/a.swift b/test/Driver/Dependencies/Inputs/nominal-members-fine/a.swift deleted file mode 100644 index 287d5a52883a6..0000000000000 --- a/test/Driver/Dependencies/Inputs/nominal-members-fine/a.swift +++ /dev/null @@ -1,78 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: a.swiftdeps - fingerprint: 605b8543d8bbf247217381a68ce188b8 - sequenceNumber: 0 - defsIDependUpon: [ 8, 4, 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: a.swiftdeps - fingerprint: 605b8543d8bbf247217381a68ce188b8 - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: a - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1aV - name: '' - sequenceNumber: 4 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: nominal - aspect: implementation - context: 4main1aV - name: '' - sequenceNumber: 5 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: potentialMember - aspect: interface - context: 4main1aV - name: '' - sequenceNumber: 6 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: potentialMember - aspect: implementation - context: 4main1aV - name: '' - sequenceNumber: 7 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: member - aspect: interface - context: 4main1aV - name: init - sequenceNumber: 8 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/nominal-members-fine/depends-on-a-ext.swift b/test/Driver/Dependencies/Inputs/nominal-members-fine/depends-on-a-ext.swift deleted file mode 100644 index 321e7f40733b6..0000000000000 --- a/test/Driver/Dependencies/Inputs/nominal-members-fine/depends-on-a-ext.swift +++ /dev/null @@ -1,70 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: depends-on-a-ext.swiftdeps - fingerprint: eef421a8e034b3c72f85a3106b51620e - sequenceNumber: 0 - defsIDependUpon: [ 6, 5, 7, 2, 4 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: depends-on-a-ext.swiftdeps - fingerprint: eef421a8e034b3c72f85a3106b51620e - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: V - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: V - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 4 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: nominal - aspect: interface - context: 4main1aV - name: '' - sequenceNumber: 5 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: member - aspect: interface - context: 4main1aV - name: ext - sequenceNumber: 6 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: member - aspect: interface - context: 4main1aV - name: init - sequenceNumber: 7 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/nominal-members-fine/depends-on-a-foo.swift b/test/Driver/Dependencies/Inputs/nominal-members-fine/depends-on-a-foo.swift deleted file mode 100644 index 129ade88c6191..0000000000000 --- a/test/Driver/Dependencies/Inputs/nominal-members-fine/depends-on-a-foo.swift +++ /dev/null @@ -1,70 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: depends-on-a-foo.swiftdeps - fingerprint: 341612d23b9b4ab590b3d75e35b5c6e0 - sequenceNumber: 0 - defsIDependUpon: [ 6, 5, 4, 7, 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: depends-on-a-foo.swiftdeps - fingerprint: 341612d23b9b4ab590b3d75e35b5c6e0 - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: Q - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: Q - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 4 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: nominal - aspect: interface - context: 4main1aV - name: '' - sequenceNumber: 5 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: member - aspect: interface - context: 4main1aV - name: foo - sequenceNumber: 6 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: member - aspect: interface - context: 4main1aV - name: init - sequenceNumber: 7 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/nominal-members-fine/output.json b/test/Driver/Dependencies/Inputs/nominal-members-fine/output.json deleted file mode 100644 index d4d6d49c54405..0000000000000 --- a/test/Driver/Dependencies/Inputs/nominal-members-fine/output.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "./a.swift": { - "object": "./a.o", - "swift-dependencies": "./a.swiftdeps" - }, - "./a-ext.swift": { - "object": "./a-ext.o", - "swift-dependencies": "./a-ext.swiftdeps" - }, - "./depends-on-a-ext.swift": { - "object": "./depends-on-a-ext.o", - "swift-dependencies": "./depends-on-a-ext.swiftdeps" - }, - "./depends-on-a-foo.swift": { - "object": "./depends-on-a-foo.o", - "swift-dependencies": "./depends-on-a-foo.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/one-way-depends-after-fine/main.swift b/test/Driver/Dependencies/Inputs/one-way-depends-after-fine/main.swift deleted file mode 100644 index b21ca1bfe8e11..0000000000000 --- a/test/Driver/Dependencies/Inputs/one-way-depends-after-fine/main.swift +++ /dev/null @@ -1,30 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: './main.swiftdeps' - fingerprint: 68a74ca633848ae5e65ddc9d5e28b0e6 - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: './main.swiftdeps' - fingerprint: 68a74ca633848ae5e65ddc9d5e28b0e6 - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 2 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/one-way-depends-after-fine/main.swiftdeps b/test/Driver/Dependencies/Inputs/one-way-depends-after-fine/main.swiftdeps deleted file mode 100644 index f3f85357c16e3235beac44d230878646b4862223..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 400 zcma)$zfZzI9L2vq1z{n^#QjW+;kcGwOR;UjfEAc9F(Glba3#S+G(vDCm65@Lk-?#Z zqdIk9AcsQ-M*kcJj~Ja@-tc~W@@nWk20L8VivJ&`D+bB`oQO}s*kv`t7C zh|I*Qv0Zp1Mr1AYMMyW&m9UUTNQ(rG{}|PJL0087lCdQH25@u@V9C#jkC&LejtM?T z<(q@uPvvkwn@KD0)hv>6Ly^*Y>~)8D6g&)icYRzgmNXuWaK72Ry1)VVeTO-WmAGNI zO%?x?JHBn(u3`D7CBrf;0+}4Zt>5bx2U{2q?gs#=G@$AZ18y1I>2TNSGS)Vk6}Xb; Tx=zsPI+ke%soej1@+y1-17mr& diff --git a/test/Driver/Dependencies/Inputs/one-way-depends-after-fine/other.swift b/test/Driver/Dependencies/Inputs/one-way-depends-after-fine/other.swift deleted file mode 100644 index b0a83b5a9b5be..0000000000000 --- a/test/Driver/Dependencies/Inputs/one-way-depends-after-fine/other.swift +++ /dev/null @@ -1,38 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: './other.swiftdeps' - fingerprint: befb33f4269c9adc0644b060f467ef06 - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: './other.swiftdeps' - fingerprint: befb33f4269c9adc0644b060f467ef06 - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: a - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true -... diff --git a/test/Driver/Dependencies/Inputs/one-way-depends-after-fine/other.swiftdeps b/test/Driver/Dependencies/Inputs/one-way-depends-after-fine/other.swiftdeps deleted file mode 100644 index 7fd43b4114953c25c43175a1a622a28a91ef0516..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 428 zcmaiuu}{KK5Qnb^2rNcT+-qVCk5}k}mKGudR$#)!gv8lG+lYf0Ah?ps$l$=p;LyQQ zofsI%!=VGCe-49>5M5pFlKXx4-BoMXO(_9D0U$1YE<=k%mkdy{~VQCTA*Sz5V0`*25@oyjwVr;ay}hi zvz1rm9o)7}(=6q5+t6})UMG+^1jwr0!JXU7_P0LAee4T&LL9I~kL>|gA`Dut*U~gk p&l{z7$#&Yz(DfEGn5P@2>oFsa5Zm9O|FSWF=rRH$i~`Ey#t$AjeINh; diff --git a/test/Driver/Dependencies/Inputs/one-way-depends-after-fine/output.json b/test/Driver/Dependencies/Inputs/one-way-depends-after-fine/output.json deleted file mode 100644 index f847af2da52ff..0000000000000 --- a/test/Driver/Dependencies/Inputs/one-way-depends-after-fine/output.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "./main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "./other.swift": { - "object": "./other.o", - "swift-dependencies": "./other.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/one-way-depends-before-fine/main.swift b/test/Driver/Dependencies/Inputs/one-way-depends-before-fine/main.swift deleted file mode 100644 index 9183a8ba33282..0000000000000 --- a/test/Driver/Dependencies/Inputs/one-way-depends-before-fine/main.swift +++ /dev/null @@ -1,22 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: main.swiftdeps - fingerprint: d41d8cd98f00b204e9800998ecf8427e - sequenceNumber: 0 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: main.swiftdeps - fingerprint: d41d8cd98f00b204e9800998ecf8427e - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true -... diff --git a/test/Driver/Dependencies/Inputs/one-way-depends-before-fine/main.swiftdeps b/test/Driver/Dependencies/Inputs/one-way-depends-before-fine/main.swiftdeps deleted file mode 100644 index 20496d22d85ec7e071d1b9cdb522c43f5cd9fd82..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 416 zcmaiuy-&hG7{=e8e3Zoy6Ze`J!*MMw^pk`ED==YVLgMT}&jb_Eh{2UqMg|8)28Rxg z>ePXO91a~A{c{*RLUeU`hv)e{zr2m+MMshW2moZI&t>A{DJKcSo3QZC$&?ps$ERe5 zv9jb|K%WbWexsfk~Vk+uoR z0^u27wYCc%#|W>vz6i-iq(T;w2x$=~@t>pKEDBUiBT);}ZvjVF0G{|61>>b+yp6GP zhU}Yz)R%Oa&&e6-qn<;eZb{;Fp8D61%7{G-`*#DyE}2@uMoOXGzC2f0K&fYVhG7O} zw_8z_9o(a?>sHGabOpY*z8Q26M6q()&B~Up5Vp5^DGXO!9kF diff --git a/test/Driver/Dependencies/Inputs/one-way-depends-before-fine/other.swift b/test/Driver/Dependencies/Inputs/one-way-depends-before-fine/other.swift deleted file mode 100644 index b0a83b5a9b5be..0000000000000 --- a/test/Driver/Dependencies/Inputs/one-way-depends-before-fine/other.swift +++ /dev/null @@ -1,38 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: './other.swiftdeps' - fingerprint: befb33f4269c9adc0644b060f467ef06 - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: './other.swiftdeps' - fingerprint: befb33f4269c9adc0644b060f467ef06 - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: a - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true -... diff --git a/test/Driver/Dependencies/Inputs/one-way-depends-before-fine/other.swiftdeps b/test/Driver/Dependencies/Inputs/one-way-depends-before-fine/other.swiftdeps deleted file mode 100644 index 7fd43b4114953c25c43175a1a622a28a91ef0516..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 428 zcmaiuu}{KK5Qnb^2rNcT+-qVCk5}k}mKGudR$#)!gv8lG+lYf0Ah?ps$l$=p;LyQQ zofsI%!=VGCe-49>5M5pFlKXx4-BoMXO(_9D0U$1YE<=k%mkdy{~VQCTA*Sz5V0`*25@oyjwVr;ay}hi zvz1rm9o)7}(=6q5+t6})UMG+^1jwr0!JXU7_P0LAee4T&LL9I~kL>|gA`Dut*U~gk p&l{z7$#&Yz(DfEGn5P@2>oFsa5Zm9O|FSWF=rRH$i~`Ey#t$AjeINh; diff --git a/test/Driver/Dependencies/Inputs/one-way-depends-before-fine/output.json b/test/Driver/Dependencies/Inputs/one-way-depends-before-fine/output.json deleted file mode 100644 index f847af2da52ff..0000000000000 --- a/test/Driver/Dependencies/Inputs/one-way-depends-before-fine/output.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "./main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "./other.swift": { - "object": "./other.o", - "swift-dependencies": "./other.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/one-way-external-fine/main.swift b/test/Driver/Dependencies/Inputs/one-way-external-fine/main.swift deleted file mode 100644 index c7d4f89856338..0000000000000 --- a/test/Driver/Dependencies/Inputs/one-way-external-fine/main.swift +++ /dev/null @@ -1,62 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: main.swiftdeps - fingerprint: f216f45027a3fa6bf3d16c1b05dd8feb - sequenceNumber: 0 - defsIDependUpon: [ 6, 5, 2, 4 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: main.swiftdeps - fingerprint: f216f45027a3fa6bf3d16c1b05dd8feb - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: V - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: V - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 4 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: externalDepend - aspect: interface - context: '' - name: './main1-external' - sequenceNumber: 5 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: externalDepend - aspect: interface - context: '' - name: './main2-external' - sequenceNumber: 6 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/one-way-external-fine/main1-external b/test/Driver/Dependencies/Inputs/one-way-external-fine/main1-external deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/test/Driver/Dependencies/Inputs/one-way-external-fine/main2-external b/test/Driver/Dependencies/Inputs/one-way-external-fine/main2-external deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/test/Driver/Dependencies/Inputs/one-way-external-fine/other.swift b/test/Driver/Dependencies/Inputs/one-way-external-fine/other.swift deleted file mode 100644 index 20b5cf60db63a..0000000000000 --- a/test/Driver/Dependencies/Inputs/one-way-external-fine/other.swift +++ /dev/null @@ -1,70 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: other.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 0 - defsIDependUpon: [ 6, 7, 2, 5, 4 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: other.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: a - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: IntegerLiteralType - sequenceNumber: 4 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: topLevel - aspect: interface - context: '' - name: FloatLiteralType - sequenceNumber: 5 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: externalDepend - aspect: interface - context: '' - name: './other1-external' - sequenceNumber: 6 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: externalDepend - aspect: interface - context: '' - name: './other2-external' - sequenceNumber: 7 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/one-way-external-fine/other1-external b/test/Driver/Dependencies/Inputs/one-way-external-fine/other1-external deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/test/Driver/Dependencies/Inputs/one-way-external-fine/other2-external b/test/Driver/Dependencies/Inputs/one-way-external-fine/other2-external deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/test/Driver/Dependencies/Inputs/one-way-external-fine/output.json b/test/Driver/Dependencies/Inputs/one-way-external-fine/output.json deleted file mode 100644 index f847af2da52ff..0000000000000 --- a/test/Driver/Dependencies/Inputs/one-way-external-fine/output.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "./main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "./other.swift": { - "object": "./other.o", - "swift-dependencies": "./other.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/one-way-fine/main.swift b/test/Driver/Dependencies/Inputs/one-way-fine/main.swift deleted file mode 100644 index b21ca1bfe8e11..0000000000000 --- a/test/Driver/Dependencies/Inputs/one-way-fine/main.swift +++ /dev/null @@ -1,30 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: './main.swiftdeps' - fingerprint: 68a74ca633848ae5e65ddc9d5e28b0e6 - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: './main.swiftdeps' - fingerprint: 68a74ca633848ae5e65ddc9d5e28b0e6 - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 2 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/one-way-fine/other.swift b/test/Driver/Dependencies/Inputs/one-way-fine/other.swift deleted file mode 100644 index b0a83b5a9b5be..0000000000000 --- a/test/Driver/Dependencies/Inputs/one-way-fine/other.swift +++ /dev/null @@ -1,38 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: './other.swiftdeps' - fingerprint: befb33f4269c9adc0644b060f467ef06 - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: './other.swiftdeps' - fingerprint: befb33f4269c9adc0644b060f467ef06 - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: a - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true -... diff --git a/test/Driver/Dependencies/Inputs/one-way-fine/output.json b/test/Driver/Dependencies/Inputs/one-way-fine/output.json deleted file mode 100644 index 61c25a1aeb23e..0000000000000 --- a/test/Driver/Dependencies/Inputs/one-way-fine/output.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "./main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps", - "swiftmodule": "./main.swiftmodule", - "swiftdoc": "./main.swiftdoc", - }, - "./other.swift": { - "object": "./other.o", - "swift-dependencies": "./other.swiftdeps", - "swiftmodule": "./other.swiftmodule", - "swiftdoc": "./other.swiftdoc", - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/one-way-provides-after-fine/main.swift b/test/Driver/Dependencies/Inputs/one-way-provides-after-fine/main.swift deleted file mode 100644 index 2f22faafc626f..0000000000000 --- a/test/Driver/Dependencies/Inputs/one-way-provides-after-fine/main.swift +++ /dev/null @@ -1,30 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: main.swiftdeps - fingerprint: f216f45027a3fa6bf3d16c1b05dd8feb - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: main.swiftdeps - fingerprint: f216f45027a3fa6bf3d16c1b05dd8feb - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 2 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/one-way-provides-after-fine/main.swiftdeps b/test/Driver/Dependencies/Inputs/one-way-provides-after-fine/main.swiftdeps deleted file mode 100644 index 032b39bf8a68d64d5de8c148061b271f69b3cb75..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 416 zcmaiuJ5Rz;7>2(dxs-(%6Ze`J!{M~_elcOd3QU-okT~1YHo-(RVsIsuk->qH!J&hr zI(1+m2Zs)f{u~AmA-cMJ!}~t(ldsvj>~cH+0e~X+xy)QVr6fam6Ib3TnbK9bu zG(mX6E?u3hDfy1YsmlnDPc*y`HYj8%w3!zF>|Xak~T3} zAUvb1_IBao6yY_M7ctqel*wX}ASt0F{c|*0Rfe)@!fIyvE#T-Hz+pe5V7wHRw=ovZ zk$H2F`{EAwOMHR*Xp|7E+Z;RHr+)M(jKYUu|85|dHC+nAkx=P$t}cWy@H|Ix6h#kI z+t);42lqVNwog^Vvvk$a3=Di3;MVI8YQwE82=9jgJd=COpDzGv>?sgwsudZgqS>Av ed6pkBr`1z^#S8)`3jHF2e0hid%jN-cObtIhUweH3 diff --git a/test/Driver/Dependencies/Inputs/one-way-provides-after-fine/other.swift b/test/Driver/Dependencies/Inputs/one-way-provides-after-fine/other.swift deleted file mode 100644 index b3fe2d3a5af0f..0000000000000 --- a/test/Driver/Dependencies/Inputs/one-way-provides-after-fine/other.swift +++ /dev/null @@ -1,54 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: x.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 0 - defsIDependUpon: [ 5, 2, 4 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: x.swiftdeps - fingerprint: 72e95f4a11b98227c1f6ad6ea7f6cdba - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: a - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: FloatLiteralType - sequenceNumber: 4 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: topLevel - aspect: interface - context: '' - name: IntegerLiteralType - sequenceNumber: 5 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/one-way-provides-after-fine/other.swiftdeps b/test/Driver/Dependencies/Inputs/one-way-provides-after-fine/other.swiftdeps deleted file mode 100644 index 357b091ec2545c7c1ff7d9617af7988f3948267a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 400 zcma)$zfZzI9L2vq1z}NR;$9PDIIgAFQf!+rUjOiY|D+!1jQ0|Zx685tZH85}w| zs#6CBayWEg^v_}Nh|$^Q4e!S%uUfmjQZfJp0Ctp*MdIU$APK_jF!v_NMC8lIXJm@> zF~Vc1VtKL>5(AuAEQ#s%c`74GM1#@0FG_|Z21|n(L$xKBdngI z(%r%Kr*gQT&7_t0N*2kuu1L9h?6e2!koWqX?!8(n6m`ajYOc|^zEC*}0++g!7MbZZ zElvF?w*tp;Jkt(Ni>7Va7&3bR-N7yI75W<*;}3mEr2$p8C@|Y(Zi{(to6@F5ZSF~) T=efMqc5Tbysonqe2(dxs-(%6Ze`J!{M~_elcOd3QU-okT~1YHo-(RVsIsuk->qH!J&hr zI(1+m2Zs)f{u~AmA-cMJ!}~t(ldsvj>~cH+0e~X+xy)QVr6fam6Ib3TnbK9bu zG(mX6E?u3hDfy1YsmlnDPc*y`HYj8%w3!zF>|Xak~T3} zAUvb1_IBao6yY_M7ctqel*wX}ASt0F{c|*0Rfe)@!fIyvE#T-Hz+pe5V7wHRw=ovZ zk$H2F`{EAwOMHR*Xp|7E+Z;RHr+)M(jKYUu|85|dHC+nAkx=P$t}cWy@H|Ix6h#kI z+t);42lqVNwog^Vvvk$a3=Di3;MVI8YQwE82=9jgJd=COpDzGv>?sgwsudZgqS>Av ed6pkBr`1z^#S8)`3jHF2e0hid%jN-cObtIhUweH3 diff --git a/test/Driver/Dependencies/Inputs/one-way-provides-before-fine/other.swift b/test/Driver/Dependencies/Inputs/one-way-provides-before-fine/other.swift deleted file mode 100644 index 5310b5d7ab52c..0000000000000 --- a/test/Driver/Dependencies/Inputs/one-way-provides-before-fine/other.swift +++ /dev/null @@ -1,22 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: other.swiftdeps - fingerprint: d41d8cd98f00b204e9800998ecf8427e - sequenceNumber: 0 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: other.swiftdeps - fingerprint: d41d8cd98f00b204e9800998ecf8427e - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true -... diff --git a/test/Driver/Dependencies/Inputs/one-way-provides-before-fine/other.swiftdeps b/test/Driver/Dependencies/Inputs/one-way-provides-before-fine/other.swiftdeps deleted file mode 100644 index f6858883d699413367ed6f259bf0e2aad61335f7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 480 zcmaiuze@sP7{{M`(!2;Fg7ym{dVSBlJAa%)gIzx;FbIm~UcJ{aL_?(?n_P|#4UP>B zH#An0Lxa3FI5_s_IP^pmZ7t96{qcFeJG)26nhwALAf~+z#~$k`K1MbT)}IycsrcsV z7Vl%Ci>ymmjn*cLe*|XFqX-L;_f_)VV?&jE2+S^;k19D(oRrO-I~E4~!DC}I$6kDZ ziD|&!koDDQ@2lal0kVloz6E?rD!~FCVj@(0@XILd#wkkGkZdCT7_f2%uuq%O?+gv= zsl$wI%v>x*-nHe$Iek`pDa;|+dm5eN>uRNKT*+pu+Nc|uja0&ySH^m=czS3^Ux=KQ zv#gYFyCugozQbkVx^CW1i)_kHJ81^`JiyIH>x<;e%NFPa7R1&U=}E02+Qn*HHbw2^ z_EPFg00;H9JeSQsDnN7=urOnR>&Sejk`}gI%I6%%E!&l>@Uv35m2BBBiC6?;2(c(c b7rqPh=f6%AATpeR4n_daH0WrLRHBWarfiEe diff --git a/test/Driver/Dependencies/Inputs/one-way-provides-before-fine/output.json b/test/Driver/Dependencies/Inputs/one-way-provides-before-fine/output.json deleted file mode 100644 index f847af2da52ff..0000000000000 --- a/test/Driver/Dependencies/Inputs/one-way-provides-before-fine/output.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "./main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "./other.swift": { - "object": "./other.o", - "swift-dependencies": "./other.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/one-way-with-swiftdeps-fine/main.swift b/test/Driver/Dependencies/Inputs/one-way-with-swiftdeps-fine/main.swift deleted file mode 100644 index 2f22faafc626f..0000000000000 --- a/test/Driver/Dependencies/Inputs/one-way-with-swiftdeps-fine/main.swift +++ /dev/null @@ -1,30 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: main.swiftdeps - fingerprint: f216f45027a3fa6bf3d16c1b05dd8feb - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: main.swiftdeps - fingerprint: f216f45027a3fa6bf3d16c1b05dd8feb - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 2 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/one-way-with-swiftdeps-fine/main.swiftdeps b/test/Driver/Dependencies/Inputs/one-way-with-swiftdeps-fine/main.swiftdeps deleted file mode 100644 index 13f31d2a3e6131f7423463fcdac351edc96eeb15..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 400 zcma)$y-&hG7{=e8qOcHS;$9PDIIgANEhY?Dfe8~65@)Ymn_wauF}RY-$l$=p;LyQQ zojNd(!=VGCe-493jLt64@O=F8G@2J3DGxvZU|0HBWImp7k|Df~OK+S^c)50TN~TC1 zBRm$$m&YqkzG7wKiwaHzK?D zp7LdDv+!|>@QQ2mn5=~>U@=LMnsAc-G3w2-sETPKVnO;1;P48-7M~FtEoA+5gyl2j zT<>pxN(Xy|{EqZqFCY=OBq5#0Ui2Uj!}~$+wl6ysOJ(6uF16d2=W@s>t?E@>x0vAt zrXv58yVUc%6T_yiW!R>TAzuWzp}l@(uz|7gZUB(m0aV}8AuR zjIA2mg@Y4>*GySNWW!w!i%5**n33d z{%H48I6lnhvch{ck9gb=xU@!{a3BtYUcb|Q5Y3V<`@v8wG@Cb9V&J=OnU*Qlebx3f zN&G3dUE8+LRl~J()zAzKxdVXi;4bKu`dgYGJoX`z1ytRk5NfIw8Yb0jR}Wpw3pvYb Ts~$CdzZ?c$X8(UZeigm}PHTI6 diff --git a/test/Driver/Dependencies/Inputs/one-way-with-swiftdeps-fine/output.json b/test/Driver/Dependencies/Inputs/one-way-with-swiftdeps-fine/output.json deleted file mode 100644 index f2eb4d2dddbeb..0000000000000 --- a/test/Driver/Dependencies/Inputs/one-way-with-swiftdeps-fine/output.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "./main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps", - "swiftmodule": "./main.swiftmodule", - "swiftdoc": "./main.swiftdoc", - }, - "./other.swift": { - "object": "./other.o", - "swift-dependencies": "./other.swiftdeps", - "swiftmodule": "./main.swiftmodule", - "swiftdoc": "./main.swiftdoc", - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/one-way/main.swift b/test/Driver/Dependencies/Inputs/one-way/main.swift deleted file mode 100644 index c6dd8d475b207..0000000000000 --- a/test/Driver/Dependencies/Inputs/one-way/main.swift +++ /dev/null @@ -1,2 +0,0 @@ -# Dependencies after compilation: -depends-top-level: [a] diff --git a/test/Driver/Dependencies/Inputs/one-way/other.swift b/test/Driver/Dependencies/Inputs/one-way/other.swift deleted file mode 100644 index 7e7daa298c540..0000000000000 --- a/test/Driver/Dependencies/Inputs/one-way/other.swift +++ /dev/null @@ -1,2 +0,0 @@ -# Dependencies after compilation: -provides-top-level: [a] diff --git a/test/Driver/Dependencies/Inputs/one-way/output.json b/test/Driver/Dependencies/Inputs/one-way/output.json deleted file mode 100644 index f2eb4d2dddbeb..0000000000000 --- a/test/Driver/Dependencies/Inputs/one-way/output.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "./main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps", - "swiftmodule": "./main.swiftmodule", - "swiftdoc": "./main.swiftdoc", - }, - "./other.swift": { - "object": "./other.o", - "swift-dependencies": "./other.swiftdeps", - "swiftmodule": "./main.swiftmodule", - "swiftdoc": "./main.swiftdoc", - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/only-skip-once/file1.swift b/test/Driver/Dependencies/Inputs/only-skip-once/file1.swift deleted file mode 100644 index 3ebf6e578227d..0000000000000 --- a/test/Driver/Dependencies/Inputs/only-skip-once/file1.swift +++ /dev/null @@ -1,3 +0,0 @@ -public class Class1 { - public var Var1 : Int? -} diff --git a/test/Driver/Dependencies/Inputs/only-skip-once/file2.swift b/test/Driver/Dependencies/Inputs/only-skip-once/file2.swift deleted file mode 100644 index 5b579dd051636..0000000000000 --- a/test/Driver/Dependencies/Inputs/only-skip-once/file2.swift +++ /dev/null @@ -1,3 +0,0 @@ -public class Class2 { - public var Var2c : Class1? -} diff --git a/test/Driver/Dependencies/Inputs/only-skip-once/main.swift b/test/Driver/Dependencies/Inputs/only-skip-once/main.swift deleted file mode 100644 index 214696a8349db..0000000000000 --- a/test/Driver/Dependencies/Inputs/only-skip-once/main.swift +++ /dev/null @@ -1,2 +0,0 @@ -var x = Class1() -var y = Class2() diff --git a/test/Driver/Dependencies/Inputs/only-skip-once/output-file-map.json b/test/Driver/Dependencies/Inputs/only-skip-once/output-file-map.json deleted file mode 100644 index 32d28d7b87c26..0000000000000 --- a/test/Driver/Dependencies/Inputs/only-skip-once/output-file-map.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "": { - "swift-dependencies": "master.swiftdeps" - }, - "main.swift": { - "dependencies": "main.d", - "object": "main.o", - "swiftmodule": "main~partial.swiftmodule", - "swift-dependencies": "main.swiftdeps" - }, - "file1.swift": { - "dependencies": "file1.d", - "object": "file1.o", - "swiftmodule": "file1~partial.swiftmodule", - "swift-dependencies": "file1.swiftdeps" - }, - "file2.swift": { - "dependencies": "file2.d", - "object": "file2.o", - "swiftmodule": "file2~partial.swiftmodule", - "swift-dependencies": "file2.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/private-after-fine/a.swift b/test/Driver/Dependencies/Inputs/private-after-fine/a.swift deleted file mode 100644 index 9d80d172a2de4..0000000000000 --- a/test/Driver/Dependencies/Inputs/private-after-fine/a.swift +++ /dev/null @@ -1,38 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: A.swiftdeps - fingerprint: 605b8543d8bbf247217381a68ce188b8 - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: A.swiftdeps - fingerprint: 605b8543d8bbf247217381a68ce188b8 - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1aV - name: '' - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: nominal - aspect: implementation - context: 4main1aV - name: '' - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true -... diff --git a/test/Driver/Dependencies/Inputs/private-after-fine/a.swiftdeps b/test/Driver/Dependencies/Inputs/private-after-fine/a.swiftdeps deleted file mode 100644 index 450b49e7f688df46668f653694a0df56c893ec12..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 424 zcmaiwy-xx`5XI*f`HG1#M*AZ%hGh@#6K*vWcmfqBCM49}aYurQXvAPkR!RyBN(zfB zEY*sF;<8v!Q2OUkxP)kHGsSzq_cAlp+Er6Z0T2L4N}tiv!DCLA2(MZ8os%)om5bhMvNC8Uo^8VS2DiP3!Ob{^$H@X+tx_2go~%=^JW&NdpYOF8gemughg zOkcM>Ly@;|+qG@`RJYucsauAHA+-x|Ug&R{{NTP1De*Jw*6sFmw-rwSs>C!XX+@6~ qEz_r-*D);H&~20IZi%)7ol=h`5ybbl=)Y_{0}#bv$PNKyal;QM9DIQQ diff --git a/test/Driver/Dependencies/Inputs/private-after-fine/b.swift b/test/Driver/Dependencies/Inputs/private-after-fine/b.swift deleted file mode 100644 index c256595b686c8..0000000000000 --- a/test/Driver/Dependencies/Inputs/private-after-fine/b.swift +++ /dev/null @@ -1,54 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: b.swiftdeps - fingerprint: 68e9c0980ab7233dfbd965d8c4354027 - sequenceNumber: 0 - defsIDependUpon: [ 5, 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: b.swiftdeps - fingerprint: 68e9c0980ab7233dfbd965d8c4354027 - sequenceNumber: 1 - defsIDependUpon: [ 4 ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1bV - name: '' - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: nominal - aspect: implementation - context: 4main1bV - name: '' - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1aV - name: '' - sequenceNumber: 4 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: nominal - aspect: interface - context: 4main1eV - name: '' - sequenceNumber: 5 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/private-after-fine/b.swiftdeps b/test/Driver/Dependencies/Inputs/private-after-fine/b.swiftdeps deleted file mode 100644 index a7a6a0d54808e6f4b684e267dfc42765e358f4ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 464 zcmaiwzfZzY5XY|%DiDn^M)#5!!{fEI&_YYX02P=pF(F~5r6s{cG-7Zim65@Lk%6Iu zqdGA#G!KUkjQ%+cK0^GldBf%M{eJG7%T;SvO)d^V03gP_2cd~4l!ORxywoct6Phla zRmc=cV}!@7)7AN!l21>Zm<+)_B2y|qn>e8I%oE2*oKty02~$edC+vGpdd_{k{O(hOy*KC@ZUw*kpEK$YE$oKYYs zFC#2mp#1f5^n*J+O2qfLw{ik8yUwxJeC%}}grR#s=-u{(d`6WVcPOM9jn<{$I+kT9 zhN7rWR=0Dau!B36uIt6DW);+|meVlA_W|t8V4LK)cLRvCpJ_K%ub;JBzq9pcc3b=& zpmIckg5efBO3_d(ThFPg)3u#qA@3L+P0edcPLCmo@xUMMX!xIx0-pp3A~5n!0NRxU KfVsd9V)X^Kf`lUg diff --git a/test/Driver/Dependencies/Inputs/private-after-fine/c.swift b/test/Driver/Dependencies/Inputs/private-after-fine/c.swift deleted file mode 100644 index 7aec07e89f1a4..0000000000000 --- a/test/Driver/Dependencies/Inputs/private-after-fine/c.swift +++ /dev/null @@ -1,46 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: c.swiftdeps - fingerprint: 9e53bc0d9f7b3db367329e46ec87a57a - sequenceNumber: 0 - defsIDependUpon: [ 2, 4 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: c.swiftdeps - fingerprint: 9e53bc0d9f7b3db367329e46ec87a57a - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1cV - name: '' - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: nominal - aspect: implementation - context: 4main1cV - name: '' - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1bV - name: '' - sequenceNumber: 4 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/private-after-fine/c.swiftdeps b/test/Driver/Dependencies/Inputs/private-after-fine/c.swiftdeps deleted file mode 100644 index 74d0b62bcf9b93f8991b8554843727b9ddcc2138..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 444 zcmaiwy-&hW6vb~J-_aOjbT5f9JYGv%S}09OgbGZUn2<2jFA_{dBL-Je85tZH85}w| zs#6CB@^D~a^v_}N5u%PRCpY)}?#aEkR=;X-NdN)>3GQRDGVz3x6~Y@o^G3;pX3M8l zGDYGT;W1OXJX=%po4~hO*Is*(~YDfOH4oob8O<(Sny> zN0`4rh3li}CwFp~O2)bON(wQ%!7*t)_PP)J(7PY>Zu@*8r;4sO7#SQo zII2?z268xbVD!&n@Ceb>H@xBde&3guS8rUkB^dw=0LVz6%fv%djuVJBVg8-tDKAt{ z&+!au6Nn~a^VQj!d8kgH`pWf~W1&>*&nOD<+(QXe6R!|M zZ4=@JL^Hl>ZWA7gAzE{N5#o(dMOla=s6`yde;u_(L7*ZU30pM%8X$KKfFo{(Y`j#A zw=q&KpnY?^|0SIqW#zQ=QOiPMHzl#!PyODbG727s{kwr;7fp=?BPHKzbuN{FQR*0u zVVJB${IaU-;4USExFw5L%#u~M5ReZ5V8!9Ki3RsVAd8<_x3oVf(M~E2U~SI;ZeW{! l*I;gs_$Kqs3Ng!WU{!*yL#Rz?27=V#4*i!+<;3A)egK@Sd^G?7 diff --git a/test/Driver/Dependencies/Inputs/private-after-fine/e.swift b/test/Driver/Dependencies/Inputs/private-after-fine/e.swift deleted file mode 100644 index 07a12351010e8..0000000000000 --- a/test/Driver/Dependencies/Inputs/private-after-fine/e.swift +++ /dev/null @@ -1,46 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: e.swiftdeps - fingerprint: 9e53bc0d9f7b3db367329e46ec87a57a - sequenceNumber: 0 - defsIDependUpon: [ 2, 4 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: e.swiftdeps - fingerprint: 9e53bc0d9f7b3db367329e46ec87a57a - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1eV - name: '' - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: nominal - aspect: implementation - context: 4main1eV - name: '' - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1dV - name: '' - sequenceNumber: 4 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/private-after-fine/e.swiftdeps b/test/Driver/Dependencies/Inputs/private-after-fine/e.swiftdeps deleted file mode 100644 index 09ad2eff0aac3f049230214f38857f64349f5a4e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 416 zcmaiwu}{K46vnToK#7SlChjFMhT~dVXv?(;16E+d#Ds*|mOBzmL?Z@QQW+T>7#SQo zII2?z268xbVD!&n@Ceb>H@xBde&3guS8rUkB^dw=0LVz6%fv%djuVJBVg8-tDKAt{ z&+!au6Nn~a^VQj!d8kgH`pWf~W1&>*&nOD<+(QXe6R!|M zZ4=@JL^Hl>ZWA7gAzE{N5#o(dMOla=s6`yde;u_(L7*ZU30pM%8X$KKfFo{(bi7oI zw=q&KpnY?^|0SIqW#zQ=QOiPMHzl#!PyODbGGY(I{@p;ai>5}|NXfTaolAvL-**hh zFict^L0MIHaMve33d6J_^9Ad8<_w|;+6qMcM4z}lVxTxOd= l*Pw2X1SSp43Ngzrvns6X5Z@+#27=V#4*i!+<;3A)egK|1d^rFB diff --git a/test/Driver/Dependencies/Inputs/private-after-fine/f.swift b/test/Driver/Dependencies/Inputs/private-after-fine/f.swift deleted file mode 100644 index 993aae48b3a01..0000000000000 --- a/test/Driver/Dependencies/Inputs/private-after-fine/f.swift +++ /dev/null @@ -1,46 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: f.swiftdeps - fingerprint: 9e53bc0d9f7b3db367329e46ec87a57a - sequenceNumber: 0 - defsIDependUpon: [ 2] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: f.swiftdeps - fingerprint: 9e53bc0d9f7b3db367329e46ec87a57a - sequenceNumber: 1 - defsIDependUpon: [ 4 ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1fV - name: '' - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: nominal - aspect: implementation - context: 4main1fV - name: '' - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1eV - name: '' - sequenceNumber: 4 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/private-after-fine/f.swiftdeps b/test/Driver/Dependencies/Inputs/private-after-fine/f.swiftdeps deleted file mode 100644 index c1f5ae15307943a55f3c4477fa9929cefb451f92..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 444 zcmaiwzfZzY5XY~N-_aOjbT5f9JYJzKZ7C!qLIoyFOh}k%X`5go8Zo$%%E;ir$l%by zQJokVnukLNM*kcJA0g`K4VTM(Kljbu)f-oBE(t&YAi;eEp@FBAga~iE%o`kDOa6rYmCrps=Ld69otW&8!Vc#Qj1BXZmjqC#D zHXd0bJfo}TcEZ35gx6GDdSt`8%*-P`%K4Nmem$yZVkam3({p3y#Q^`2@UQHn;H#wHtkA3%nA368K{_TL*@=DHjMtr8#>Rj@UZJH&i zBuR=b>sCSFcW}?tb-gUBW>JyVf{G!z2jJ$1TPNGO8$y!(OuaGt1KI8T)lMfC2ULwn zPPdFl)h)%gl%lQ_%8puedL`Y|bTfeP)!CYoFGrji48blUbDDiNuuroKN1P(@g=RfUSf^Bd!mdLW1`d!I7%2~> zHx5}MJg2MrcEZ3O!fTpcI%LDTEX*M;O1qSJzZvCPilJ=OWj0ItF(AjVoINWDG^e{v^>aX!kum*a@pb&g5%anO4Z#`gVaa61&#jGVUYv5;&uT9<-tnPyQc zN|J2lv`$_Wc5v6!G)>PbW(KHv*phOt~=!!(6}hSNB?xD4=pk z0^L^SPFJ$@p4O4Aj$F{>ylyK6yIa&uRWoB@h#`m^>}dFxk0b#65KNq7fOch{T?OzB DlCgoT diff --git a/test/Driver/Dependencies/Inputs/private-after-fine/output.json b/test/Driver/Dependencies/Inputs/private-after-fine/output.json deleted file mode 100644 index c15439d5780e4..0000000000000 --- a/test/Driver/Dependencies/Inputs/private-after-fine/output.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "./a.swift": { - "object": "./a.o", - "swift-dependencies": "./a.swiftdeps" - }, - "./b.swift": { - "object": "./b.o", - "swift-dependencies": "./b.swiftdeps" - }, - "./c.swift": { - "object": "./c.o", - "swift-dependencies": "./c.swiftdeps" - }, - "./d.swift": { - "object": "./d.o", - "swift-dependencies": "./d.swiftdeps" - }, - "./e.swift": { - "object": "./e.o", - "swift-dependencies": "./e.swiftdeps" - }, - "./f.swift": { - "object": "./f.o", - "swift-dependencies": "./f.swiftdeps" - }, - "./g.swift": { - "object": "./g.o", - "swift-dependencies": "./g.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/private-fine/a.swift b/test/Driver/Dependencies/Inputs/private-fine/a.swift deleted file mode 100644 index 9d80d172a2de4..0000000000000 --- a/test/Driver/Dependencies/Inputs/private-fine/a.swift +++ /dev/null @@ -1,38 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: A.swiftdeps - fingerprint: 605b8543d8bbf247217381a68ce188b8 - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: A.swiftdeps - fingerprint: 605b8543d8bbf247217381a68ce188b8 - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1aV - name: '' - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: nominal - aspect: implementation - context: 4main1aV - name: '' - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true -... diff --git a/test/Driver/Dependencies/Inputs/private-fine/b.swift b/test/Driver/Dependencies/Inputs/private-fine/b.swift deleted file mode 100644 index c1ece8eaba069..0000000000000 --- a/test/Driver/Dependencies/Inputs/private-fine/b.swift +++ /dev/null @@ -1,46 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: b.swiftdeps - fingerprint: 9e53bc0d9f7b3db367329e46ec87a57a - sequenceNumber: 0 - defsIDependUpon: [ 2, 4 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: b.swiftdeps - fingerprint: 9e53bc0d9f7b3db367329e46ec87a57a - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1bV - name: '' - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: nominal - aspect: implementation - context: 4main1bV - name: '' - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1aV - name: '' - sequenceNumber: 4 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/private-fine/c.swift b/test/Driver/Dependencies/Inputs/private-fine/c.swift deleted file mode 100644 index 977466a86f224..0000000000000 --- a/test/Driver/Dependencies/Inputs/private-fine/c.swift +++ /dev/null @@ -1,54 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: c.swiftdeps - fingerprint: 9e53bc0d9f7b3db367329e46ec87a57a - sequenceNumber: 0 - defsIDependUpon: [ 2, 4 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: c.swiftdeps - fingerprint: 9e53bc0d9f7b3db367329e46ec87a57a - sequenceNumber: 1 - defsIDependUpon: [ 5 ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1cV - name: '' - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: nominal - aspect: implementation - context: 4main1cV - name: '' - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1eV - name: '' - sequenceNumber: 4 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: nominal - aspect: interface - context: 4main1bV - name: '' - sequenceNumber: 5 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/private-fine/d.swift b/test/Driver/Dependencies/Inputs/private-fine/d.swift deleted file mode 100644 index a2c4fc4b078bb..0000000000000 --- a/test/Driver/Dependencies/Inputs/private-fine/d.swift +++ /dev/null @@ -1,46 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: d.swiftdeps - fingerprint: 9e53bc0d9f7b3db367329e46ec87a57a - sequenceNumber: 0 - defsIDependUpon: [ 2, 4 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: d.swiftdeps - fingerprint: 9e53bc0d9f7b3db367329e46ec87a57a - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1dV - name: '' - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: nominal - aspect: implementation - context: 4main1dV - name: '' - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1cV - name: '' - sequenceNumber: 4 - defsIDependUpon: [ ] - isProvides: false -... diff --git a/test/Driver/Dependencies/Inputs/private-fine/e.swift b/test/Driver/Dependencies/Inputs/private-fine/e.swift deleted file mode 100644 index 5a83550fc2d60..0000000000000 --- a/test/Driver/Dependencies/Inputs/private-fine/e.swift +++ /dev/null @@ -1,38 +0,0 @@ -# Fine-grained v0 ---- -allNodes: - - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: e.swiftdeps - fingerprint: 605b8543d8bbf247217381a68ce188b8 - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: e.swiftdeps - fingerprint: 605b8543d8bbf247217381a68ce188b8 - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 4main1eV - name: '' - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: nominal - aspect: implementation - context: 4main1eV - name: '' - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true -... diff --git a/test/Driver/Dependencies/Inputs/private-fine/output.json b/test/Driver/Dependencies/Inputs/private-fine/output.json deleted file mode 100644 index 497186398e457..0000000000000 --- a/test/Driver/Dependencies/Inputs/private-fine/output.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "./a.swift": { - "object": "./a.o", - "swift-dependencies": "./a.swiftdeps" - }, - "./b.swift": { - "object": "./b.o", - "swift-dependencies": "./b.swiftdeps" - }, - "./c.swift": { - "object": "./c.o", - "swift-dependencies": "./c.swiftdeps" - }, - "./d.swift": { - "object": "./d.o", - "swift-dependencies": "./d.swiftdeps" - }, - "./e.swift": { - "object": "./e.o", - "swift-dependencies": "./e.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/private/a.swift b/test/Driver/Dependencies/Inputs/private/a.swift deleted file mode 100644 index 76fb34c551d66..0000000000000 --- a/test/Driver/Dependencies/Inputs/private/a.swift +++ /dev/null @@ -1,2 +0,0 @@ -# Dependencies after compilation: -provides-nominal: [a] diff --git a/test/Driver/Dependencies/Inputs/private/b.swift b/test/Driver/Dependencies/Inputs/private/b.swift deleted file mode 100644 index a6d68a4a1ee9b..0000000000000 --- a/test/Driver/Dependencies/Inputs/private/b.swift +++ /dev/null @@ -1,3 +0,0 @@ -# Dependencies after compilation: -provides-nominal: [b] -depends-nominal: [a] diff --git a/test/Driver/Dependencies/Inputs/private/c.swift b/test/Driver/Dependencies/Inputs/private/c.swift deleted file mode 100644 index 5a75d8ff879c9..0000000000000 --- a/test/Driver/Dependencies/Inputs/private/c.swift +++ /dev/null @@ -1,3 +0,0 @@ -# Dependencies after compilation: -provides-nominal: [c] -depends-nominal: [!private b, e] diff --git a/test/Driver/Dependencies/Inputs/private/d.swift b/test/Driver/Dependencies/Inputs/private/d.swift deleted file mode 100644 index 00e16535c6750..0000000000000 --- a/test/Driver/Dependencies/Inputs/private/d.swift +++ /dev/null @@ -1,3 +0,0 @@ -# Dependencies after compilation: -provides-nominal: [d] -depends-nominal: [c] diff --git a/test/Driver/Dependencies/Inputs/private/e.swift b/test/Driver/Dependencies/Inputs/private/e.swift deleted file mode 100644 index 41ed092552738..0000000000000 --- a/test/Driver/Dependencies/Inputs/private/e.swift +++ /dev/null @@ -1,2 +0,0 @@ -# Dependencies after compilation: -provides-nominal: [e] diff --git a/test/Driver/Dependencies/Inputs/private/output.json b/test/Driver/Dependencies/Inputs/private/output.json deleted file mode 100644 index 497186398e457..0000000000000 --- a/test/Driver/Dependencies/Inputs/private/output.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "./a.swift": { - "object": "./a.o", - "swift-dependencies": "./a.swiftdeps" - }, - "./b.swift": { - "object": "./b.o", - "swift-dependencies": "./b.swiftdeps" - }, - "./c.swift": { - "object": "./c.o", - "swift-dependencies": "./c.swiftdeps" - }, - "./d.swift": { - "object": "./d.o", - "swift-dependencies": "./d.swiftdeps" - }, - "./e.swift": { - "object": "./e.o", - "swift-dependencies": "./e.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/test/Driver/Dependencies/Inputs/touch.py b/test/Driver/Dependencies/Inputs/touch.py deleted file mode 100755 index 85b0908984cec..0000000000000 --- a/test/Driver/Dependencies/Inputs/touch.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python3 -# touch.py - /bin/touch that writes the LLVM epoch -*- python -*- -# -# This source file is part of the Swift.org open source project -# -# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors -# Licensed under Apache License v2.0 with Runtime Library Exception -# -# See https://swift.org/LICENSE.txt for license information -# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -# -# ---------------------------------------------------------------------------- -# -# Like /bin/touch, but takes a time using the system_clock epoch. -# -# ---------------------------------------------------------------------------- - -import glob -import os -import sys - -assert len(sys.argv) >= 2 -timeVal = int(sys.argv[1]) - -# Update the output file mtime, or create it if necessary. -# From http://stackoverflow.com/a/1160227. -for filePathPattern in sys.argv[2:]: - # Support glob patterns if the shell did not expand them (like cmd.exe) - if glob.escape(filePathPattern) == filePathPattern: - # Not a glob pattern. We should touch that specific file. - filePaths = [filePathPattern] - else: - filePaths = glob.glob(filePathPattern) - - for filePath in filePaths: - with open(filePath, 'a'): - os.utime(filePath, (timeVal, timeVal)) diff --git a/test/Driver/Dependencies/Inputs/update-dependencies-bad.py b/test/Driver/Dependencies/Inputs/update-dependencies-bad.py deleted file mode 100755 index 33672973076bf..0000000000000 --- a/test/Driver/Dependencies/Inputs/update-dependencies-bad.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env python3 -# update-dependencies-bad.py - Fails on bad.swift -*- python -*- -# -# This source file is part of the Swift.org open source project -# -# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors -# Licensed under Apache License v2.0 with Runtime Library Exception -# -# See https://swift.org/LICENSE.txt for license information -# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -# -# ---------------------------------------------------------------------------- -# -# Fails if the input file is named "bad.swift" or "crash.swift"; otherwise -# dispatches to update-dependencies.py. "crash.swift" results in an -# exit-by-SIGKILL -# -# ---------------------------------------------------------------------------- - -import os -import shutil -import signal -import subprocess -import sys - -assert sys.argv[2] == '-frontend' - -primaryFile = sys.argv[sys.argv.index('-primary-file') + 1] - -if (os.path.basename(primaryFile) == 'bad.swift' or - os.path.basename(primaryFile) == 'crash.swift'): - print("Handled", os.path.basename(primaryFile)) - - # Replace the dependencies file with the input file. - try: - depsFile = sys.argv[sys.argv.index( - '-emit-reference-dependencies-path') + 1] - - returncode = subprocess.call([sys.argv[1], "--from-yaml", - "--input-filename=" + primaryFile, - "--output-filename=" + depsFile]) - # If the input is not valid YAML, just copy it over verbatim; - # we're testing a case where we produced a corrupted output file. - if returncode != 0: - shutil.copyfile(primaryFile, depsFile) - except ValueError: - pass - - if os.path.basename(primaryFile) == 'bad.swift': - sys.exit(1) - else: - sys.stdout.flush() - os.kill(os.getpid(), signal.SIGKILL) - -execDir = os.path.dirname(os.path.abspath(__file__)) -exec(open(os.path.join(execDir, "update-dependencies.py")).read()) diff --git a/test/Driver/Dependencies/Inputs/update-dependencies.py b/test/Driver/Dependencies/Inputs/update-dependencies.py deleted file mode 100755 index 22a8ca6525a0e..0000000000000 --- a/test/Driver/Dependencies/Inputs/update-dependencies.py +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env python3 -# update-dependencies.py - Fake build for dependency analysis -*- python -*- -# -# This source file is part of the Swift.org open source project -# -# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors -# Licensed under Apache License v2.0 with Runtime Library Exception -# -# See https://swift.org/LICENSE.txt for license information -# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -# -# ---------------------------------------------------------------------------- -# -# Simulates a Swift compilation for the purposes of dependency analysis. -# That means this has two tasks: -# -# 1. Update the main output of the compilation job. -# 2. Update the associated dependencies file, in case anything changed. -# -# Since we only care about the timestamp of the output, the script just makes -# sure the file's mtime is set to $NOW, creating it if it doesn't exist. -# We don't actually care about the content of the input file, either, so we -# actually stick *the new dependencies* in the input file, and copy that over -# the old dependencies (if present). -# -# If invoked in non-primary-file mode, it only creates the output file. -# -# ---------------------------------------------------------------------------- - -import os -import shutil -import subprocess -import sys - -assert sys.argv[2] == '-frontend' - -# NB: The bitcode options automatically specify a -primary-file, even in cases -# where we do not wish to use a dependencies file in the test. -if '-primary-file' in sys.argv \ - and '-embed-bitcode' not in sys.argv and '-emit-bc' not in sys.argv: - primaryFile = sys.argv[sys.argv.index('-primary-file') + 1] - depsFile = sys.argv[sys.argv.index( - '-emit-reference-dependencies-path') + 1] - - returncode = subprocess.call([sys.argv[1], "--from-yaml", - "--input-filename=" + primaryFile, - "--output-filename=" + depsFile]) - if returncode != 0: - # If the input is not valid YAML, just copy it over verbatim; - # we're testing a case where we produced a corrupted output file. - shutil.copyfile(primaryFile, depsFile) -else: - primaryFile = None - -outputFile = sys.argv[sys.argv.index('-o') + 1] - -# Update the output file mtime, or create it if necessary. -# From http://stackoverflow.com/a/1160227. -with open(outputFile, 'a'): - os.utime(outputFile, None) - -if primaryFile: - print("Handled", os.path.basename(primaryFile)) -else: - print("Produced", os.path.basename(outputFile)) diff --git a/test/Driver/Dependencies/README.txt b/test/Driver/Dependencies/README.txt deleted file mode 100644 index f10ee217fe3f0..0000000000000 --- a/test/Driver/Dependencies/README.txt +++ /dev/null @@ -1,28 +0,0 @@ -Many of the tests in this directory are set up to model particular dependency graphs, which are set up via the folders in the Inputs/ directory. Most of these tests describe the dependency graph in ASCII art form at the top of the file. - -a | b Independent files 'a' and 'b' -a ==> b File 'b' depends on file 'a' -a <==> b File 'a' and file 'b' depend on each other -a --> b File 'b' privately depends on file 'a' (normal dependencies cascade) -"./file" ==> a File 'a' depends on external, non-source file './file' - -Because of the way the tests are set up, the dependency information is put into the .swift files; any such test needs to start by "building" everything to copy that information into .swiftdeps files. To avoid timestamp issues, most of these tests start with: - - // RUN: %empty-directory(%t) - // RUN: cp -r %S/Inputs//* %t - // RUN: touch -t 201401240005 %t/* - - -Some tests deal with the dependency graph being updated during the course of an incremental build. These tests have *two* ASCII dependency graphs at the top of the file, illustrating the "before" and "after" cases. This necessitates some additional artwork: - -a +==> b File 'a' changes its "provides" set in a way that affects file 'b' -a ==>+ b File 'b' changes its "depends" set in a way that affects its dependency on file 'a' - -In order to correctly run these tests, the "before" information is put into .swiftdeps files, while the "after" information is put into .swift files. The "after" information will be copied on top of the "before" information for any file that is "built". In order to not rebuild everything, each file also needs a dummy .o output file. - -Most of these tests start with: - - // RUN: %empty-directory(%t) - // RUN: cp -r %S/Inputs//* %t - // RUN: touch -t 201401240005 %t/*.swift - // RUN: touch -t 201401240006 %t/*.o diff --git a/test/Driver/Dependencies/bindings-build-record.swift b/test/Driver/Dependencies/bindings-build-record.swift deleted file mode 100644 index 9f4c60cb34e67..0000000000000 --- a/test/Driver/Dependencies/bindings-build-record.swift +++ /dev/null @@ -1,63 +0,0 @@ -// rdar://103866776 (Swift CI: [main] 1. OSS - Swift ASAN - macOS: Multiple test failures after Swift driver change) -// REQUIRES: rdar103866776 - -// REQUIRES: shell -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/bindings-build-record/* %t -// RUN: %swift-dependency-tool --from-yaml --input-filename=%t/main.swiftdeps.yaml --output-filename=%t/main.swiftdeps -// RUN: %swift-dependency-tool --from-yaml --input-filename=%t/other.swiftdeps.yaml --output-filename=%t/other.swiftdeps - -// Use this testfile to check if the `swift-frontend -swift-dependency-tool` option works. -// RUN: %swift_frontend_plain -swift-dependency-tool --from-yaml --input-filename=%t/yet-another.swiftdeps.yaml --output-filename=%t/yet-another.swiftdeps - -// RUN: %{python} %S/Inputs/touch.py 443865900 %t/* - -// RUN: cd %t && %swiftc_driver -driver-print-bindings ./main.swift ./other.swift ./yet-another.swift -incremental -driver-show-incremental -output-file-map %t/output.json 2>&1 |%FileCheck %s -check-prefix=MUST-EXEC - -// MUST-EXEC-NOT: warning -// MUST-EXEC-DAG: inputs: ["{{(\.\/)?}}main.swift"], output: {object: "{{(\.\/)?}}main.o", swift-dependencies: "{{(\.\/)?}}main.swiftdeps"} -// MUST-EXEC-DAG: inputs: ["{{(\.\/)?}}other.swift"], output: {object: "{{(\.\/)?}}other.o", swift-dependencies: "{{(\.\/)?}}other.swiftdeps"} -// MUST-EXEC-DAG: inputs: ["{{(\.\/)?}}yet-another.swift"], output: {object: "{{(\.\/)?}}yet-another.o", swift-dependencies: "{{(\.\/)?}}yet-another.swiftdeps"} -// MUST-EXEC-DAG: Disabling incremental build: could not read build record - -// RUN: echo '{version: "'$(%swiftc_driver_plain -version | head -n1)'", inputs: {"./main.swift": [443865900, 0], "./other.swift": [443865900, 0], "./yet-another.swift": [443865900, 0]}, build_time: [443865901, 0]}' > %t/main~buildrecord.swiftdeps -// RUN: cd %t && %swiftc_driver -driver-print-bindings ./main.swift ./other.swift ./yet-another.swift -incremental -output-file-map %t/output.json 2>&1 -driver-show-incremental -driver-show-job-lifecycle | %FileCheck %s -check-prefix=NO-EXEC - -// NO-EXEC: inputs: ["{{(\.\/)?}}main.swift"], output: {{[{].*[}]}}{{(, condition: check-dependencies)?}} -// NO-EXEC: inputs: ["{{(\.\/)?}}other.swift"], output: {{[{].*[}]}}{{(, condition: check-dependencies)?}} -// NO-EXEC: inputs: ["{{(\.\/)?}}yet-another.swift"], output: {{[{].*[}]}}{{(, condition: check-dependencies)?}} - - -// RUN: echo '{version: "'$(%swiftc_driver_plain -version | head -n1)'", inputs: {"./main.swift": [443865900, 0], "./other.swift": !private [443865900, 0], "./yet-another.swift": !dirty [443865900, 0]}, build_time: [443865901, 0]}' > %t/main~buildrecord.swiftdeps -// RUN: cd %t && %swiftc_driver -driver-print-bindings ./main.swift ./other.swift ./yet-another.swift -incremental -output-file-map %t/output.json 2>&1 | %FileCheck %s -check-prefix=BUILD-RECORD - -// BUILD-RECORD: inputs: ["{{(\.\/)?}}main.swift"], output: {{[{].*[}]}}{{(, condition: check-dependencies$)?}} -// BUILD-RECORD: inputs: ["{{(\.\/)?}}other.swift"], output: {{[{].*[}]}}{{(, condition: run-without-cascading$)?}} -// BUILD-RECORD: inputs: ["{{(\.\/)?}}yet-another.swift"], output: {{[{].*[}]$}} - -// RUN: cd %t && %swiftc_driver -driver-print-bindings ./main.swift ./other.swift ./yet-another.swift ./added.swift -incremental -output-file-map %t/output.json 2>&1 > %t/added.txt -// RUN: %FileCheck %s -check-prefix=BUILD-RECORD < %t/added.txt -// RUN: %FileCheck %s -check-prefix=FILE-ADDED < %t/added.txt - -// FILE-ADDED: inputs: ["{{(\.\/)?}}added.swift"], output: {{[{].*[}]}}{{(, condition: newly-added$)?}} - -// RUN: %{python} %S/Inputs/touch.py 443865960 %t/main.swift -// RUN: cd %t && %swiftc_driver -driver-print-bindings ./main.swift ./other.swift ./yet-another.swift -incremental -output-file-map %t/output.json 2>&1 | %FileCheck %s -check-prefix=BUILD-RECORD-PLUS-CHANGE -// BUILD-RECORD-PLUS-CHANGE: inputs: ["{{(\.\/)?}}main.swift"], output: {{[{].*[}]}}{{(, condition: run-without-cascading)?}} -// BUILD-RECORD-PLUS-CHANGE: inputs: ["{{(\.\/)?}}other.swift"], output: {{[{].*[}]}}{{(, condition: run-without-cascading$)?}} -// BUILD-RECORD-PLUS-CHANGE: inputs: ["{{(\.\/)?}}yet-another.swift"], output: {{[{].*[}]$}} - -// RUN: %{python} %S/Inputs/touch.py 443865900 %t/* -// RUN: cd %t && %swiftc_driver -driver-print-bindings ./main.swift ./other.swift -incremental -output-file-map %t/output.json 2>&1 | %FileCheck %s -check-prefix=FILE-REMOVED -// FILE-REMOVED: inputs: ["{{(\.\/)?}}main.swift"], output: {{[{].*[}]$}} -// FILE-REMOVED: inputs: ["{{(\.\/)?}}other.swift"], output: {{[{].*[}]$}} -// FILE-REMOVED-NOT: yet-another.swift - - -// RUN: echo '{version: "bogus", inputs: {"./main.swift": [443865900, 0], "./other.swift": !private [443865900, 0], "./yet-another.swift": !dirty [443865900, 0]}}' > %t/main~buildrecord.swiftdeps -// RUN: cd %t && %swiftc_driver -driver-print-bindings ./main.swift ./other.swift ./yet-another.swift -incremental -output-file-map %t/output.json 2>&1 | %FileCheck %s -check-prefix=INVALID-RECORD - -// INVALID-RECORD-NOT: warning -// INVALID-RECORD: inputs: ["{{(\.\/)?}}main.swift"], output: {{[{].*[}]$}} -// INVALID-RECORD: inputs: ["{{(\.\/)?}}other.swift"], output: {{[{].*[}]$}} -// INVALID-RECORD: inputs: ["{{(\.\/)?}}yet-another.swift"], output: {{[{].*[}]$}} diff --git a/test/Driver/Dependencies/chained-additional-kinds-fine.swift b/test/Driver/Dependencies/chained-additional-kinds-fine.swift deleted file mode 100644 index 73c31b8fd6aa5..0000000000000 --- a/test/Driver/Dependencies/chained-additional-kinds-fine.swift +++ /dev/null @@ -1,26 +0,0 @@ -// other ==> main ==> yet-another - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/chained-additional-kinds-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift ./yet-another.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST: Handled main.swift -// CHECK-FIRST: Handled other.swift -// CHECK-FIRST: Handled yet-another.swift - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift ./yet-another.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// CHECK-SECOND-NOT: Handled - -// RUN: touch -t 201401240006 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift ./yet-another.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s - -// CHECK-THIRD-DAG: Handled other.swift -// CHECK-THIRD-DAG: Handled main.swift -// CHECK-THIRD-DAG: Handled yet-another.swift - -// RUN: touch -t 201401240007 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./other.swift ./main.swift ./yet-another.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s diff --git a/test/Driver/Dependencies/chained-after-fine.swift b/test/Driver/Dependencies/chained-after-fine.swift deleted file mode 100644 index 7a0d7d7ce17a9..0000000000000 --- a/test/Driver/Dependencies/chained-after-fine.swift +++ /dev/null @@ -1,23 +0,0 @@ -/// other ==> main | yet-another -/// other ==> main +==> yet-another - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/chained-after-fine/* %t -// RUN: touch -t 201401240005 %t/*.swift - -// Generate the build record... -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift ./yet-another.swift -module-name main -j1 -v - -// ...then reset the .swiftdeps files. -// RUN: cp -r %S/Inputs/chained-after-fine/*.swiftdeps %t -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift ./yet-another.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST-NOT: Handled - -// RUN: touch -t 201401240006 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./yet-another.swift ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s - -// CHECK-THIRD: Handled main.swift -// CHECK-THIRD: Handled other.swift -// CHECK-THIRD: Handled yet-another.swift diff --git a/test/Driver/Dependencies/chained-fine.swift b/test/Driver/Dependencies/chained-fine.swift deleted file mode 100644 index 5a0d32815277c..0000000000000 --- a/test/Driver/Dependencies/chained-fine.swift +++ /dev/null @@ -1,32 +0,0 @@ -// other ==> main ==> yet-another - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/chained-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift ./yet-another.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST: Handled main.swift -// CHECK-FIRST: Handled other.swift -// CHECK-FIRST: Handled yet-another.swift - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift ./yet-another.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// CHECK-SECOND-NOT: Handled - -// RUN: touch -t 201401240006 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift ./yet-another.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s - -// CHECK-THIRD-DAG: Handled other.swift -// CHECK-THIRD-DAG: Handled main.swift -// CHECK-THIRD-DAG: Handled yet-another.swift - -// RUN: touch -t 201401240007 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./other.swift ./main.swift ./yet-another.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s - -// RUN: touch -t 201401240008 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./yet-another.swift ./other.swift ./main.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s - -// RUN: touch -t 201401240009 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./other.swift ./yet-another.swift ./main.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s diff --git a/test/Driver/Dependencies/chained-private-after-fine.swift b/test/Driver/Dependencies/chained-private-after-fine.swift deleted file mode 100644 index 380a685ff55bb..0000000000000 --- a/test/Driver/Dependencies/chained-private-after-fine.swift +++ /dev/null @@ -1,23 +0,0 @@ -/// other --> main ==> yet-another -/// other ==>+ main ==> yet-another - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/chained-private-after-fine/* %t -// RUN: touch -t 201401240005 %t/*.swift - -// Generate the build record... -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift ./yet-another.swift -module-name main -j1 -v - -// ...then reset the .swiftdeps files. -// RUN: cp -r %S/Inputs/chained-private-after-fine/*.swiftdeps %t -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift ./yet-another.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST-NOT: Handled - -// RUN: touch -t 201401240006 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./yet-another.swift ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// CHECK-SECOND-DAG: Handled other.swift -// CHECK-SECOND-DAG: Handled main.swift -// CHECK-SECOND: Handled yet-another.swift diff --git a/test/Driver/Dependencies/chained-private-after-multiple-fine.swift b/test/Driver/Dependencies/chained-private-after-multiple-fine.swift deleted file mode 100644 index 1d38e5376898c..0000000000000 --- a/test/Driver/Dependencies/chained-private-after-multiple-fine.swift +++ /dev/null @@ -1,27 +0,0 @@ -/// other --> main ==> yet-another -/// other ==>+ main ==> yet-another - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/chained-private-after-multiple-fine/* %t -// RUN: touch -t 201401240005 %t/*.swift - -// Generate the build record... -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift ./yet-another.swift -module-name main -j1 -v - - - - -// ...then reset the .swiftdeps files. -// RUN: cp -r %S/Inputs/chained-private-after-multiple-fine/*.swiftdeps %t - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift ./yet-another.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST-NOT: Handled - -// RUN: touch -t 201401240006 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./yet-another.swift ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// CHECK-SECOND-DAG: Handled other.swift -// CHECK-SECOND-DAG: Handled main.swift -// CHECK-SECOND-DAG: Handled yet-another.swift diff --git a/test/Driver/Dependencies/chained-private-after-multiple-nominal-members-fine.swift b/test/Driver/Dependencies/chained-private-after-multiple-nominal-members-fine.swift deleted file mode 100644 index 9218fccb1c488..0000000000000 --- a/test/Driver/Dependencies/chained-private-after-multiple-nominal-members-fine.swift +++ /dev/null @@ -1,23 +0,0 @@ -/// other --> main ==> yet-another -/// other ==>+ main ==> yet-another - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/chained-private-after-multiple-nominal-members-fine/* %t -// RUN: touch -t 201401240005 %t/*.swift - -// Generate the build record... -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift ./yet-another.swift -module-name main -j1 -v - -// ...then reset the .swiftdeps files. -// RUN: cp -r %S/Inputs/chained-private-after-multiple-nominal-members-fine/*.swiftdeps %t -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift ./yet-another.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST-NOT: Handled - -// RUN: touch -t 201401240006 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./yet-another.swift ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// CHECK-SECOND-DAG: Handled other.swift -// CHECK-SECOND-DAG: Handled main.swift -// CHECK-SECOND-DAG: Handled yet-another.swift diff --git a/test/Driver/Dependencies/chained-private-fine.swift b/test/Driver/Dependencies/chained-private-fine.swift deleted file mode 100644 index 7f033e10493e0..0000000000000 --- a/test/Driver/Dependencies/chained-private-fine.swift +++ /dev/null @@ -1,30 +0,0 @@ -/// other --> main ==> yet-another - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/chained-private-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift ./yet-another.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST: Handled main.swift -// CHECK-FIRST: Handled other.swift -// CHECK-FIRST: Handled yet-another.swift - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift ./yet-another.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// CHECK-SECOND-NOT: Handled - -// RUN: touch -t 201401240006 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift ./yet-another.swift -module-name main -j1 -v >%t/outputToCheck 2>&1 -// RUN: %FileCheck -check-prefix=CHECK-THIRD %s < %t/outputToCheck - -// Driver now schedules jobs in the order the inputs were given, but -// either order is fine. -// CHECK-THIRD-DAG: Handled main.swift -// CHECK-THIRD-DAG: Handled other.swift - -// RUN: %FileCheck -check-prefix=CHECK-THIRD-EXCLUSION %s < %t/outputToCheck - -// CHECK-THIRD-EXCLUSION-NOT: Handled yet-another.swift - diff --git a/test/Driver/Dependencies/check-interface-implementation-fine.swift b/test/Driver/Dependencies/check-interface-implementation-fine.swift deleted file mode 100644 index b919cde40376e..0000000000000 --- a/test/Driver/Dependencies/check-interface-implementation-fine.swift +++ /dev/null @@ -1,43 +0,0 @@ -// rdar://103866776 (Swift CI: [main] 1. OSS - Swift ASAN - macOS: Multiple test failures after Swift driver change) -// REQUIRES: rdar103866776 - -/// The fine-grained dependency graph has implicit dependencies from interfaces to implementations. -/// These are not presently tested because depends nodes are marked as depending in the interface, -/// as of 1/9/20. But this test will check fail if those links are not followed. - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/check-interface-implementation-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./c.swift ./bad.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s -// RUN: %FileCheck -check-prefix=CHECK-RECORD-CLEAN %s < %t/main~buildrecord.swiftdeps - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST: Handled a.swift -// CHECK-FIRST: Handled c.swift -// CHECK-FIRST: Handled bad.swift - -// CHECK-RECORD-CLEAN-DAG: "{{(./)?}}a.swift": [ -// CHECK-RECORD-CLEAN-DAG: "{{(./)?}}bad.swift": [ -// CHECK-RECORD-CLEAN-DAG: "{{(./)?}}c.swift": [ - - -// RUN: touch -t 201401240006 %t/a.swift -// RUN: cd %t && not %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies-bad.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./bad.swift ./c.swift -module-name main -j1 -v -driver-show-incremental > %t/a.txt 2>&1 -// RUN: %FileCheck -check-prefix=CHECK-A %s < %t/a.txt -// RUN: %FileCheck -check-prefix=NEGATIVE-A %s < %t/a.txt -// RUN: %FileCheck -check-prefix=CHECK-RECORD-A %s < %t/main~buildrecord.swiftdeps - -// CHECK-A: Handled a.swift -// CHECK-A: Handled bad.swift -// NEGATIVE-A-NOT: Handled c.swift - -// CHECK-RECORD-A-DAG: "{{(./)?}}a.swift": [ -// CHECK-RECORD-A-DAG: "{{(./)?}}bad.swift": !private [ -// CHECK-RECORD-A-DAG: "{{(./)?}}c.swift": !private [ - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./bad.swift ./c.swift -module-name main -j1 -v -driver-show-incremental 2>&1 | %FileCheck -check-prefix CHECK-BC %s - -// CHECK-BC-NOT: Handled a.swift -// CHECK-BC-DAG: Handled bad.swift -// CHECK-BC-DAG: Handled c.swift diff --git a/test/Driver/Dependencies/crash-added-fine.swift b/test/Driver/Dependencies/crash-added-fine.swift deleted file mode 100644 index affc2a60115ba..0000000000000 --- a/test/Driver/Dependencies/crash-added-fine.swift +++ /dev/null @@ -1,42 +0,0 @@ -// rdar://103866776 (Swift CI: [main] 1. OSS - Swift ASAN - macOS: Multiple test failures after Swift driver change) -// REQUIRES: rdar103866776 - -/// crash ==> main | crash --> other - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/crash-simple-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-INITIAL %s - -// CHECK-INITIAL-NOT: warning -// CHECK-INITIAL: Handled main.swift -// CHECK-INITIAL: Handled other.swift - -// RUN: cd %t && not %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies-bad.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift ./crash.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-ADDED %s -// RUN: %FileCheck -check-prefix=CHECK-RECORD-ADDED %s < %t/main~buildrecord.swiftdeps - -// CHECK-ADDED-NOT: Handled -// CHECK-ADDED: Handled crash.swift -// CHECK-ADDED-NOT: Handled - -// CHECK-RECORD-ADDED-DAG: "{{(./)?}}crash.swift": !private [ -// CHECK-RECORD-ADDED-DAG: "{{(./)?}}main.swift": [ -// CHECK-RECORD-ADDED-DAG: "{{(./)?}}other.swift": [ - - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/crash-simple-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-INITIAL %s - -// RUN: cd %t && not %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies-bad.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./crash.swift ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-ADDED %s -// RUN: %FileCheck -check-prefix=CHECK-RECORD-ADDED %s < %t/main~buildrecord.swiftdeps - - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./crash.swift ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIXED %s - -// CHECK-FIXED-DAG: Handled crash.swift -// CHECK-FIXED-DAG: Handled main.swift -// CHECK-FIXED-DAG: Handled other.swift diff --git a/test/Driver/Dependencies/crash-new-fine.swift b/test/Driver/Dependencies/crash-new-fine.swift deleted file mode 100644 index e34c6763c5d99..0000000000000 --- a/test/Driver/Dependencies/crash-new-fine.swift +++ /dev/null @@ -1,76 +0,0 @@ -/// crash ==> main | crash --> other - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/crash-simple-with-swiftdeps-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// Initially compile all inputs, crash will fail. - -// RUN: cd %t && not %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies-bad.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./crash.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck %s -// CHECK-NOT: warning -// CHECK: Handled main.swift -// CHECK: Handled crash.swift -// CHECK-NOT: Handled other.swift - -// Put crash.swift first to assure it gets scheduled first. -// The others get queued, but not dispatched because crash crashes. - -// RUN: cd %t && not %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies-bad.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./crash.swift ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-BAD-ONLY %s - -// CHECK-BAD-ONLY-NOT: warning -// CHECK-BAD-ONLY-NOT: Handled -// CHECK-BAD-ONLY: Handled crash.swift -// CHECK-BAD-ONLY-NOT: Handled - -// Make crash succeed and all get compiled, exactly once. - -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./crash.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-OKAY %s -// CHECK-OKAY: Handled main.swift -// CHECK-OKAY: Handled crash.swift -// CHECK-OKAY: Handled other.swift -// CHECK-OKAY-NOT: Handled - -// Make crash crash again: - -// RUN: touch -t 201401240006 %t/crash.swift -// RUN: rm %t/crash.swiftdeps -// RUN: cd %t && not %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies-bad.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./crash.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck %s - -// And repair crash: - -// RUN: touch -t 201401240005 %t/* -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./crash.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-OKAY-2 %s - -// CHECK-OKAY-2-DAG: Handled crash.swift -// CHECK-OKAY-2-DAG: Handled other.swift -// CHECK-OKAY-2-DAG: Handled main.swift - -// Touch main so its newer, remove main.swiftdeps and make crash crash: -// Driver will fall back to non-incremental, will compile main, -// will compile crash, and then stop. - -// RUN: touch -t 201401240006 %t/main.swift -// RUN: rm %t/main.swiftdeps -// RUN: cd %t && not %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies-bad.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./crash.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-NO-MAIN-SWIFTDEPS %s - -// CHECK-NO-MAIN-SWIFTDEPS-NOT: warning -// CHECK-NO-MAIN-SWIFTDEPS: Handled main.swift -// CHECK-NO-MAIN-SWIFTDEPS: Handled crash.swift -// CHECK-NO-MAIN-SWIFTDEPS-NOT: Handled other.swift - - -// Touch all files earlier than last compiled date in the build record. - -// RUN: touch -t 201401240005 %t/* -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./crash.swift ./other.swift -module-name main -j1 -v 2>&1 -driver-show-incremental | %FileCheck -check-prefix=CHECK-CURRENT-WITH-CRASH %s - -// CHECK-CURRENT-WITH-CRASH: Handled main.swift -// CHECK-CURRENT-WITH-CRASH: Handled crash.swift -// CHECK-CURRENT-WITH-CRASH: Handled other.swift -// CHECK-CURRENT-WITH-CRASH-NOT: Handled - -// Touch other, but remove its swiftdeps. Should compile everything. - -// RUN: touch -t 201401240006 %t/other.swift -// RUN: rm %t/other.swiftdeps -// RUN: cd %t && not %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies-bad.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./crash.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck %s diff --git a/test/Driver/Dependencies/crash-simple-fine.swift b/test/Driver/Dependencies/crash-simple-fine.swift deleted file mode 100644 index 986ec65d13cd4..0000000000000 --- a/test/Driver/Dependencies/crash-simple-fine.swift +++ /dev/null @@ -1,34 +0,0 @@ -// rdar://103866776 (Swift CI: [main] 1. OSS - Swift ASAN - macOS: Multiple test failures after Swift driver change) -// REQUIRES: rdar103866776 - -/// crash ==> main | crash --> other - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/crash-simple-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./crash.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST: Handled main.swift -// CHECK-FIRST: Handled crash.swift -// CHECK-FIRST: Handled other.swift - -// RUN: touch -t 201401240006 %t/crash.swift -// RUN: cd %t && not %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies-bad.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./crash.swift ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// CHECK-SECOND: Handled crash.swift -// CHECK-SECOND-NOT: Handled main.swift -// CHECK-SECOND-NOT: Handled other.swift - -// RUN: %FileCheck -check-prefix=CHECK-RECORD %s < %t/main~buildrecord.swiftdeps - -// CHECK-RECORD-DAG: "{{(./)?}}crash.swift": !private [ -// CHECK-RECORD-DAG: "{{(./)?}}main.swift": !private [ -// CHECK-RECORD-DAG: "{{(./)?}}other.swift": !private [ - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./crash.swift ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s - -// CHECK-THIRD-DAG: Handled main.swift -// CHECK-THIRD-DAG: Handled crash.swift -// CHECK-THIRD-DAG: Handled other.swift diff --git a/test/Driver/Dependencies/dependencies-preservation-fine.swift b/test/Driver/Dependencies/dependencies-preservation-fine.swift deleted file mode 100644 index be468b4f6b33b..0000000000000 --- a/test/Driver/Dependencies/dependencies-preservation-fine.swift +++ /dev/null @@ -1,23 +0,0 @@ -// rdar://103866776 (Swift CI: [main] 1. OSS - Swift ASAN - macOS: Multiple test failures after Swift driver change) -// REQUIRES: rdar103866776 - -// REQUIRES: shell -// Verify that the top-level build record file from the last incremental -// compilation is preserved with the same name, suffixed by a '~'. - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way-fine/* %t -// RUN: %{python} %S/Inputs/touch.py 443865900 %t/* -// RUN: echo '{version: "'$(%swiftc_driver_plain -version | head -n1)'", inputs: {"./main.swift": [443865900, 0], "./other.swift": [443865900, 0]}}' > %t/main~buildrecord.swiftdeps -// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json - -// RUN: %FileCheck -check-prefix CHECK-ORIGINAL %s < main~buildrecord.swiftdeps~ -// CHECK-ORIGINAL: inputs: {"{{(./)?}}main.swift": [443865900, 0], "{{(./)?}}other.swift": [443865900, 0]} - -// RUN: %FileCheck -check-prefix CHECK-OVERWRITTEN %s < main~buildrecord.swiftdeps -// CHECK-OVERWRITTEN: version: "{{.*}}" -// CHECK-OVERWRITTEN: options: "{{.*}}" -// CHECK-OVERWRITTEN: build_{{(start_)?}}time: [{{[0-9]*}}, {{[0-9]*}}] -// CHECK-OVERWRITTEN: inputs: -// CHECK-OVERWRITTEN: "{{(./)?}}main.swift": [443865900, 0] -// CHECK-OVERWRITTEN: "{{(./)?}}other.swift": [443865900, 0] diff --git a/test/Driver/Dependencies/driver-show-incremental-arguments-fine.swift b/test/Driver/Dependencies/driver-show-incremental-arguments-fine.swift deleted file mode 100644 index 0b8bb103e9a29..0000000000000 --- a/test/Driver/Dependencies/driver-show-incremental-arguments-fine.swift +++ /dev/null @@ -1,28 +0,0 @@ -// rdar://103866776 (Swift CI: [main] 1. OSS - Swift ASAN - macOS: Multiple test failures after Swift driver change) -// REQUIRES: rdar103866776 - -// REQUIRES: shell -// Test that when: -// -// 1. Using -incremental -v -driver-show-incremental, and... -// 2. ...the arguments passed to the Swift compiler version differ from the ones -// used in the original compilation... -// -// ...then the driver prints a message indicating that incremental compilation -// is disabled. - - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way-with-swiftdeps-fine/* %t -// RUN: %{python} %S/Inputs/touch.py 443865900 %t/* -// RUN: echo '{version: "'$(%swiftc_driver_plain -version | head -n1)'", inputs: {"./main.swift": [443865900, 0], "./other.swift": [443865900, 0]}}' > %t/main~buildrecord.swiftdeps - -// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-INCREMENTAL %s -// CHECK-INCREMENTAL-NOT: Incremental compilation has been disabled -// CHECK-INCREMENTAL: Queuing (initial): {compile: main.o <= main.swift} - -// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -g -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-ARGS-MISMATCH %s -// CHECK-ARGS-MISMATCH: Incremental compilation has been disabled{{.*}}different arguments -// CHECK-ARGS-MISMATCH-NOT: Queuing (initial): {compile: main.o <= main.swift} - - diff --git a/test/Driver/Dependencies/driver-show-incremental-conflicting-arguments-fine.swift b/test/Driver/Dependencies/driver-show-incremental-conflicting-arguments-fine.swift deleted file mode 100644 index 825967b24ab5b..0000000000000 --- a/test/Driver/Dependencies/driver-show-incremental-conflicting-arguments-fine.swift +++ /dev/null @@ -1,35 +0,0 @@ -// rdar://103866776 (Swift CI: [main] 1. OSS - Swift ASAN - macOS: Multiple test failures after Swift driver change) -// REQUIRES: rdar103866776 - -// REQUIRES: shell -// Test that when: -// -// 1. Using -incremental -v -driver-show-incremental, but... -// 2. ...options that disable incremental compilation, such as whole module -// optimization or bitcode embedding are specified... -// -// ...then the driver prints a message indicating that incremental compilation -// is disabled. If both are specified, the driver should only print one message. - - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way-with-swiftdeps-fine/* %t -// RUN: %{python} %S/Inputs/touch.py 443865900 %t/* -// RUN: echo '{version: "'$(%swiftc_driver_plain -version | head -n1)'", inputs: {"./main.swift": [443865900, 0], "./other.swift": [443865900, 0]}}' > %t/main~buildrecord.swiftdeps - -// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-INCREMENTAL %s -// CHECK-INCREMENTAL-NOT: Incremental compilation has been disabled -// CHECK-INCREMENTAL: Queuing (initial): {compile: main.o <= main.swift} - -// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -whole-module-optimization -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-WMO %s -// CHECK-WMO: Incremental compilation has been disabled{{.*}}whole module optimization -// CHECK-WMO-NOT: Queuing (initial): {compile: main.o <= main.swift} - -// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -embed-bitcode -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-BITCODE %s -// CHECK-BITCODE: Incremental compilation has been disabled{{.*}}LLVM IR bitcode -// CHECK-BITCODE-NOT: Queuing (initial): {compile: main.o <= main.swift} - -// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -whole-module-optimization -embed-bitcode -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-WMO-AND-BITCODE %s -// CHECK-WMO-AND-BITCODE: Incremental compilation has been disabled{{.*}}whole module optimization -// CHECK-WMO-AND-BITCODE-NOT: Incremental compilation has been disabled -// CHECK-WMO-AND-BITCODE-NOT: Queuing (initial): {compile: main.o <= main.swift} diff --git a/test/Driver/Dependencies/driver-show-incremental-inputs-fine.swift b/test/Driver/Dependencies/driver-show-incremental-inputs-fine.swift deleted file mode 100644 index 8e660846eda02..0000000000000 --- a/test/Driver/Dependencies/driver-show-incremental-inputs-fine.swift +++ /dev/null @@ -1,27 +0,0 @@ -// rdar://103866776 (Swift CI: [main] 1. OSS - Swift ASAN - macOS: Multiple test failures after Swift driver change) -// REQUIRES: rdar103866776 - -// REQUIRES: shell -// Test that when: -// -// 1. Using -incremental -v -driver-show-incremental, and... -// 2. ...the inputs passed to the Swift compiler version differ from the ones -// used in the original compilation... -// -// ...then the driver prints a message indicating that incremental compilation -// is disabled. - - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way-with-swiftdeps-fine/* %t -// RUN: %{python} %S/Inputs/touch.py 443865900 %t/* -// RUN: echo '{version: "'$(%swiftc_driver_plain -version | head -n1)'", inputs: {"./main.swift": [443865900, 0], "./other.swift": [443865900, 0]}}' > %t/main~buildrecord.swiftdeps - -// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-INCREMENTAL %s -// CHECK-INCREMENTAL-NOT: Incremental compilation has been disabled -// CHECK-INCREMENTAL: Queuing (initial): {compile: main.o <= main.swift} - -// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-INPUTS-MISMATCH %s -// CHECK-INPUTS-MISMATCH: Incremental compilation has been disabled{{.*}}inputs -// CHECK-INPUTS-MISMATCH: {{(./)?}}other.swift -// CHECK-INPUTS-MISMATCH-NOT: Queuing (initial): {compile: main.o <= main.swift} diff --git a/test/Driver/Dependencies/driver-show-incremental-malformed-fine.swift b/test/Driver/Dependencies/driver-show-incremental-malformed-fine.swift deleted file mode 100644 index 7f547dd25a339..0000000000000 --- a/test/Driver/Dependencies/driver-show-incremental-malformed-fine.swift +++ /dev/null @@ -1,39 +0,0 @@ -// rdar://103866776 (Swift CI: [main] 1. OSS - Swift ASAN - macOS: Multiple test failures after Swift driver change) -// REQUIRES: rdar103866776 - -// REQUIRES: shell -// Test that when: -// -// 1. Using -incremental -v -driver-show-incremental, and... -// 2. ...the build record file does not contain valid JSON... -// -// ...then the driver prints a message indicating that incremental compilation -// is enabled. - - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way-with-swiftdeps-fine/* %t -// RUN: %{python} %S/Inputs/touch.py 443865900 %t/* - -// RUN: echo '{version: "'$(%swiftc_driver_plain -version | head -n1)'", inputs: {"./main.swift": [443865900, 0], "./other.swift": [443865900, 0]}}' > %t/main~buildrecord.swiftdeps -// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-INCREMENTAL %s -// CHECK-INCREMENTAL-NOT: Incremental compilation has been enabled -// CHECK-INCREMENTAL: Queuing (initial): {compile: main.o <= main.swift} - -// RUN: rm %t/main~buildrecord.swiftdeps && touch %t/main~buildrecord.swiftdeps -// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -g -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-MALFORMED %s - -// RUN: echo 'foo' > %t/main~buildrecord.swiftdeps -// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -g -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-MALFORMED %s - -// CHECK-MALFORMED: Incremental compilation has been disabled{{.*}}malformed build record file -// CHECK-MALFORMED-NOT: Queuing (initial): {compile: main.o <= main.swift} - -// RUN: echo '{version, inputs: {"./main.swift": [443865900, 0], "./other.swift": [443865900, 0]}}' > %t/main~buildrecord.swiftdeps -// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -g -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-MISSING-KEY %s - -// RUN: echo '{version: "'$(%swiftc_driver_plain -version | head -n1)'", inputs}' > %t/main~buildrecord.swiftdeps -// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -g -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-MISSING-KEY %s - -// CHECK-MISSING-KEY: Incremental compilation has been disabled{{.*}}malformed build record file{{.*}}Malformed value for key -// CHECK-MISSING-KEY-NOT: Queuing (initial): {compile: main.o <= main.swift} diff --git a/test/Driver/Dependencies/driver-show-incremental-mutual-fine.swift b/test/Driver/Dependencies/driver-show-incremental-mutual-fine.swift deleted file mode 100644 index ac9d4cd1dd26c..0000000000000 --- a/test/Driver/Dependencies/driver-show-incremental-mutual-fine.swift +++ /dev/null @@ -1,22 +0,0 @@ -// rdar://103866776 (Swift CI: [main] 1. OSS - Swift ASAN - macOS: Multiple test failures after Swift driver change) -// REQUIRES: rdar103866776 - -/// main <==> other - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/mutual-with-swiftdeps-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v -driver-show-incremental 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s -// CHECK-FIRST-DAG: Handled main.swift -// CHECK-FIRST-DAG: Handled other.swift -// CHECK-FIRST-DAG: Disabling incremental build: could not read build record - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v -driver-show-incremental 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s -// CHECK-SECOND-NOT: Queuing - -// RUN: touch -t 201401240006 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v -driver-show-incremental 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s -// CHECK-THIRD: Queuing (initial): {compile: other.o <= other.swift} -// CHECK-THIRD-DAG: Queuing because of the initial set: {compile: main.o <= main.swift} -// CHECK-THIRD-DAG: interface of top-level name 'a' in other.swift -> interface of source file {{from main.swiftdeps in main.swift|main.swiftdeps}} diff --git a/test/Driver/Dependencies/driver-show-incremental-swift-version-fine.swift b/test/Driver/Dependencies/driver-show-incremental-swift-version-fine.swift deleted file mode 100644 index 21d99099a78e9..0000000000000 --- a/test/Driver/Dependencies/driver-show-incremental-swift-version-fine.swift +++ /dev/null @@ -1,29 +0,0 @@ -// rdar://103866776 (Swift CI: [main] 1. OSS - Swift ASAN - macOS: Multiple test failures after Swift driver change) -// REQUIRES: rdar103866776 - -// REQUIRES: shell -// Test that when: -// -// 1. Using -incremental -v -driver-show-incremental, and... -// 2. ...the Swift compiler version used to perform the incremental -// compilation differs the original compilation... -// -// ...then the driver prints a message indicating that incremental compilation -// is enabled. - - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way-with-swiftdeps-fine/* %t -// RUN: %{python} %S/Inputs/touch.py 443865900 %t/* - -// RUN: echo '{version: "'$(%swiftc_driver_plain -version | head -n1)'", inputs: {"./main.swift": [443865900, 0], "./other.swift": [443865900, 0]}}' > %t/main~buildrecord.swiftdeps -// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-INCREMENTAL %s -// CHECK-INCREMENTAL-NOT: Incremental compilation has been enabled -// CHECK-INCREMENTAL: Queuing (initial): {compile: main.o <= main.swift} - -// RUN: echo '{version: "bogus", inputs: {"./main.swift": [443865900, 0], "./other.swift": [443865900, 0]}}' > %t/main~buildrecord.swiftdeps -// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json 2>&1 | %FileCheck --check-prefix CHECK-VERSION-MISMATCH %s -// CHECK-VERSION-MISMATCH: Incremental compilation has been disabled{{.*}}compiler version mismatch -// CHECK-VERSION-MISMATCH: Compiling with: -// CHECK-VERSION-MISMATCH: Previously compiled with: bogus -// CHECK-VERSION-MISMATCH-NOT: Queuing (initial): {compile: main.o <= main.swift} diff --git a/test/Driver/Dependencies/embed-bitcode-parallel-fine.swift b/test/Driver/Dependencies/embed-bitcode-parallel-fine.swift deleted file mode 100644 index 7de76d754371c..0000000000000 --- a/test/Driver/Dependencies/embed-bitcode-parallel-fine.swift +++ /dev/null @@ -1,99 +0,0 @@ -// Windows doesn't support parallel execution yet -// XFAIL: OS=windows-msvc -// REQUIRES: rdar118461748 -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/fake-build-for-bitcode.py" -output-file-map %t/output.json -incremental ./main.swift ./other.swift -embed-bitcode -module-name main -j1 -parseable-output >%t/first.json 2>&1 - -// RUN: %FileCheck -check-prefix=CHECK-FIRST %s <%t/first.json -// RUN: %FileCheck -check-prefix=CHECK-FIRST %s <%t/first.json -// RUN: %FileCheck -check-prefix=CHECK-FIRST %s <%t/first.json -// RUN: %FileCheck -check-prefix=CHECK-FIRST %s <%t/first.json -// RUN: %FileCheck -check-prefix=CHECK-FIRST %s <%t/first.json - -// CHECK-FIRST-NOT: warning - -// CHECK-FIRST: {{^{$}} -// CHECK-FIRST-DAG: "kind"{{ ?}}: "began" -// CHECK-FIRST-DAG: "name"{{ ?}}: "compile" -// CHECK-FIRST-DAG: "{{(.\\/)?}}main.swift" -// CHECK-FIRST: {{^}$}} - -// CHECK-FIRST: {{^{$}} -// CHECK-FIRST-DAG: "kind"{{ ?}}: "finished" -// CHECK-FIRST-DAG: "name"{{ ?}}: "compile" -// CHECK-FIRST-DAG: "output"{{ ?}}: "Handled main.swift\n" -// CHECK-FIRST: {{^}$}} - -// CHECK-FIRST: {{^{$}} -// CHECK-FIRST-DAG: "kind"{{ ?}}: "began" -// CHECK-FIRST-DAG: "name"{{ ?}}: "compile" -// CHECK-FIRST-DAG: "{{(.\\/)?}}other.swift" -// CHECK-FIRST: {{^}$}} - -// CHECK-FIRST: {{^{$}} -// CHECK-FIRST-DAG: "kind"{{ ?}}: "finished" -// CHECK-FIRST-DAG: "name"{{ ?}}: "compile" -// CHECK-FIRST-DAG: "output"{{ ?}}: "Handled other.swift\n" -// CHECK-FIRST: {{^}$}} - -// CHECK-FIRST: {{^{$}} -// CHECK-FIRST-DAG: "kind"{{ ?}}: "began" -// CHECK-FIRST-DAG: "name"{{ ?}}: "backend" -// CHECK-FIRST-DAG: "{{(.\\/)?}}main.o" -// CHECK-FIRST: {{^}$}} - -// CHECK-FIRST: {{^{$}} -// CHECK-FIRST-DAG: "kind"{{ ?}}: "finished" -// CHECK-FIRST-DAG: "name"{{ ?}}: "backend" -// CHECK-FIRST-DAG: "output"{{ ?}}: "Produced main.o\n" -// CHECK-FIRST: {{^}$}} - -// CHECK-FIRST: {{^{$}} -// CHECK-FIRST-DAG: "kind"{{ ?}}: "began" -// CHECK-FIRST-DAG: "name"{{ ?}}: "backend" -// CHECK-FIRST-DAG: "{{(.\\/)?}}other.o" -// CHECK-FIRST: {{^}$}} - -// CHECK-FIRST: {{^{$}} -// CHECK-FIRST-DAT: "kind"{{ ?}}: "finished" -// CHECK-FIRST-DAT: "name"{{ ?}}: "backend" -// CHECK-FIRST-DAT: "output"{{ ?}}: "Produced other.o\n" -// CHECK-FIRST: {{^}$}} - - -// RUN: touch -t 201401240006 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/fake-build-for-bitcode.py" -output-file-map %t/output.json -incremental ./main.swift ./other.swift -embed-bitcode -module-name main -j2 -parseable-output 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// CHECK-SECOND-DAG: "kind"{{ ?}}: "began" -// CHECK-SECOND-DAG: "name"{{ ?}}: "compile" -// CHECK-SECOND-DAG: "{{(.\\/)?}}main.swift" -// CHECK-SECOND: {{^}$}} - -// CHECK-SECOND-NOT: finished - -// CHECK-SECOND-DAG: "kind"{{ ?}}: "began" -// CHECK-SECOND-DAG: "name"{{ ?}}: "compile" -// CHECK-SECOND-DAG: "{{(.\\/)?}}other.swift" -// CHECK-SECOND: {{^}$}} - -// CHECK-SECOND-NOT: began - -// CHECK-SECOND-DAG: "kind"{{ ?}}: "finished" -// CHECK-SECOND-DAG: "name"{{ ?}}: "compile" -// CHECK-SECOND-DAG: "output"{{ ?}}: "Handled {{other.swift|main.swift}}\n" -// CHECK-SECOND: {{^}$}} - -// CHECK-SECOND-DAG: "kind"{{ ?}}: "began" -// CHECK-SECOND-DAG: "name"{{ ?}}: "backend" -// CHECK-SECOND-DAG: "{{(.\\/)?}}{{other.o|main.o}}" -// CHECK-SECOND: {{^}$}} - -// CHECK-SECOND-DAG: "kind"{{ ?}}: "finished" -// CHECK-SECOND-DAG: "name"{{ ?}}: "backend" -// CHECK-SECOND-DAG: "output"{{ ?}}: "Produced {{other.o|main.o}}\n" -// CHECK-SECOND: {{^}$}} - -// CHECK-SECOND-NOT: "skipped" diff --git a/test/Driver/Dependencies/fail-added-fine.swift b/test/Driver/Dependencies/fail-added-fine.swift deleted file mode 100644 index 1b4e48f2eeda4..0000000000000 --- a/test/Driver/Dependencies/fail-added-fine.swift +++ /dev/null @@ -1,35 +0,0 @@ -// rdar://103866776 (Swift CI: [main] 1. OSS - Swift ASAN - macOS: Multiple test failures after Swift driver change) -// REQUIRES: rdar103866776 - -/// bad ==> main | bad --> other - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/fail-simple-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-INITIAL %s - -// CHECK-INITIAL-NOT: warning -// CHECK-INITIAL: Handled main.swift -// CHECK-INITIAL: Handled other.swift - -// RUN: cd %t && not %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies-bad.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift ./bad.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-ADDED %s -// RUN: %FileCheck -check-prefix=CHECK-RECORD-ADDED %s < %t/main~buildrecord.swiftdeps - -// CHECK-ADDED-NOT: Handled -// CHECK-ADDED: Handled bad.swift -// CHECK-ADDED-NOT: Handled - -// CHECK-RECORD-ADDED-DAG: "{{(./)?}}bad.swift": !private [ -// CHECK-RECORD-ADDED-DAG: "{{(./)?}}main.swift": [ -// CHECK-RECORD-ADDED-DAG: "{{(./)?}}other.swift": [ - - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/fail-simple-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-INITIAL %s - -// RUN: cd %t && not %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies-bad.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./bad.swift ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-ADDED %s -// RUN: %FileCheck -check-prefix=CHECK-RECORD-ADDED %s < %t/main~buildrecord.swiftdeps diff --git a/test/Driver/Dependencies/fail-chained-fine.swift b/test/Driver/Dependencies/fail-chained-fine.swift deleted file mode 100644 index c5fee98161303..0000000000000 --- a/test/Driver/Dependencies/fail-chained-fine.swift +++ /dev/null @@ -1,132 +0,0 @@ -// rdar://103866776 (Swift CI: [main] 1. OSS - Swift ASAN - macOS: Multiple test failures after Swift driver change) -// REQUIRES: rdar103866776 - -/// a ==> bad ==> c ==> d | b --> bad --> e ==> f - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/fail-chained-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./b.swift ./c.swift ./d.swift ./e.swift ./f.swift ./bad.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s -// RUN: %FileCheck -check-prefix=CHECK-RECORD-CLEAN %s < %t/main~buildrecord.swiftdeps - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST: Handled a.swift -// CHECK-FIRST: Handled b.swift -// CHECK-FIRST: Handled c.swift -// CHECK-FIRST: Handled d.swift -// CHECK-FIRST: Handled e.swift -// CHECK-FIRST: Handled f.swift -// CHECK-FIRST: Handled bad.swift - -// CHECK-RECORD-CLEAN-DAG: "{{(./)?}}a.swift": [ -// CHECK-RECORD-CLEAN-DAG: "{{(./)?}}b.swift": [ -// CHECK-RECORD-CLEAN-DAG: "{{(./)?}}c.swift": [ -// CHECK-RECORD-CLEAN-DAG: "{{(./)?}}d.swift": [ -// CHECK-RECORD-CLEAN-DAG: "{{(./)?}}e.swift": [ -// CHECK-RECORD-CLEAN-DAG: "{{(./)?}}f.swift": [ -// CHECK-RECORD-CLEAN-DAG: "{{(./)?}}bad.swift": [ - - -// RUN: touch -t 201401240006 %t/a.swift -// RUN: cd %t && not %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies-bad.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./bad.swift ./b.swift ./c.swift ./d.swift ./e.swift ./f.swift -module-name main -j1 -v > %t/a.txt 2>&1 -// RUN: %FileCheck -check-prefix=CHECK-A %s < %t/a.txt -// RUN: %FileCheck -check-prefix=NEGATIVE-A %s < %t/a.txt -// RUN: %FileCheck -check-prefix=CHECK-RECORD-A %s < %t/main~buildrecord.swiftdeps - -// CHECK-A: Handled a.swift -// CHECK-A: Handled bad.swift -// NEGATIVE-A-NOT: Handled b.swift -// NEGATIVE-A-NOT: Handled c.swift -// NEGATIVE-A-NOT: Handled d.swift -// NEGATIVE-A-NOT: Handled e.swift -// NEGATIVE-A-NOT: Handled f.swift - -// CHECK-RECORD-A-DAG: "{{(./)?}}a.swift": [ -// CHECK-RECORD-A-DAG: "{{(./)?}}b.swift": [ -// CHECK-RECORD-A-DAG: "{{(./)?}}c.swift": !private [ -// CHECK-RECORD-A-DAG: "{{(./)?}}d.swift": !private [ -// CHECK-RECORD-A-DAG: "{{(./)?}}e.swift": !private [ -// CHECK-RECORD-A-DAG: "{{(./)?}}f.swift": [ -// CHECK-RECORD-A-DAG: "{{(./)?}}bad.swift": !private [ - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./b.swift ./c.swift ./d.swift ./e.swift ./f.swift ./bad.swift -module-name main -j1 -v > %t/a2.txt 2>&1 -// RUN: %FileCheck -check-prefix=CHECK-A2 %s < %t/a2.txt -// RUN: %FileCheck -check-prefix=NEGATIVE-A2 %s < %t/a2.txt -// RUN: %FileCheck -check-prefix=CHECK-RECORD-CLEAN %s < %t/main~buildrecord.swiftdeps - -// CHECK-A2-DAG: Handled c.swift -// CHECK-A2-DAG: Handled d.swift -// CHECK-A2-DAG: Handled e.swift -// CHECK-A2-DAG: Handled bad.swift -// NEGATIVE-A2-NOT: Handled a.swift -// NEGATIVE-A2-NOT: Handled b.swift -// NEGATIVE-A2-NOT: Handled f.swift - - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/fail-chained-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./b.swift ./c.swift ./d.swift ./e.swift ./f.swift ./bad.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// RUN: touch -t 201401240006 %t/b.swift -// RUN: cd %t && not %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies-bad.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./b.swift ./c.swift ./d.swift ./e.swift ./f.swift ./bad.swift -module-name main -j1 -v > %t/b.txt 2>&1 -// RUN: %FileCheck -check-prefix=CHECK-B %s < %t/b.txt -// RUN: %FileCheck -check-prefix=NEGATIVE-B %s < %t/b.txt -// RUN: %FileCheck -check-prefix=CHECK-RECORD-B %s < %t/main~buildrecord.swiftdeps - -// CHECK-B: Handled b.swift -// CHECK-B: Handled bad.swift -// NEGATIVE-B-NOT: Handled a.swift -// NEGATIVE-B-NOT: Handled c.swift -// NEGATIVE-B-NOT: Handled d.swift -// NEGATIVE-B-NOT: Handled e.swift -// NEGATIVE-B-NOT: Handled f.swift - -// CHECK-RECORD-B-DAG: "{{(./)?}}a.swift": [ -// CHECK-RECORD-B-DAG: "{{(./)?}}b.swift": [ -// CHECK-RECORD-B-DAG: "{{(./)?}}c.swift": [ -// CHECK-RECORD-B-DAG: "{{(./)?}}d.swift": [ -// CHECK-RECORD-B-DAG: "{{(./)?}}e.swift": [ -// CHECK-RECORD-B-DAG: "{{(./)?}}f.swift": [ -// CHECK-RECORD-B-DAG: "{{(./)?}}bad.swift": !private [ - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./b.swift ./c.swift ./d.swift ./e.swift ./f.swift ./bad.swift -module-name main -j1 -v > %t/b2.txt 2>&1 -// RUN: %FileCheck -check-prefix=CHECK-B2 %s < %t/b2.txt -// RUN: %FileCheck -check-prefix=NEGATIVE-B2 %s < %t/b2.txt -// RUN: %FileCheck -check-prefix=CHECK-RECORD-CLEAN %s < %t/main~buildrecord.swiftdeps - -// CHECK-B2-DAG: Handled bad.swift -// NEGATIVE-B2-NOT: Handled a.swift -// NEGATIVE-B2-NOT: Handled b.swift -// NEGATIVE-B2-NOT: Handled c.swift -// NEGATIVE-B2-NOT: Handled d.swift -// NEGATIVE-B2-NOT: Handled e.swift -// NEGATIVE-B2-NOT: Handled f.swift - - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/fail-chained-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./b.swift ./c.swift ./d.swift ./e.swift ./f.swift ./bad.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// RUN: touch -t 201401240006 %t/bad.swift -// RUN: cd %t && not %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies-bad.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./bad.swift ./a.swift ./b.swift ./c.swift ./d.swift ./e.swift ./f.swift -module-name main -j1 -v > %t/bad.txt 2>&1 -// RUN: %FileCheck -check-prefix=CHECK-BAD %s < %t/bad.txt -// RUN: %FileCheck -check-prefix=NEGATIVE-BAD %s < %t/bad.txt -// RUN: %FileCheck -check-prefix=CHECK-RECORD-A %s < %t/main~buildrecord.swiftdeps - -// CHECK-BAD: Handled bad.swift -// NEGATIVE-BAD-NOT: Handled a.swift -// NEGATIVE-BAD-NOT: Handled b.swift -// NEGATIVE-BAD-NOT: Handled c.swift -// NEGATIVE-BAD-NOT: Handled d.swift -// NEGATIVE-BAD-NOT: Handled e.swift -// NEGATIVE-BAD-NOT: Handled f.swift - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./b.swift ./c.swift ./d.swift ./e.swift ./f.swift ./bad.swift -module-name main -j1 -v > %t/bad2.txt 2>&1 -// RUN: %FileCheck -check-prefix=CHECK-A2 %s < %t/bad2.txt -// RUN: %FileCheck -check-prefix=NEGATIVE-A2 %s < %t/bad2.txt -// RUN: %FileCheck -check-prefix=CHECK-RECORD-CLEAN %s < %t/main~buildrecord.swiftdeps diff --git a/test/Driver/Dependencies/fail-interface-hash-fine.swift b/test/Driver/Dependencies/fail-interface-hash-fine.swift deleted file mode 100644 index 7a124da334d21..0000000000000 --- a/test/Driver/Dependencies/fail-interface-hash-fine.swift +++ /dev/null @@ -1,41 +0,0 @@ -// rdar://103866776 (Swift CI: [main] 1. OSS - Swift ASAN - macOS: Multiple test failures after Swift driver change) -// REQUIRES: rdar103866776 - -/// main ==> depends-on-main | bad ==> depends-on-bad - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/fail-interface-hash-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental ./main.swift ./bad.swift ./depends-on-main.swift ./depends-on-bad.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST: Handled main.swift -// CHECK-FIRST: Handled bad.swift -// CHECK-FIRST: Handled depends-on-main.swift -// CHECK-FIRST: Handled depends-on-bad.swift - -// Reset the .swiftdeps files. -// RUN: cp -r %S/Inputs/fail-interface-hash-fine/*.swiftdeps %t - -// RUN: touch -t 201401240006 %t/bad.swift %t/main.swift -// RUN: cd %t && not %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies-bad.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental ./main.swift ./bad.swift ./depends-on-main.swift ./depends-on-bad.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s -// RUN: %FileCheck -check-prefix=CHECK-RECORD %s < %t/main~buildrecord.swiftdeps - -// CHECK-SECOND: Handled main.swift -// CHECK-SECOND-NOT: Handled depends -// CHECK-SECOND: Handled bad.swift -// CHECK-SECOND-NOT: Handled depends - -// CHECK-RECORD-DAG: "{{(./)?}}bad.swift": !private [ -// CHECK-RECORD-DAG: "{{(./)?}}main.swift": [ -// CHECK-RECORD-DAG: "{{(./)?}}depends-on-main.swift": !private [ -// CHECK-RECORD-DAG: "{{(./)?}}depends-on-bad.swift": [ - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental ./main.swift ./bad.swift ./depends-on-main.swift ./depends-on-bad.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s - -// CHECK-THIRD-DAG: Handled bad -// CHECK-THIRD-DAG: Handled depends-on-bad -// CHECK-THIRD-DAG: Handled depends-on-main -// CHECK-THIRD-DAG: Handled main - diff --git a/test/Driver/Dependencies/fail-new-fine.swift b/test/Driver/Dependencies/fail-new-fine.swift deleted file mode 100644 index 4315b7b8bc19f..0000000000000 --- a/test/Driver/Dependencies/fail-new-fine.swift +++ /dev/null @@ -1,45 +0,0 @@ -/// bad ==> main | bad --> other - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/fail-simple-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && not %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies-bad.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./bad.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck %s -// CHECK-NOT: warning -// CHECK: Handled main.swift -// CHECK: Handled bad.swift -// CHECK-NOT: Handled other.swift - -// RUN: cd %t && not %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies-bad.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./bad.swift ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-BAD-ONLY %s - -// CHECK-BAD-ONLY-NOT: warning -// CHECK-BAD-ONLY-NOT: Handled -// CHECK-BAD-ONLY: Handled bad.swift -// CHECK-BAD-ONLY-NOT: Handled - -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./bad.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-OKAY %s -// CHECK-OKAY: Handled main.swift -// CHECK-OKAY: Handled bad.swift -// CHECK-OKAY: Handled other.swift -// CHECK-OKAY-NOT: Handled - -// RUN: touch -t 201401240006 %t/bad.swift -// RUN: rm %t/bad.swiftdeps -// RUN: cd %t && not %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies-bad.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./bad.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck %s - -// RUN: touch -t 201401240005 %t/* -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./bad.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-OKAY-2 %s - -// CHECK-OKAY-2-DAG: Handled bad.swift -// CHECK-OKAY-2-DAG: Handled other.swift -// CHECK-OKAY-2-DAG: Handled main.swift - -// RUN: touch -t 201401240006 %t/main.swift -// RUN: rm %t/main.swiftdeps -// RUN: cd %t && not %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies-bad.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./bad.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck %s - -// RUN: touch -t 201401240005 %t/* -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./bad.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-OKAY %s -// RUN: touch -t 201401240006 %t/other.swift -// RUN: rm %t/other.swiftdeps -// RUN: cd %t && not %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies-bad.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./bad.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck %s diff --git a/test/Driver/Dependencies/fail-simple-fine.swift b/test/Driver/Dependencies/fail-simple-fine.swift deleted file mode 100644 index dbb77be7a28d0..0000000000000 --- a/test/Driver/Dependencies/fail-simple-fine.swift +++ /dev/null @@ -1,33 +0,0 @@ -// rdar://103866776 (Swift CI: [main] 1. OSS - Swift ASAN - macOS: Multiple test failures after Swift driver change) -// REQUIRES: rdar103866776 - -/// bad ==> main | bad --> other - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/fail-simple-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./bad.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST: Handled main.swift -// CHECK-FIRST: Handled bad.swift -// CHECK-FIRST: Handled other.swift - -// RUN: touch -t 201401240006 %t/bad.swift -// RUN: cd %t && not %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies-bad.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./bad.swift ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s -// RUN: %FileCheck -check-prefix=CHECK-RECORD %s < %t/main~buildrecord.swiftdeps - -// CHECK-SECOND: Handled bad.swift -// CHECK-SECOND-NOT: Handled main.swift -// CHECK-SECOND-NOT: Handled other.swift - -// CHECK-RECORD-DAG: "{{(./)?}}bad.swift": !private [ -// CHECK-RECORD-DAG: "{{(./)?}}main.swift": !private [ -// CHECK-RECORD-DAG: "{{(./)?}}other.swift": !private [ - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./bad.swift ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s - -// CHECK-THIRD-DAG: Handled main.swift -// CHECK-THIRD-DAG: Handled bad.swift -// CHECK-THIRD-DAG: Handled other.swift diff --git a/test/Driver/Dependencies/fail-with-bad-deps-fine.swift b/test/Driver/Dependencies/fail-with-bad-deps-fine.swift deleted file mode 100644 index a16475f4f133d..0000000000000 --- a/test/Driver/Dependencies/fail-with-bad-deps-fine.swift +++ /dev/null @@ -1,50 +0,0 @@ -/// main ==> depends-on-main | bad ==> depends-on-bad - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/fail-with-bad-deps-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental ./main.swift ./bad.swift ./depends-on-main.swift ./depends-on-bad.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST: Handled main.swift -// CHECK-FIRST: Handled bad.swift -// CHECK-FIRST: Handled depends-on-main.swift -// CHECK-FIRST: Handled depends-on-bad.swift - -// Reset the .swiftdeps files. -// RUN: cp -r %S/Inputs/fail-with-bad-deps-fine/*.swiftdeps %t - -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental ./main.swift ./bad.swift ./depends-on-main.swift ./depends-on-bad.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-NONE %s -// CHECK-NONE-NOT: Handled - -// Reset the .swiftdeps files. -// RUN: cp -r %S/Inputs/fail-with-bad-deps-fine/*.swiftdeps %t - -// RUN: touch -t 201401240006 %t/bad.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental ./main.swift ./bad.swift ./depends-on-main.swift ./depends-on-bad.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-BUILD-ALL %s - -// CHECK-BUILD-ALL-NOT: warning -// CHECK-BUILD-ALL: Handled bad.swift -// CHECK-BUILD-ALL-DAG: Handled main.swift -// CHECK-BUILD-ALL-DAG: Handled depends-on-main.swift -// CHECK-BUILD-ALL-DAG: Handled depends-on-bad.swift - -// Reset the .swiftdeps files. -// RUN: cp -r %S/Inputs/fail-with-bad-deps-fine/*.swiftdeps %t - -// RUN: touch -t 201401240007 %t/bad.swift %t/main.swift -// RUN: cd %t && not %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies-bad.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental ./main.swift ./bad.swift ./depends-on-main.swift ./depends-on-bad.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-WITH-FAIL %s -// RUN: %FileCheck -check-prefix=CHECK-RECORD %s < %t/main~buildrecord.swiftdeps - -// CHECK-WITH-FAIL: Handled main.swift -// CHECK-WITH-FAIL-NOT: Handled depends -// CHECK-WITH-FAIL: Handled bad.swift -// CHECK-WITH-FAIL-NOT: Handled depends - -// CHECK-RECORD-DAG: "{{(./)?}}bad.swift": !private [ -// CHECK-RECORD-DAG: "{{(./)?}}main.swift": [ -// CHECK-RECORD-DAG: "{{(./)?}}depends-on-main.swift": !private [ -// CHECK-RECORD-DAG: "{{(./)?}}depends-on-bad.swift": [ - -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental ./bad.swift ./main.swift ./depends-on-main.swift ./depends-on-bad.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-BUILD-ALL %s diff --git a/test/Driver/Dependencies/file-added-fine.swift b/test/Driver/Dependencies/file-added-fine.swift deleted file mode 100644 index bc37548bb8840..0000000000000 --- a/test/Driver/Dependencies/file-added-fine.swift +++ /dev/null @@ -1,20 +0,0 @@ -/// other ==> main - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST: Handled other.swift - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// CHECK-SECOND-NOT: Handled - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./other.swift ./main.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s - -// CHECK-THIRD-NOT: Handled other.swift -// CHECK-THIRD: Handled main.swift -// CHECK-THIRD-NOT: Handled other.swift diff --git a/test/Driver/Dependencies/independent-fine.swift b/test/Driver/Dependencies/independent-fine.swift deleted file mode 100644 index 2f5fe12b72309..0000000000000 --- a/test/Driver/Dependencies/independent-fine.swift +++ /dev/null @@ -1,55 +0,0 @@ -// rdar://103866776 (Swift CI: [main] 1. OSS - Swift ASAN - macOS: Multiple test failures after Swift driver change) -// REQUIRES: rdar103866776 - -// main | other - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/independent-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s -// RUN: ls %t/main~buildrecord.swiftdeps - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST: Handled main.swift - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// CHECK-SECOND-NOT: Handled - -// Don't change the priors mod time. -// RUN: touch -t 201401240006 %t/*.swift -// RUN: touch -t 201401240006 %t/*.swiftdeps -// RUN: touch -t 201401240006 %t/*.json -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// RUN: touch -t 201401240007 %t/main.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/independent-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST-MULTI %s - -// CHECK-FIRST-MULTI: Handled main.swift -// CHECK-FIRST-MULTI: Handled other.swift - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// Don't change the priors mod time. -// RUN: touch -t 201401240006 %t/*.swift -// RUN: touch -t 201401240006 %t/*.swiftdeps -// RUN: touch -t 201401240006 %t/*.json -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST-MULTI %s - - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/independent-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SINGLE %s -// CHECK-SINGLE: Handled main.swift - -// RUN: ls %t/main~buildrecord.swiftdeps diff --git a/test/Driver/Dependencies/independent-half-dirty-fine.swift b/test/Driver/Dependencies/independent-half-dirty-fine.swift deleted file mode 100644 index 57f9ed36c2967..0000000000000 --- a/test/Driver/Dependencies/independent-half-dirty-fine.swift +++ /dev/null @@ -1,23 +0,0 @@ -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/independent-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST: Handled main.swift -// CHECK-FIRST: Handled other.swift - -// RUN: touch -t 201401240005 %t/other.o -// RUN: touch -t 201401240006 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// CHECK-SECOND-NOT: Handled main.swift -// CHECK-SECOND: Handled other.swift -// CHECK-SECOND-NOT: Handled main.swift - -// RUN: rm %t/other.swiftdeps -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s - -// CHECK-THIRD: Handled main.swift -// CHECK-THIRD: Handled other.swift diff --git a/test/Driver/Dependencies/independent-parseable-fine.swift b/test/Driver/Dependencies/independent-parseable-fine.swift deleted file mode 100644 index e9eac1ff6a4ad..0000000000000 --- a/test/Driver/Dependencies/independent-parseable-fine.swift +++ /dev/null @@ -1,79 +0,0 @@ -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/independent-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift -j1 -parseable-output 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST: {{^{$}} -// CHECK-FIRST-DAG: "kind"{{ ?}}: "began" -// CHECK-FIRST-DAG: "name"{{ ?}}: "compile" -// CHECK-FIRST-DAG: "{{(.\\/)?}}main.swift" -// CHECK-FIRST: {{^}$}} - -// CHECK-FIRST: {{^{$}} -// CHECK-FIRST: "kind"{{ ?}}: "finished" -// CHECK-FIRST: "name"{{ ?}}: "compile" -// CHECK-FIRST: "output"{{ ?}}: "Handled main.swift{{(\\r)?}}\n" -// CHECK-FIRST: {{^}$}} - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift -j1 -parseable-output 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// CHECK-SECOND: {{^{$}} -// CHECK-SECOND-DAG: "kind"{{ ?}}: "skipped" -// CHECK-SECOND-DAG: "name"{{ ?}}: "compile" -// CHECK-SECOND-DAG: "{{(.\\/)?}}main.swift" -// CHECK-SECOND: {{^}$}} - -// Don't mess with the priors -// RUN: touch -t 201401240006 %t/*.{swift,swiftdeps,json} -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift -j1 -parseable-output 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/independent-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -parseable-output 2>&1 | %FileCheck -check-prefix=CHECK-FIRST-MULTI %s - -// CHECK-FIRST-MULTI: {{^{$}} -// CHECK-FIRST-MULTI-DAG: "kind"{{ ?}}: "began" -// CHECK-FIRST-MULTI-DAG: "name"{{ ?}}: "compile" -// CHECK-FIRST-MULTI-DAG: "{{(.\\/)?}}main.swift" -// CHECK-FIRST-MULTI: {{^}$}} - -// CHECK-FIRST-MULTI: {{^{$}} -// CHECK-FIRST-MULTI-DAG: "kind"{{ ?}}: "finished" -// CHECK-FIRST-MULTI-DAG: "name"{{ ?}}: "compile" -// CHECK-FIRST-MULTI-DAG: "output"{{ ?}}: "Handled main.swift{{(\\r)?}}\n" -// CHECK-FIRST-MULTI: {{^}$}} - -// CHECK-FIRST-MULTI: {{^{$}} -// CHECK-FIRST-MULTI-DAG: "kind"{{ ?}}: "began" -// CHECK-FIRST-MULTI-DAG: "name"{{ ?}}: "compile" -// CHECK-FIRST-MULTI-DAG: "{{(.\\/)?}}other.swift" -// CHECK-FIRST-MULTI: {{^}$}} - -// CHECK-FIRST-MULTI: {{^{$}} -// CHECK-FIRST-MULTI-DAG: "kind"{{ ?}}: "finished" -// CHECK-FIRST-MULTI-DAG: "name"{{ ?}}: "compile" -// CHECK-FIRST-MULTI-DAG: "output"{{ ?}}: "Handled other.swift{{(\\r)?}}\n" -// CHECK-FIRST-MULTI: {{^}$}} - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -parseable-output 2>&1 | %FileCheck -check-prefix=CHECK-SECOND-MULTI %s - -// CHECK-SECOND-MULTI: {{^{$}} -// CHECK-SECOND-MULTI-DAG: "kind"{{ ?}}: "skipped" -// CHECK-SECOND-MULTI-DAG: "name"{{ ?}}: "compile" -// CHECK-SECOND-MULTI-DAG: "{{(.\\/)?}}main.swift" -// CHECK-SECOND-MULTI: {{^}$}} - -// CHECK-SECOND-MULTI: {{^{$}} -// CHECK-SECOND-MULTI-DAG: "kind"{{ ?}}: "skipped" -// CHECK-SECOND-MULTI-DAG: "name"{{ ?}}: "compile" -// CHECK-SECOND-MULTI-DAG: "{{(.\\/)?}}other.swift" -// CHECK-SECOND-MULTI: {{^}$}} - -// RUN: touch -t 201401240006 %t/*.{swift,swiftdeps,json} -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -parseable-output 2>&1 | %FileCheck -check-prefix=CHECK-FIRST-MULTI %s - diff --git a/test/Driver/Dependencies/malformed-but-valid-yaml-fine.swift b/test/Driver/Dependencies/malformed-but-valid-yaml-fine.swift deleted file mode 100644 index e40a6ac225cea..0000000000000 --- a/test/Driver/Dependencies/malformed-but-valid-yaml-fine.swift +++ /dev/null @@ -1,48 +0,0 @@ -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/malformed-but-valid-yaml-fine/* %t -// RUN: touch -t 201401240005 %t/*.swift - -// Generate the build record... -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v - -// ...then reset the .swiftdeps files. -// RUN: cp -r %S/Inputs/malformed-after-fine/*.swiftdeps %t - -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST-NOT: Handled - -// RUN: touch -t 201401240006 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// CHECK-SECOND: Handled other.swift -// CHECK-SECOND: Handled main.swift - -// RUN: touch -t 201401240007 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s - -// CHECK-THIRD: Handled main.swift -// CHECK-THIRD: Handled other.swift - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/malformed-but-valid-yaml-fine/* %t -// RUN: touch -t 201401240005 %t/*.swift - -// Generate the build record... -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v - -// ...then reset the .swiftdeps files. -// RUN: cp -r %S/Inputs/malformed-after-fine/*.swiftdeps %t - -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// RUN: touch -t 201401240006 %t/main.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FOURTH %s - -// RUN: touch -t 201401240007 %t/main.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FOURTH %s - -// CHECK-FOURTH-NOT: Handled other.swift -// CHECK-FOURTH: Handled main.swift -// CHECK-FOURTH-NOT: Handled other.swift diff --git a/test/Driver/Dependencies/malformed-fine.swift b/test/Driver/Dependencies/malformed-fine.swift deleted file mode 100644 index b6452295287ad..0000000000000 --- a/test/Driver/Dependencies/malformed-fine.swift +++ /dev/null @@ -1,48 +0,0 @@ -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/malformed-after-fine/* %t -// RUN: touch -t 201401240005 %t/*.swift - -// Generate the build record... -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v - -// ...then reset the .swiftdeps files. -// RUN: cp -r %S/Inputs/malformed-after-fine/*.swiftdeps %t - -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST-NOT: Handled - -// RUN: touch -t 201401240006 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// CHECK-SECOND: Handled other.swift -// CHECK-SECOND: Handled main.swift - -// RUN: touch -t 201401240007 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s - -// CHECK-THIRD: Handled main.swift -// CHECK-THIRD: Handled other.swift - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/malformed-after-fine/* %t -// RUN: touch -t 201401240005 %t/*.swift - -// Generate the build record... -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v - -// ...then reset the .swiftdeps files. -// RUN: cp -r %S/Inputs/malformed-after-fine/*.swiftdeps %t - -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// RUN: touch -t 201401240006 %t/main.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FOURTH %s - -// RUN: touch -t 201401240007 %t/main.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FOURTH %s - -// CHECK-FOURTH-NOT: Handled other.swift -// CHECK-FOURTH: Handled main.swift -// CHECK-FOURTH-NOT: Handled other.swift diff --git a/test/Driver/Dependencies/mutual-fine.swift b/test/Driver/Dependencies/mutual-fine.swift deleted file mode 100644 index bd842dd762526..0000000000000 --- a/test/Driver/Dependencies/mutual-fine.swift +++ /dev/null @@ -1,24 +0,0 @@ -/// main <==> other - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/mutual-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST: Handled main.swift -// CHECK-FIRST: Handled other.swift - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// CHECK-SECOND-NOT: Handled - -// RUN: touch -t 201401240006 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s - -// CHECK-THIRD: Handled main.swift -// CHECK-THIRD: Handled other.swift - -// RUN: touch -t 201401240006 %t/main.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s diff --git a/test/Driver/Dependencies/mutual-interface-hash-fine.swift b/test/Driver/Dependencies/mutual-interface-hash-fine.swift deleted file mode 100644 index b9b489fdb0652..0000000000000 --- a/test/Driver/Dependencies/mutual-interface-hash-fine.swift +++ /dev/null @@ -1,50 +0,0 @@ -/// does-change <==> does-not-change - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/mutual-interface-hash-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// Generate the build record... -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental ./does-change.swift ./does-not-change.swift -module-name main -j1 -v - -// ...then reset the .swiftdeps files. -// RUN: cp -r %S/Inputs/mutual-interface-hash-fine/*.swiftdeps %t - -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental ./does-change.swift ./does-not-change.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-CLEAN %s - -// CHECK-CLEAN-NOT: Handled - -// RUN: touch -t 201401240006 %t/does-change.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental ./does-change.swift ./does-not-change.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-CHANGE %s - -// CHECK-CHANGE-DAG: Handled does-change.swift -// CHECK-CHANGE-DAG: Handled does-not-change.swift - - -// RUN: cp -r %S/Inputs/mutual-interface-hash-fine/*.swiftdeps %t - -// RUN: touch -t 201401240006 %t/does-not-change.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental ./does-change.swift ./does-not-change.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-NO-CHANGE %s - -// CHECK-NO-CHANGE-NOT: Handled -// CHECK-NO-CHANGE: Handled does-not-change.swift -// CHECK-NO-CHANGE-NOT: Handled - - -// RUN: cp -r %S/Inputs/mutual-interface-hash-fine/*.swiftdeps %t - -// Make sure the files really were dependent on one another. - -// RUN: touch -t 201401240007 %t/does-not-change.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./does-change.swift ./does-not-change.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-REBUILD-DEPENDENTS %s - -// CHECK-REBUILD-DEPENDENTS-DAG: Handled does-not-change.swift -// CHECK-REBUILD-DEPENDENTS-DAG: Handled does-change.swift - - -// Check that cascading builds triggered by the build record are still -// considered cascading. - -// RUN: cp -r %S/Inputs/mutual-interface-hash-fine/*.swiftdeps %t -// RUN: sed -E -e 's/"[^"]*does-not-change.swift":/& !dirty/' -i.prev %t/main~buildrecord.swiftdeps -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental ./does-change.swift ./does-not-change.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-REBUILD-DEPENDENTS %s diff --git a/test/Driver/Dependencies/nominal-members-fine.swift b/test/Driver/Dependencies/nominal-members-fine.swift deleted file mode 100644 index dcc84bf85cb45..0000000000000 --- a/test/Driver/Dependencies/nominal-members-fine.swift +++ /dev/null @@ -1,39 +0,0 @@ -/// a ==> depends-on-a-ext, depends-on-a-foo | a-ext ==> depends-on-a-ext - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/nominal-members-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./a-ext.swift ./depends-on-a-foo.swift ./depends-on-a-ext.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-INITIAL %s - -// CHECK-INITIAL-NOT: warning -// CHECK-INITIAL: Handled a.swift -// CHECK-INITIAL: Handled a-ext.swift -// CHECK-INITIAL: Handled depends-on-a-foo.swift -// CHECK-INITIAL: Handled depends-on-a-ext.swift - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./a-ext.swift ./depends-on-a-foo.swift ./depends-on-a-ext.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-CLEAN %s - -// CHECK-CLEAN-NOT: Handled - -// RUN: touch -t 201401240006 %t/a.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./a-ext.swift ./depends-on-a-foo.swift ./depends-on-a-ext.swift -module-name main -j1 -v > %t/touched-a.txt 2>&1 -// RUN: %FileCheck -check-prefix=CHECK-TOUCHED-A %s < %t/touched-a.txt -// RUN: %FileCheck -check-prefix=NEGATIVE-TOUCHED-A %s < %t/touched-a.txt - -// CHECK-TOUCHED-A: Handled a.swift -// CHECK-TOUCHED-A-DAG: Handled depends-on-a-foo.swift -// CHECK-TOUCHED-A-DAG: Handled depends-on-a-ext.swift -// NEGATIVE-TOUCHED-A-NOT: Handled a-ext.swift - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./a-ext.swift ./depends-on-a-foo.swift ./depends-on-a-ext.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-CLEAN %s - - -// RUN: touch -t 201401240007 %t/a-ext.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./a-ext.swift ./depends-on-a-foo.swift ./depends-on-a-ext.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-TOUCHED-EXT %s - -// CHECK-TOUCHED-EXT-NOT: Handled -// CHECK-TOUCHED-EXT: Handled a-ext.swift -// CHECK-TOUCHED-EXT-NOT: Handled -// CHECK-TOUCHED-EXT: Handled depends-on-a-ext.swift -// CHECK-TOUCHED-EXT-NOT: Handled diff --git a/test/Driver/Dependencies/one-way-depends-after-fine.swift b/test/Driver/Dependencies/one-way-depends-after-fine.swift deleted file mode 100644 index a4ab5f5ef65be..0000000000000 --- a/test/Driver/Dependencies/one-way-depends-after-fine.swift +++ /dev/null @@ -1,56 +0,0 @@ -/// other | main -/// other ==>+ main - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way-depends-after-fine/* %t -// RUN: touch -t 201401240005 %t/*.swift - -// Generate the build record... -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v - -// ...then reset the .swiftdeps files. -// RUN: cp -r %S/Inputs/one-way-depends-after-fine/*.swiftdeps %t - -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST-NOT: Handled - -// RUN: touch -t 201401240006 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// CHECK-SECOND-NOT: Handled main.swift -// CHECK-SECOND: Handled other.swift -// CHECK-SECOND-NOT: Handled main.swift - -// RUN: touch -t 201401240007 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way-depends-after-fine/* %t -// RUN: touch -t 201401240005 %t/*.swift - -// Generate the build record... -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v - -// ...then reset the .swiftdeps files. -// RUN: cp -r %S/Inputs/one-way-depends-after-fine/*.swiftdeps %t - -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// RUN: touch -t 201401240006 %t/main.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s - -// CHECK-THIRD-NOT: Handled other.swift -// CHECK-THIRD: Handled main.swift -// CHECK-THIRD-NOT: Handled other.swift - -// RUN: touch -t 201401240007 %t/main.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s - -// RUN: touch -t 201401240008 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FOURTH %s - -// CHECK-FOURTH-DAG: Handled other.swift -// CHECK-FOURTH-DAG: Handled main.swift diff --git a/test/Driver/Dependencies/one-way-depends-before-fine.swift b/test/Driver/Dependencies/one-way-depends-before-fine.swift deleted file mode 100644 index 5fb9866189f72..0000000000000 --- a/test/Driver/Dependencies/one-way-depends-before-fine.swift +++ /dev/null @@ -1,56 +0,0 @@ -/// other ==>+ main -/// other | main - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way-depends-before-fine/* %t -// RUN: touch -t 201401240005 %t/*.swift - -// Generate the build record... -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v - -// ...then reset the .swiftdeps files. -// RUN: cp -r %S/Inputs/one-way-depends-before-fine/*.swiftdeps %t - -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST-NOT: Handled - -// RUN: touch -t 201401240006 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// CHECK-SECOND: Handled main.swift -// CHECK-SECOND: Handled other.swift - -// RUN: touch -t 201401240007 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s - -// CHECK-THIRD-NOT: Handled main.swift -// CHECK-THIRD: Handled other.swift -// CHECK-THIRD-NOT: Handled main.swift - - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way-depends-before-fine/* %t -// RUN: touch -t 201401240005 %t/*.swift - -// Generate the build record... -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v - -// ...then reset the .swiftdeps files. -// RUN: cp -r %S/Inputs/one-way-depends-before-fine/*.swiftdeps %t - -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// RUN: touch -t 201401240006 %t/main.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FOURTH %s - -// CHECK-FOURTH-NOT: Handled other.swift -// CHECK-FOURTH: Handled main.swift -// CHECK-FOURTH-NOT: Handled other.swift - -// RUN: touch -t 201401240007 %t/main.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FOURTH %s - -// RUN: touch -t 201401240008 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s diff --git a/test/Driver/Dependencies/one-way-external-delete-fine.swift b/test/Driver/Dependencies/one-way-external-delete-fine.swift deleted file mode 100644 index ad69000cfde98..0000000000000 --- a/test/Driver/Dependencies/one-way-external-delete-fine.swift +++ /dev/null @@ -1,47 +0,0 @@ -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way-external-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST: Handled main.swift -// CHECK-FIRST: Handled other.swift - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// CHECK-SECOND-NOT: Handled - - -// Don't change the .priors mod time -// RUN: touch -t 201401240005 %t/*swift -// RUN: touch -t 201401240005 %t/*swiftdeps -// RUN: touch -t 201401240005 %t/*json -// RUN: touch -t 201401240006 %t/*.o -// RUN: touch -t 201401240004 %t/*-external -// RUN: rm %t/other1-external -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s - -// CHECK-THIRD-DAG: Handled other.swift -// CHECK-THIRD-DAG: Handled main.swift - - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way-external-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - - -// Don't change the .priors mod time -// RUN: touch -t 201401240005 %t/*swift -// RUN: touch -t 201401240005 %t/*swiftdeps -// RUN: touch -t 201401240005 %t/*json -// RUN: touch -t 201401240006 %t/*.o -// RUN: touch -t 201401240004 %t/*-external -// RUN: rm %t/main1-external -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FOURTH %s - -// CHECK-FOURTH-NOT: Handled other.swift -// CHECK-FOURTH: Handled main.swift -// CHECK-FOURTH-NOT: Handled other.swift diff --git a/test/Driver/Dependencies/one-way-external-fine.swift b/test/Driver/Dependencies/one-way-external-fine.swift deleted file mode 100644 index ad1bef77aa0d4..0000000000000 --- a/test/Driver/Dependencies/one-way-external-fine.swift +++ /dev/null @@ -1,63 +0,0 @@ -/// other ==> main -/// "./main1-external" ==> main -/// "./main2-external" ==> main -/// "./other1-external" ==> other -/// "./other2-external" ==> other - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way-external-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST: Handled main.swift -// CHECK-FIRST: Handled other.swift - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// CHECK-SECOND-NOT: Handled - -// Don't change the .priors mod time -// RUN: touch -t 201401240005 %t/*.swift -// RUN: touch -t 201401240005 %t/*.swiftdeps -// RUN: touch -t 201401240005 %t/*.json -// RUN: touch -t 201401240006 %t/*.o -// RUN: touch -t 201401240004 %t/*-external -// RUN: touch -t 203704010005 %t/other1-external -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s - -// CHECK-THIRD-DAG: Handled other.swift -// CHECK-THIRD-DAG: Handled main.swift - -// Don't change the .priors mod time -// RUN: touch -t 201401240005 %t/*.swift -// RUN: touch -t 201401240005 %t/*.swiftdeps -// RUN: touch -t 201401240005 %t/*.json -// RUN: touch -t 201401240006 %t/*.o -// RUN: touch -t 201401240004 %t/*-external -// RUN: touch -t 203704010005 %t/other2-external -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s - - -// Don't change the .priors mod time -// RUN: touch -t 201401240005 %t/*.swift -// RUN: touch -t 201401240005 %t/*.swiftdeps -// RUN: touch -t 201401240005 %t/*.json -// RUN: touch -t 201401240006 %t/*.o -// RUN: touch -t 201401240004 %t/*-external -// RUN: touch -t 203704010005 %t/main1-external -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FOURTH %s - -// CHECK-FOURTH-NOT: Handled other.swift -// CHECK-FOURTH: Handled main.swift -// CHECK-FOURTH-NOT: Handled other.swift - -// Don't change the .priors mod time -// RUN: touch -t 201401240005 %t/*.swift -// RUN: touch -t 201401240005 %t/*.swiftdeps -// RUN: touch -t 201401240005 %t/*.json -// RUN: touch -t 201401240006 %t/*.o -// RUN: touch -t 201401240004 %t/*-external -// RUN: touch -t 203704010005 %t/main2-external -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FOURTH %s diff --git a/test/Driver/Dependencies/one-way-fine.swift b/test/Driver/Dependencies/one-way-fine.swift deleted file mode 100644 index 192d2e0bee633..0000000000000 --- a/test/Driver/Dependencies/one-way-fine.swift +++ /dev/null @@ -1,75 +0,0 @@ -/// other ==> main - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST: Handled main.swift -// CHECK-FIRST: Handled other.swift - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// CHECK-SECOND-NOT: Handled - -// RUN: touch -t 201401240006 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s - -// CHECK-THIRD: Handled main.swift -// CHECK-THIRD: Handled other.swift - -// RUN: touch -t 201401240006 %t/main.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FOURTH %s - -// CHECK-FOURTH-NOT: Handled other.swift -// CHECK-FOURTH: Handled main.swift -// CHECK-FOURTH-NOT: Handled other.swift - -// RUN: rm %t/main.o -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FOURTH %s - -// RUN: rm %t/other.o -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIFTH %s - -// CHECK-FIFTH-NOT: Handled main.swift -// CHECK-FIFTH: Handled other.swift -// CHECK-FIFTH-NOT: Handled main.swift - - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way-fine/* %t -// RUN: touch -t 201401240005 %t/* -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// Try modifying the inputs /backwards/ in time rather than forwards. -// RUN: touch -t 201401240004 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s - -// RUN: touch -t 201401240004 %t/main.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FOURTH %s - - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./other.swift ./main.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-REV-FIRST %s - -// CHECK-REV-FIRST: Handled other.swift -// CHECK-REV-FIRST: Handled main.swift - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./other.swift ./main.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-REV-SECOND %s - -// CHECK-REV-SECOND-NOT: Handled - -// RUN: touch -t 201401240006 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./other.swift ./main.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-REV-FIRST %s - -// RUN: touch -t 201401240006 %t/main.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./other.swift ./main.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-REV-FOURTH %s - -// CHECK-REV-FOURTH-NOT: Handled other.swift -// CHECK-REV-FOURTH: Handled main.swift -// CHECK-REV-FOURTH-NOT: Handled other.swift diff --git a/test/Driver/Dependencies/one-way-merge-module-fine.swift b/test/Driver/Dependencies/one-way-merge-module-fine.swift deleted file mode 100644 index 265355e2fc94a..0000000000000 --- a/test/Driver/Dependencies/one-way-merge-module-fine.swift +++ /dev/null @@ -1,23 +0,0 @@ -/// other ==> main - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way-fine/* %t -// RUN: %{python} %S/Inputs/touch.py 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -emit-module-path %t/master.swiftmodule -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST-DAG: Handled main.swift -// CHECK-FIRST-DAG: Handled other.swift -// CHECK-FIRST-DAG: Produced master.swiftmodule - -// swift-driver checks existence of all outputs -// RUN: %{python} %S/Inputs/touch.py 201401240006 %t/*.swiftmodule -// RUN: %{python} %S/Inputs/touch.py 201401240006 %t/*.swiftdoc -// RUN: %{python} %S/Inputs/touch.py 201401240006 %t/*.swiftsourceinfo - -// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -emit-module-path %t/master.swiftmodule -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// CHECK-SECOND-NOT: warning -// CHECK-SECOND-NOT: Handled -// CHECK-SECOND-NOT: Produced master.swiftmodule diff --git a/test/Driver/Dependencies/one-way-parallel-fine.swift b/test/Driver/Dependencies/one-way-parallel-fine.swift deleted file mode 100644 index a6a47f1a14328..0000000000000 --- a/test/Driver/Dependencies/one-way-parallel-fine.swift +++ /dev/null @@ -1,61 +0,0 @@ -// Windows doesn't support parallel execution yet -// XFAIL: OS=windows-msvc -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -parseable-output 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST: {{^{$}} -// CHECK-FIRST-DAG: "kind"{{ *}}: "began" -// CHECK-FIRST-DAG: "name"{{ *}}: "compile" -// CHECK-FIRST-DAG: "{{(.\\/)?}}main.swift" -// CHECK-FIRST: {{^}$}} - -// CHECK-FIRST: {{^{$}} -// CHECK-FIRST-DAG: "kind"{{ *}}: "finished" -// CHECK-FIRST-DAG: "name"{{ *}}: "compile" -// CHECK-FIRST-DAG: "output"{{ *}}: "Handled main.swift\n" -// CHECK-FIRST: {{^}$}} - -// CHECK-FIRST: {{^{$}} -// CHECK-FIRST-DAG: "kind"{{ *}}: "began" -// CHECK-FIRST-DAG: "name"{{ *}}: "compile" -// CHECK-FIRST-DAG: "{{(.\\/)?}}other.swift" -// CHECK-FIRST: {{^}$}} - -// CHECK-FIRST: {{^{$}} -// CHECK-FIRST-DAG: "kind"{{ *}}: "finished" -// CHECK-FIRST-DAG: "name"{{ *}}: "compile" -// CHECK-FIRST-DAG: "output"{{ *}}: "Handled other.swift\n" -// CHECK-FIRST: {{^}$}} - -// RUN: touch -t 201401240006 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j2 -parseable-output 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// CHECK-SECOND: {{^{$}} -// CHECK-SECOND-DAG: "kind"{{ *}}: "began" -// CHECK-SECOND-DAG: "name"{{ *}}: "compile" -// CHECK-SECOND-DAG: "{{(.\\/)?}}other.swift" -// CHECK-SECOND: {{^}$}} - -// CHECK-SECOND: {{^{$}} -// CHECK-SECOND-DAG: "kind"{{ *}}: "began" -// CHECK-SECOND-DAG: "name"{{ *}}: "compile" -// CHECK-SECOND-DAG: "{{(.\\/)?}}main.swift" -// CHECK-SECOND: {{^}$}} - -// CHECK-SECOND: {{^{$}} -// CHECK-SECOND-DAG: "kind"{{ *}}: "finished" -// CHECK-SECOND-DAG: "name"{{ *}}: "compile" -// CHECK-SECOND-DAG: "output"{{ *}}: "Handled {{other.swift|main.swift}}\n" -// CHECK-SECOND: {{^}$}} - -// CHECK-SECOND: {{^{$}} -// CHECK-SECOND-DAG: "kind"{{ *}}: "finished" -// CHECK-SECOND-DAG: "name"{{ *}}: "compile" -// CHECK-SECOND-DAG: "output"{{ *}}: "Handled {{main.swift|other.swift}}\n" -// CHECK-SECOND: {{^}$}} - -// CHECK-SECOND-NOT: "skipped" diff --git a/test/Driver/Dependencies/one-way-parseable-fine.swift b/test/Driver/Dependencies/one-way-parseable-fine.swift deleted file mode 100644 index 6b3d538005f63..0000000000000 --- a/test/Driver/Dependencies/one-way-parseable-fine.swift +++ /dev/null @@ -1,92 +0,0 @@ -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -parseable-output 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST: {{^{$}} -// CHECK-FIRST-DAG: "kind"{{ ?}}: "began" -// CHECK-FIRST-DAG: "name"{{ ?}}: "compile" -// CHECK-FIRST-DAG: "{{(.\\/)?}}main.swift" -// CHECK-FIRST: {{^}$}} - -// CHECK-FIRST: {{^{$}} -// CHECK-FIRST-DAG: "kind"{{ ?}}: "finished" -// CHECK-FIRST-DAG: "name"{{ ?}}: "compile" -// CHECK-FIRST-DAG: "output"{{ ?}}: "Handled main.swift{{(\\r)?}}\n" -// CHECK-FIRST: {{^}$}} - -// CHECK-FIRST: {{^{$}} -// CHECK-FIRST-DAG: "kind"{{ ?}}: "began" -// CHECK-FIRST-DAG: "name"{{ ?}}: "compile" -// CHECK-FIRST-DAG: "{{(.\\/)?}}other.swift" -// CHECK-FIRST: {{^}$}} - -// CHECK-FIRST: {{^{$}} -// CHECK-FIRST-DAG: "kind"{{ ?}}: "finished" -// CHECK-FIRST-DAG: "name"{{ ?}}: "compile" -// CHECK-FIRST-DAG: "output"{{ ?}}: "Handled other.swift{{(\\r)?}}\n" -// CHECK-FIRST: {{^}$}} - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -parseable-output 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// CHECK-SECOND: {{^{$}} -// CHECK-SECOND-DAG: "kind"{{ ?}}: "skipped" -// CHECK-SECOND-DAG: "name"{{ ?}}: "compile" -// CHECK-SECOND-DAG: "{{(.\\/)?}}main.swift" -// CHECK-SECOND: {{^}$}} - -// CHECK-SECOND: {{^{$}} -// CHECK-SECOND-DAG: "kind"{{ ?}}: "skipped" -// CHECK-SECOND-DAG: "name"{{ ?}}: "compile" -// CHECK-SECOND-DAG: "{{(.\\/)?}}other.swift" -// CHECK-SECOND: {{^}$}} - -// RUN: touch -t 201401240006 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -parseable-output 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s - -// CHECK-THIRD: {{^{$}} -// CHECK-THIRD-DAG: "kind"{{ ?}}: "began" -// CHECK-THIRD-DAG: "name"{{ ?}}: "compile" -// CHECK-THIRD-DAG: "{{(.\\/)?}}main.swift" -// CHECK-THIRD: {{^}$}} - -// CHECK-THIRD: {{^{$}} -// CHECK-THIRD-DAG: "kind"{{ ?}}: "finished" -// CHECK-THIRD-DAG: "name"{{ ?}}: "compile" -// CHECK-THIRD-DAG: "output"{{ ?}}: "Handled main.swift{{(\\r)?}}\n" -// CHECK-THIRD: {{^}$}} - -// CHECK-THIRD: {{^{$}} -// CHECK-THIRD-DAG: "kind"{{ ?}}: "began" -// CHECK-THIRD-DAG: "name"{{ ?}}: "compile" -// CHECK-THIRD-DAG: "{{(.\\/)?}}other.swift" -// CHECK-THIRD: {{^}$}} - -// CHECK-THIRD: {{^{$}} -// CHECK-THIRD-DAG: "kind"{{ ?}}: "finished" -// CHECK-THIRD-DAG: "name"{{ ?}}: "compile" -// CHECK-THIRD-DAG: "output"{{ ?}}: "Handled other.swift{{(\\r)?}}\n" -// CHECK-THIRD: {{^}$}} - -// RUN: touch -t 201401240006 %t/main.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -parseable-output 2>&1 | %FileCheck -check-prefix=CHECK-FOURTH %s - -// CHECK-FOURTH: {{^{$}} -// CHECK-FOURTH-DAG: "kind"{{ ?}}: "began" -// CHECK-FOURTH-DAG: "name"{{ ?}}: "compile" -// CHECK-FOURTH-DAG: "{{(.\\/)?}}main.swift" -// CHECK-FOURTH: {{^}$}} - -// CHECK-FOURTH: {{^{$}} -// CHECK-FOURTH-DAG: "kind"{{ ?}}: "finished" -// CHECK-FOURTH-DAG: "name"{{ ?}}: "compile" -// CHECK-FOURTH-DAG: "output"{{ ?}}: "Handled main.swift{{(\\r)?}}\n" -// CHECK-FOURTH: {{^}$}} - -// CHECK-FOURTH: {{^{$}} -// CHECK-FOURTH-DAG: "kind"{{ ?}}: "skipped" -// CHECK-FOURTH-DAG: "name"{{ ?}}: "compile" -// CHECK-FOURTH-DAG: "{{(.\\/)?}}other.swift" -// CHECK-FOURTH: {{^}$}} diff --git a/test/Driver/Dependencies/one-way-provides-after-fine.swift b/test/Driver/Dependencies/one-way-provides-after-fine.swift deleted file mode 100644 index 46e43a4a456ed..0000000000000 --- a/test/Driver/Dependencies/one-way-provides-after-fine.swift +++ /dev/null @@ -1,48 +0,0 @@ -/// other | main -/// other +==> main - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way-provides-after-fine/* %t -// RUN: touch -t 201401240005 %t/*.swift - -// Generate the build record... -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v - -// ...then reset the .swiftdeps files. -// RUN: cp -r %S/Inputs/one-way-provides-after-fine/*.swiftdeps %t - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST-NOT: Handled - -// RUN: touch -t 201401240006 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// CHECK-SECOND-DAG: Handled other.swift -// CHECK-SECOND-DAG: Handled main.swift - -// RUN: touch -t 201401240007 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way-provides-after-fine/* %t -// RUN: touch -t 201401240005 %t/*.swift - -// Generate the build record... -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v - -// ...then reset the .swiftdeps files. -// RUN: cp -r %S/Inputs/one-way-provides-after-fine/*.swiftdeps %t - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// RUN: touch -t 201401240007 %t/main.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s - -// RUN: touch -t 201401240008 %t/main.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s - -// CHECK-THIRD-NOT: Handled other.swift -// CHECK-THIRD: Handled main.swift -// CHECK-THIRD-NOT: Handled other.swift diff --git a/test/Driver/Dependencies/one-way-provides-before-fine.swift b/test/Driver/Dependencies/one-way-provides-before-fine.swift deleted file mode 100644 index 2b5fcb01458b2..0000000000000 --- a/test/Driver/Dependencies/one-way-provides-before-fine.swift +++ /dev/null @@ -1,52 +0,0 @@ -/// other +==> main -/// other | main - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way-provides-before-fine/* %t -// RUN: touch -t 201401240005 %t/*.swift - -// Generate the build record... -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v - -// ...then reset the .swiftdeps files. -// RUN: cp -r %S/Inputs/one-way-provides-before-fine/*.swiftdeps %t - -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST-NOT: Handled - -// RUN: touch -t 201401240006 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s - -// CHECK-SECOND: Handled main.swift -// CHECK-SECOND: Handled other.swift - -// RUN: touch -t 201401240007 %t/other.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s - -// CHECK-THIRD-NOT: Handled main.swift -// CHECK-THIRD: Handled other.swift -// CHECK-THIRD-NOT: Handled main.swift - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way-provides-before-fine/* %t -// RUN: touch -t 201401240005 %t/*.swift - -// Generate the build record... -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v - -// ...then reset the .swiftdeps files. -// RUN: cp -r %S/Inputs/one-way-provides-before-fine/*.swiftdeps %t - -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s - -// RUN: touch -t 201401240006 %t/main.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FOURTH %s - -// RUN: touch -t 201401240007 %t/main.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FOURTH %s - -// CHECK-FOURTH-NOT: Handled other.swift -// CHECK-FOURTH: Handled main.swift -// CHECK-FOURTH-NOT: Handled other.swift diff --git a/test/Driver/Dependencies/one-way-while-editing-fine.swift b/test/Driver/Dependencies/one-way-while-editing-fine.swift deleted file mode 100644 index 85c858b628476..0000000000000 --- a/test/Driver/Dependencies/one-way-while-editing-fine.swift +++ /dev/null @@ -1,28 +0,0 @@ -/// other ==> main - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && not %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/modify-non-primary-files.py" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck %s - -// CHECK: Handled main.swift -// CHECK: Handled other.swift -// CHECK: error: input file 'other.swift' was modified during the build - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-RECOVER %s - -// CHECK-RECOVER: Handled main.swift -// CHECK-RECOVER: Handled other.swift - - -// RUN: touch -t 201401240005 %t/* -// RUN: cd %t && not %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/modify-non-primary-files.py" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./other.swift ./main.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-REVERSED %s - -// CHECK-REVERSED: Handled other.swift -// CHECK-REVERSED: Handled main.swift -// CHECK-REVERSED: error: input file 'main.swift' was modified during the build - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-REVERSED-RECOVER %s - -// CHECK-REVERSED-RECOVER: Handled main.swift diff --git a/test/Driver/Dependencies/only-skip-once.swift b/test/Driver/Dependencies/only-skip-once.swift deleted file mode 100644 index 720413f83cb64..0000000000000 --- a/test/Driver/Dependencies/only-skip-once.swift +++ /dev/null @@ -1,22 +0,0 @@ -// XFAIL: OS=openbsd, OS=windows-msvc - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/only-skip-once/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %target-swiftc_driver -driver-show-job-lifecycle -output-file-map %t/output-file-map.json -incremental main.swift file1.swift file2.swift -j1 2>&1 | %FileCheck -check-prefix=CHECK-INITIAL %s - -// CHECK-INITIAL: {{(Job finished: {compile: main.o <= main.swift}|Finished Compiling main.swift)}} -// CHECK-INITIAL: {{(Job finished: {compile: file1.o <= file1.swift}|Finished Compiling file1.swift)}} -// CHECK-INITIAL: {{(Job finished: {compile: file2.o <= file2.swift}|Finished Compiling file2.swift)}} -// CHECK-INITIAL: {{(Job finished: {link: main <= main.o file1.o file2.o|Finished Linking main)}} - -// RUN: touch -t 201401240006 %t/file2.swift -// RUN: cd %t && %target-swiftc_driver -driver-show-job-lifecycle -output-file-map %t/output-file-map.json -incremental main.swift file1.swift file2.swift -j1 2>&1 | %FileCheck -check-prefix=CHECK-REBUILD %s - -// We should skip the main and file1 rebuilds here, but we should only note skipping them _once_ -// CHECK-REBUILD-DAG: {{(Job finished: {compile: file2.o <= file2.swift}|Finished Compiling file2.swift)}} -// CHECK-REBUILD-DAG: {{(Job skipped: {compile: main.o <= main.swift}|Skipped Compiling main.swift)}} -// CHECK-REBUILD-DAG: {{(Job skipped: {compile: file1.o <= file1.swift}|Skipped Compiling file1.swift)}} -// CHECK-REBUILD-DAG: {{(Job finished: {link: main <= main.o file1.o file2.o|Finished Linking main)}} -// CHECK-REBUILD-NOT: {{(Job skipped:|Skipped)}} diff --git a/test/Driver/Dependencies/private-after-fine.swift b/test/Driver/Dependencies/private-after-fine.swift deleted file mode 100644 index e4478840f465b..0000000000000 --- a/test/Driver/Dependencies/private-after-fine.swift +++ /dev/null @@ -1,54 +0,0 @@ -/// a --> b ==> c | a ==> d | e ==> b | f ==> g -/// a --> b ==> c | a ==> d +==> e +==> b, e --> f ==> g - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/private-after-fine/* %t -// RUN: touch -t 201401240005 %t/*.swift - -// Generate the build record... -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./b.swift ./c.swift ./d.swift ./e.swift ./f.swift ./g.swift -module-name main -j1 -v - -// ...then reset the .swiftdeps files. -// RUN: cp -r %S/Inputs/private-after-fine/*.swiftdeps %t - -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./b.swift ./c.swift ./d.swift ./e.swift ./f.swift ./g.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-INITIAL %s - -// CHECK-INITIAL-NOT: warning -// CHECK-INITIAL-NOT: Handled - -// RUN: touch -t 201401240006 %t/a.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./b.swift ./c.swift ./d.swift ./e.swift ./f.swift ./g.swift -module-name main -j1 -v > %t/a.txt 2>&1 -// RUN: %FileCheck -check-prefix=CHECK-A %s < %t/a.txt -// RUN: %FileCheck -check-prefix=CHECK-A-NEG %s < %t/a.txt - -// CHECK-A: Handled a.swift -// CHECK-A-DAG: Handled b.swift -// CHECK-A-DAG: Handled d.swift -// CHECK-A: Handled e.swift -// CHECK-A-DAG: Handled c.swift -// CHECK-A-DAG: Handled f.swift -// CHECK-A-NEG-NOT: Handled g.swift - - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/private-after-fine/* %t -// RUN: touch -t 201401240005 %t/*.swift - -// Generate the build record... -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./b.swift ./c.swift ./d.swift ./e.swift ./f.swift ./g.swift -module-name main -j1 -v - -// ...then reset the .swiftdeps files. -// RUN: cp -r %S/Inputs/private-after-fine/*.swiftdeps %t - -// RUN: touch -t 201401240006 %t/f.swift -// RUN: cd %t && %swiftc_driver -c -disable-incremental-imports -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./b.swift ./c.swift ./d.swift ./e.swift ./f.swift ./g.swift -module-name main -j1 -v > %t/f.txt 2>&1 -// RUN: %FileCheck -check-prefix=CHECK-F %s < %t/f.txt -// RUN: %FileCheck -check-prefix=CHECK-F-NEG %s < %t/f.txt - -// CHECK-F: Handled f.swift -// CHECK-F: Handled g.swift -// CHECK-F-NEG-NOT: Handled a.swift -// CHECK-F-NEG-NOT: Handled b.swift -// CHECK-F-NEG-NOT: Handled c.swift -// CHECK-F-NEG-NOT: Handled d.swift -// CHECK-F-NEG-NOT: Handled e.swift diff --git a/test/Driver/Dependencies/private-fine.swift b/test/Driver/Dependencies/private-fine.swift deleted file mode 100644 index 3e54514c5c527..0000000000000 --- a/test/Driver/Dependencies/private-fine.swift +++ /dev/null @@ -1,87 +0,0 @@ -// a ==> b --> c ==> d | e ==> c - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/private-fine/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./b.swift ./c.swift ./d.swift ./e.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-INITIAL %s - -// CHECK-INITIAL-NOT: warning -// CHECK-INITIAL: Handled a.swift -// CHECK-INITIAL: Handled b.swift -// CHECK-INITIAL: Handled c.swift -// CHECK-INITIAL: Handled d.swift -// CHECK-INITIAL: Handled e.swift - -// RUN: touch -t 201401240006 %t/a.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./b.swift ./c.swift ./d.swift ./e.swift -module-name main -j1 -v > %t/a.txt 2>&1 -// RUN: %FileCheck -check-prefix=CHECK-A %s < %t/a.txt -// RUN: %FileCheck -check-prefix=CHECK-A-NEG %s < %t/a.txt - -// CHECK-A: Handled a.swift -// CHECK-A-DAG: Handled b.swift -// CHECK-A-DAG: Handled c.swift -// CHECK-A-NEG-NOT: Handled d.swift -// CHECK-A-NEG-NOT: Handled e.swift - -// RUN: touch -t 201401240006 %t/b.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./b.swift ./c.swift ./d.swift ./e.swift -module-name main -j1 -v > %t/b.txt 2>&1 -// RUN: %FileCheck -check-prefix=CHECK-B %s < %t/b.txt -// RUN: %FileCheck -check-prefix=CHECK-B-NEG %s < %t/b.txt - -// CHECK-B-NEG-NOT: Handled a.swift -// CHECK-B: Handled b.swift -// CHECK-B: Handled c.swift -// CHECK-B-NEG-NOT: Handled d.swift -// CHECK-B-NEG-NOT: Handled e.swift - -// RUN: touch -t 201401240006 %t/c.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./b.swift ./c.swift ./d.swift ./e.swift -module-name main -j1 -v > %t/c.txt 2>&1 -// RUN: %FileCheck -check-prefix=CHECK-C %s < %t/c.txt -// RUN: %FileCheck -check-prefix=CHECK-C-NEG %s < %t/c.txt - -// CHECK-C-NEG-NOT: Handled a.swift -// CHECK-C-NEG-NOT: Handled b.swift -// CHECK-C: Handled c.swift -// CHECK-C: Handled d.swift -// CHECK-C-NEG-NOT: Handled e.swift - -// RUN: touch -t 201401240006 %t/d.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./b.swift ./c.swift ./d.swift ./e.swift -module-name main -j1 -v > %t/d.txt 2>&1 -// RUN: %FileCheck -check-prefix=CHECK-D %s < %t/d.txt -// RUN: %FileCheck -check-prefix=CHECK-D-NEG %s < %t/d.txt - -// CHECK-D-NEG-NOT: Handled a.swift -// CHECK-D-NEG-NOT: Handled b.swift -// CHECK-D-NEG-NOT: Handled c.swift -// CHECK-D: Handled d.swift -// CHECK-D-NEG-NOT: Handled e.swift - -// RUN: touch -t 201401240006 %t/e.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./b.swift ./c.swift ./d.swift ./e.swift -module-name main -j1 -v > %t/e.txt 2>&1 -// RUN: %FileCheck -check-prefix=CHECK-E %s < %t/e.txt -// RUN: %FileCheck -check-prefix=CHECK-E-NEG %s < %t/e.txt - -// CHECK-E-NEG-NOT: Handled a.swift -// CHECK-E-NEG-NOT: Handled b.swift -// CHECK-E: Handled c.swift -// CHECK-E-NEG-NOT: Handled a.swift -// CHECK-E-NEG-NOT: Handled b.swift -// CHECK-E: Handled d.swift -// CHECK-E-NEG-NOT: Handled a.swift -// CHECK-E-NEG-NOT: Handled b.swift -// CHECK-E: Handled e.swift -// CHECK-E-NEG-NOT: Handled a.swift -// CHECK-E-NEG-NOT: Handled b.swift - -// RUN: touch -t 201401240007 %t/a.swift %t/e.swift -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./a.swift ./b.swift ./c.swift ./d.swift ./e.swift -module-name main -j1 -v > %t/ae.txt 2>&1 -// RUN: %FileCheck -check-prefix=CHECK-AE %s < %t/ae.txt -// RUN: %FileCheck -check-prefix=CHECK-AE-NEG %s < %t/ae.txt - -// CHECK-AE: Handled a.swift -// CHECK-AE: Handled b.swift -// CHECK-AE: Handled c.swift -// CHECK-AE: Handled d.swift -// CHECK-AE: Handled e.swift -// CHECK-AE-NEG: Handled diff --git a/test/Driver/Dependencies/whole-module-build-record.swift b/test/Driver/Dependencies/whole-module-build-record.swift deleted file mode 100644 index 309b08ed65a5d..0000000000000 --- a/test/Driver/Dependencies/whole-module-build-record.swift +++ /dev/null @@ -1,20 +0,0 @@ -/// other ==> main - -// RUN: %empty-directory(%t) -// RUN: cp -r %S/Inputs/one-way/* %t -// RUN: touch -t 201401240005 %t/* - -// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/fake-build-whole-module.py" -output-file-map %t/output.json -whole-module-optimization ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s -// RUN: %FileCheck -check-prefix=CHECK-RECORD %s < %t/main~buildrecord.swiftdeps - -// CHECK-FIRST-NOT: warning -// CHECK-FIRST: Produced main.o - -// CHECK-RECORD-DAG: "{{(./)?}}main.swift": [ -// CHECK-RECORD-DAG: "{{(./)?}}other.swift": [ - - -// RUN: touch -t 201401240006 %t/other.swift -// RUN: cd %t && not %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/../Inputs/fail.py" -output-file-map %t/output.json -whole-module-optimization ./main.swift ./other.swift -module-name main -j1 -v 2>&1 - -// Just don't crash. diff --git a/test/Driver/batch_mode_dependencies_make_wrong_order.swift b/test/Driver/batch_mode_dependencies_make_wrong_order.swift deleted file mode 100644 index 46c700b058394..0000000000000 --- a/test/Driver/batch_mode_dependencies_make_wrong_order.swift +++ /dev/null @@ -1,28 +0,0 @@ -// RUN: %empty-directory(%t) -// RUN: echo 'class a {}' >%t/a.swift -// RUN: echo 'class b : a {}' >%t/b.swift -// RUN: echo 'class c : b {}' >%t/c.swift -// RUN: echo 'class d : c {}' >%t/d.swift -// RUN: echo 'public func main() {}' >%t/main.swift - -// First prime the incremental state, but note that we're building in the d c b a (reverse-alphabetical) order. -// RUN: cd %t && %target-stdlib-swiftc_driver -enable-batch-mode -incremental -output-file-map %S/Inputs/abcd_filemap.yaml -module-name main -j 1 d.swift c.swift b.swift a.swift main.swift -// -// Now perturb the interface of a.swift and delete its output -// RUN: echo 'class a { var x : Int = 10 }' >%t/a.swift -// RUN: rm %t/a.o -// -// Now rebuild, which will rebuild a.swift then do a cascading dep-graph invalidation -// RUN: cd %t && %target-stdlib-swiftc_driver -enable-batch-mode -incremental -output-file-map %S/Inputs/abcd_filemap.yaml -module-name main -j 1 d.swift c.swift b.swift a.swift main.swift -driver-show-incremental -driver-show-job-lifecycle >%t/out.txt 2>&1 -// RUN: %FileCheck %s <%t/out.txt -// -// Check that we saw invalidation happen in command-line argument order -// CHECK: Queuing because of dependencies discovered later: {compile: d.o <= d.swift} -// CHECK: Queuing because of dependencies discovered later: {compile: c.o <= c.swift} -// CHECK: Queuing because of dependencies discovered later: {compile: b.o <= b.swift} -// CHECK: Batchable: {compile: d.o <= d.swift} -// CHECK: Batchable: {compile: c.o <= c.swift} -// CHECK: Batchable: {compile: b.o <= b.swift} -// -// Check that we still issued the job in reverse-alphabetic order -// CHECK: Adding batch job to task queue: {compile: d.o c.o b.o <= d.swift c.swift b.swift} diff --git a/test/Driver/bindings.swift b/test/Driver/bindings.swift index dfdca5d9a4aa8..743229c75922e 100644 --- a/test/Driver/bindings.swift +++ b/test/Driver/bindings.swift @@ -29,12 +29,6 @@ // RUN: %swiftc_driver -driver-print-bindings -target x86_64-apple-macosx10.9 -emit-ir %S/Inputs/empty.sil 2>&1 | %FileCheck %s -check-prefix=SIL-INPUT // SIL-INPUT: # "x86_64-apple-macosx10.9" - "swift{{(-frontend|c)?(\.exe)?}}", inputs: ["{{.*}}empty.sil"], output: {llvm-ir: "-"} -// RUN: %swiftc_driver -driver-print-bindings -target x86_64-apple-macosx10.9 -c -incremental %/s 2>&1 | %FileCheck %s -check-prefix=OBJ-AND-DEPS -// OBJ-AND-DEPS: # "x86_64-apple-macosx10.9" - "swift{{(-frontend|c)?(\.exe)?}}", inputs: ["{{.*}}bindings.swift"], output: { -// OBJ-AND-DEPS-DAG: swift-dependencies: "bindings.swiftdeps" -// OBJ-AND-DEPS-DAG: object: "bindings.o" -// OBJ-AND-DEPS: } - // RUN: echo '{"%/s": {"object": "objroot/bindings.o"}}' > %t/map.json // RUN: %swiftc_driver -driver-print-bindings -output-file-map %t/map.json -target x86_64-apple-macosx10.9 %/s 2>&1 | %FileCheck %s -check-prefix=MAP // MAP: # "x86_64-apple-macosx10.9" - "swift{{(-frontend|c)?(\.exe)?}}", inputs: ["{{.*}}bindings.swift"], output: {object: "objroot/bindings.o"} diff --git a/test/Driver/cross_module.swift b/test/Driver/cross_module.swift deleted file mode 100644 index 968d6c93ab9a8..0000000000000 --- a/test/Driver/cross_module.swift +++ /dev/null @@ -1,6 +0,0 @@ -// RUN: %empty-directory(%t/sub) -// RUN: echo "{\"\": {\"swift-dependencies\": \"cross_module.swiftdeps\"}}" > %t/ofm.json -// RUN: %swiftc_driver -incremental -emit-module -module-name cross_module -output-file-map=%/t/ofm.json -driver-print-jobs -target x86_64-apple-macosx10.9 %s -disable-incremental-imports 2>^1 | %FileCheck -check-prefix ENABLE %s - -// ENABLE: {{bin(/|\\\\)swift(-frontend|c)?(\.exe)?"?}} -frontend -merge-modules -// ENABLE-SAME: -disable-incremental-imports diff --git a/test/Driver/driver-compile.swift b/test/Driver/driver-compile.swift index 5910b4f1b794e..c12daee8b509e 100644 --- a/test/Driver/driver-compile.swift +++ b/test/Driver/driver-compile.swift @@ -54,14 +54,6 @@ // Clean up the test executable because hard links are expensive. // RUN: rm -rf %t/DISTINCTIVE-PATH/usr/bin/swiftc -// RUN: %swiftc_driver -driver-print-jobs -whole-module-optimization -incremental %s 2>&1 > %t.wmo-inc.txt -// RUN: %FileCheck %s < %t.wmo-inc.txt -// RUN: %FileCheck -check-prefix NO-REFERENCE-DEPENDENCIES %s < %t.wmo-inc.txt - -// RUN: %swiftc_driver -driver-print-jobs -embed-bitcode -incremental %s 2>&1 > %t.embed-inc.txt -// RUN: %FileCheck %s < %t.embed-inc.txt -// RUN: %FileCheck -check-prefix NO-REFERENCE-DEPENDENCIES %s < %t.embed-inc.txt - // REQUIRES: CODEGENERATOR=X86 // swift-frontend cannot be copied to another location with bootstrapping because @@ -82,7 +74,6 @@ // COMPLEX-DAG: -F /path/to/frameworks -Fsystem /path/to/systemframeworks -F /path/to/more/frameworks // COMPLEX-DAG: -I /path/to/headers -I path/to/more/headers // COMPLEX-DAG: -module-cache-path /tmp/modules -// COMPLEX-DAG: -emit-reference-dependencies-path {{(.*(/|\\))?driver-compile[^ /]*}}.swiftdeps // COMPLEX: -o {{.+}}.o @@ -135,6 +126,3 @@ // UPDATE-CODE: {{DISTINCTIVE-PATH|distinctive-path}}{{/|\\\\}}usr{{/|\\\\}}bin{{/|\\\\}}swift{{c?(\.exe)?}} // UPDATE-CODE: -frontend -c // UPDATE-CODE: -emit-remap-file-path {{.+}}.remap - -// NO-REFERENCE-DEPENDENCIES: bin{{/|\\\\}}swift -// NO-REFERENCE-DEPENDENCIES-NOT: -emit-reference-dependencies diff --git a/test/Driver/options.swift b/test/Driver/options.swift index ecb5d4eafe1a8..d001acde914ac 100644 --- a/test/Driver/options.swift +++ b/test/Driver/options.swift @@ -83,14 +83,6 @@ // RUN: not %swiftc_driver_plain -target x86_64-unknown-hurd -### %s 2>&1 | %FileCheck -check-prefix=BAD_TARGET %s // BAD_TARGET: error: unknown target 'x86_64-unknown-hurd' -// RUN: %swiftc_driver -incremental %s -### 2>&1 | %FileCheck -check-prefix=INCREMENTAL_WITHOUT_OFM %s -// INCREMENTAL_WITHOUT_OFM: warning: ignoring -incremental (currently requires an output file map) -// INCREMENTAL_WITHOUT_OFM: swift{{(-frontend|c)?(\.exe)?"?}} -frontend - -// RUN: %swiftc_driver -incremental -output-file-map %S/Inputs/empty-ofm.json %s -### 2>&1 | %FileCheck -check-prefix=INCREMENTAL_WITHOUT_OFM_ENTRY %s -// INCREMENTAL_WITHOUT_OFM_ENTRY: ignoring -incremental; output file map has no master dependencies entry ("swift-dependencies" under "") -// INCREMENTAL_WITHOUT_OFM_ENTRY: swift{{(-frontend|c)?(\.exe)?"?}} -frontend - // RUN: %swiftc_driver -driver-print-jobs -enforce-exclusivity=checked %s | %FileCheck -check-prefix=EXCLUSIVITY_CHECKED %s // EXCLUSIVITY_CHECKED: swift // EXCLUSIVITY_CHECKED: -enforce-exclusivity=checked diff --git a/test/Driver/working-directory.swift b/test/Driver/working-directory.swift index 8981291864467..26919e89d6472 100644 --- a/test/Driver/working-directory.swift +++ b/test/Driver/working-directory.swift @@ -65,12 +65,6 @@ // RUN: cd %S && %swiftc_driver -driver-print-jobs -working-directory %/t -c main.swift -output-file-map=ofmo2.json | %FileCheck %s -check-prefix=OUTPUT_FILE_MAP_2 --enable-yaml-compatibility // OUTPUT_FILE_MAP_2: BUILD_DIR{{.*}}main-modified.o -// RUN: %empty-directory(%t/sub) -// RUN: echo "{\"\": {\"swift-dependencies\": \"br.swiftdeps\"}}" > %t/sub/ofmo.json -// RUN: touch %t/sub/a.swift %t/sub/b.swift -// RUN: cd %t && %swiftc_driver -incremental -working-directory %/t/sub -emit-dependencies -c -module-name ab a.swift b.swift -output-file-map=%/t/sub/ofmo.json -// RUN: ls %t/sub/br.swiftdeps - // RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -Xcc -working-directory -Xcc %/t -c %/s | %FileCheck %s -check-prefix=CLANG // CLANG: -Xcc -working-directory -Xcc SOURCE_DIR // CLANG-SAME: -Xcc -working-directory -Xcc BUILD_DIR diff --git a/test/Incremental/Dependencies/Inputs/InterestingType.swift b/test/Incremental/Dependencies/Inputs/InterestingType.swift deleted file mode 100644 index 25defb0e434b6..0000000000000 --- a/test/Incremental/Dependencies/Inputs/InterestingType.swift +++ /dev/null @@ -1,23 +0,0 @@ -protocol IntMaker {} -extension IntMaker { - func make() -> Int { return 0 } -} - -protocol DoubleMaker {} -extension DoubleMaker { - func make() -> Double { return 0 } -} - - -#if OLD -typealias InterestingType = Int -typealias InterestingProto = IntMaker - -#elseif NEW -typealias InterestingType = Double -typealias InterestingProto = DoubleMaker - -#else -typealias InterestingType = ErrorMustSetOLDOrNew - -#endif diff --git a/test/Incremental/Dependencies/function-fine.swift b/test/Incremental/Dependencies/function-fine.swift deleted file mode 100644 index 42cf0b00f9f24..0000000000000 --- a/test/Incremental/Dependencies/function-fine.swift +++ /dev/null @@ -1,15 +0,0 @@ -// RUN: %target-swift-frontend -emit-silgen -primary-file %s %S/Inputs/InterestingType.swift -DOLD -emit-reference-dependencies-path %t.swiftdeps -module-name main | %FileCheck %s -check-prefix=CHECK-OLD -// RUN: %{python} %S/../../Inputs/process_fine_grained_swiftdeps.py %swift-dependency-tool %t.swiftdeps > %t-processed.swiftdeps -// RUN: %FileCheck -check-prefix=CHECK-DEPS %s < %t-processed.swiftdeps - -// RUN: %target-swift-frontend -emit-silgen -primary-file %s %S/Inputs/InterestingType.swift -DNEW -emit-reference-dependencies-path %t.swiftdeps -module-name main | %FileCheck %s -check-prefix=CHECK-NEW -// RUN: %{python} %S/../../Inputs/process_fine_grained_swiftdeps.py %swift-dependency-tool %t.swiftdeps > %t-processed.swiftdeps -// RUN: %FileCheck -check-prefix=CHECK-DEPS %s < %t-processed.swiftdeps - -private func testParamType(_: InterestingType) {} - -// CHECK-OLD: sil_global hidden @$s4main1x{{[^ ]+}} : ${{(@[a-zA-Z_]+ )?}}(Int) -> () -// CHECK-NEW: sil_global hidden @$s4main1x{{[^ ]+}} : ${{(@[a-zA-Z_]+ )?}}(Double) -> () -internal var x = testParamType - -// CHECK-DEPS: topLevel interface '' InterestingType false diff --git a/test/Incremental/Dependencies/function-return-type-fine.swift b/test/Incremental/Dependencies/function-return-type-fine.swift deleted file mode 100644 index 0852a9b06dc3a..0000000000000 --- a/test/Incremental/Dependencies/function-return-type-fine.swift +++ /dev/null @@ -1,15 +0,0 @@ -// RUN: %target-swift-frontend -emit-silgen -primary-file %s %S/Inputs/InterestingType.swift -DOLD -emit-reference-dependencies-path %t.swiftdeps -module-name main | %FileCheck %s -check-prefix=CHECK-OLD -// RUN: %{python} %S/../../Inputs/process_fine_grained_swiftdeps.py %swift-dependency-tool %t.swiftdeps > %t-processed.swiftdeps -// RUN: %FileCheck -check-prefix=CHECK-DEPS %s < %t-processed.swiftdeps - -// RUN: %target-swift-frontend -emit-silgen -primary-file %s %S/Inputs/InterestingType.swift -DNEW -emit-reference-dependencies-path %t.swiftdeps -module-name main | %FileCheck %s -check-prefix=CHECK-NEW -// RUN: %{python} %S/../../Inputs/process_fine_grained_swiftdeps.py %swift-dependency-tool %t.swiftdeps > %t-processed.swiftdeps -// RUN: %FileCheck -check-prefix=CHECK-DEPS %s < %t-processed.swiftdeps - -private func testReturnType() -> InterestingType { fatalError() } - -// CHECK-OLD: sil_global @$s4main1x{{[^ ]+}} : $Int -// CHECK-NEW: sil_global @$s4main1x{{[^ ]+}} : $Double -public var x = testReturnType() + 0 - -// CHECK-DEPS: topLevel interface '' InterestingType false diff --git a/test/Incremental/Dependencies/protocol-conformer-ext-fine.swift b/test/Incremental/Dependencies/protocol-conformer-ext-fine.swift deleted file mode 100644 index 53b3ea9745d9e..0000000000000 --- a/test/Incremental/Dependencies/protocol-conformer-ext-fine.swift +++ /dev/null @@ -1,20 +0,0 @@ -// RUN: %target-swift-frontend -emit-silgen -primary-file %s %S/Inputs/InterestingType.swift -DOLD -emit-reference-dependencies-path %t.swiftdeps -module-name main | %FileCheck %s -check-prefix=CHECK-OLD -// RUN: %{python} %S/../../Inputs/process_fine_grained_swiftdeps.py %swift-dependency-tool %t.swiftdeps > %t-processed.swiftdeps -// RUN: %FileCheck -check-prefix=CHECK-DEPS %s < %t-processed.swiftdeps - -// RUN: %target-swift-frontend -emit-silgen -primary-file %s %S/Inputs/InterestingType.swift -DNEW -emit-reference-dependencies-path %t.swiftdeps -module-name main | %FileCheck %s -check-prefix=CHECK-NEW -// RUN: %{python} %S/../../Inputs/process_fine_grained_swiftdeps.py %swift-dependency-tool %t.swiftdeps > %t-processed.swiftdeps -// RUN: %FileCheck -check-prefix=CHECK-DEPS %s < %t-processed.swiftdeps - -private struct Test {} -extension Test : InterestingProto {} - -// CHECK-OLD: sil_global @$s4main1x{{[^ ]+}} : $Int -// CHECK-NEW: sil_global @$s4main1x{{[^ ]+}} : $Double -public var x = Test().make() + 0 - -// CHECK-DEPS-DAG: topLevel interface '' InterestingProto false - -// CHECK-DEPS-DAG: member interface 4main{{8IntMaker|11DoubleMaker}}P make false - -// CHECK-DEPS-DAG: nominal interface 4main{{8IntMaker|11DoubleMaker}}P '' false diff --git a/test/Incremental/Dependencies/protocol-conformer-fine.swift b/test/Incremental/Dependencies/protocol-conformer-fine.swift deleted file mode 100644 index f73f340739dae..0000000000000 --- a/test/Incremental/Dependencies/protocol-conformer-fine.swift +++ /dev/null @@ -1,19 +0,0 @@ -// RUN: %target-swift-frontend -emit-silgen -primary-file %s %S/Inputs/InterestingType.swift -DOLD -emit-reference-dependencies-path %t.swiftdeps -module-name main | %FileCheck %s -check-prefix=CHECK-OLD -// RUN: %{python} %S/../../Inputs/process_fine_grained_swiftdeps.py %swift-dependency-tool %t.swiftdeps > %t-processed.swiftdeps -// RUN: %FileCheck -check-prefix=CHECK-DEPS %s < %t-processed.swiftdeps - -// RUN: %target-swift-frontend -emit-silgen -primary-file %s %S/Inputs/InterestingType.swift -DNEW -emit-reference-dependencies-path %t.swiftdeps -module-name main | %FileCheck %s -check-prefix=CHECK-NEW -// RUN: %{python} %S/../../Inputs/process_fine_grained_swiftdeps.py %swift-dependency-tool %t.swiftdeps > %t-processed.swiftdeps -// RUN: %FileCheck -check-prefix=CHECK-DEPS %s < %t-processed.swiftdeps - -private struct Test : InterestingProto {} - -// CHECK-OLD: sil_global @$s4main1x{{[^ ]+}} : $Int -// CHECK-NEW: sil_global @$s4main1x{{[^ ]+}} : $Double -public var x = Test().make() + 0 - -// CHECK-DEPS-DAG: topLevel interface '' InterestingProto false - -// CHECK-DEPS-DAG: member interface 4main{{8IntMaker|11DoubleMaker}}P make false - -// CHECK-DEPS-DAG: nominal interface 4main{{8IntMaker|11DoubleMaker}}P '' false diff --git a/test/Incremental/Dependencies/reference-dependencies-consistency-fine.swift b/test/Incremental/Dependencies/reference-dependencies-consistency-fine.swift deleted file mode 100644 index 669e7753143de..0000000000000 --- a/test/Incremental/Dependencies/reference-dependencies-consistency-fine.swift +++ /dev/null @@ -1,19 +0,0 @@ -// Some types, such as StringLiteralType, used to be cached in the TypeChecker. -// Consequently, the second primary file (in batch mode) to use that type would -// hit in the cache and no dependency would be recorded. -// This test ensures that this bug stays fixed. -// -// RUN: %empty-directory(%t) -// -// Create two identical inputs, each needing StringLiteralType: -// -// RUN: echo 'fileprivate var v: String { return "\(x)" }; fileprivate let x = "a"' >%t/1.swift -// RUN: echo 'fileprivate var v: String { return "\(x)" }; fileprivate let x = "a"' >%t/2.swift -// -// RUN: %target-swift-frontend -typecheck -primary-file %t/1.swift -primary-file %t/2.swift -emit-reference-dependencies-path %t/1.swiftdeps -emit-reference-dependencies-path %t/2.swiftdeps -// -// Sequence numbers can vary -// RUN: sed -e 's/[0-9][0-9]*/N/g' -e 's/N, //g' -e '/^ *$/d' <%t/1.swiftdeps | sort >%t/1-processed.swiftdeps -// RUN: sed -e 's/[0-9][0-9]*/N/g' -e 's/N, //g' -e '/^ *$/d' <%t/2.swiftdeps | sort >%t/2-processed.swiftdeps - -// RUN: cmp -s %t/1-processed.swiftdeps %t/2-processed.swiftdeps diff --git a/test/Incremental/Dependencies/reference-dependencies-dynamic-lookup-fine.swift b/test/Incremental/Dependencies/reference-dependencies-dynamic-lookup-fine.swift deleted file mode 100644 index 2d24d68b8d1c1..0000000000000 --- a/test/Incremental/Dependencies/reference-dependencies-dynamic-lookup-fine.swift +++ /dev/null @@ -1,69 +0,0 @@ -// RUN: %empty-directory(%t) -// RUN: cp %s %t/main.swift -// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -primary-file %t/main.swift -emit-reference-dependencies-path - > %t.swiftdeps - -// Check that the output is deterministic. -// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -primary-file %t/main.swift -emit-reference-dependencies-path - > %t-2.swiftdeps -// RUN: %{python} %S/../../Inputs/process_fine_grained_swiftdeps.py %swift-dependency-tool %t.swiftdeps > %t-processed.swiftdeps -// RUN: %{python} %S/../../Inputs/process_fine_grained_swiftdeps.py %swift-dependency-tool %t-2.swiftdeps > %t-2-processed.swiftdeps -// RUN: diff %t-processed.swiftdeps %t-2-processed.swiftdeps - -// RUN: %FileCheck %s < %t-processed.swiftdeps -// RUN: %FileCheck -check-prefix=NEGATIVE %s < %t-processed.swiftdeps -// RUN: %FileCheck -check-prefix=DUPLICATE %s < %t-processed.swiftdeps - - -// REQUIRES: objc_interop - -import Foundation - -@objc @objcMembers class Base : NSObject { - // CHECK-DAG: dynamicLookup implementation '' foo true - // CHECK-DAG: dynamicLookup interface '' foo true - func foo() {} - - // CHECK-DAG: dynamicLookup implementation '' bar true - // CHECK-DAG: dynamicLookup interface '' bar true - - // DUPLICATE-NOT: dynamicLookup implementation '' bar true - // DUPLICATE: dynamicLookup implementation '' bar true - // DUPLICATE-NOT: dynamicLookup implementation '' bar true - // DUPLICATE-NOT: dynamicLookup interface '' bar true - // DUPLICATE: dynamicLookup interface '' bar true - // DUPLICATE-NOT: dynamicLookup interface '' bar true - func bar(_ x: Int, y: Int) {} - func bar(_ str: String) {} - - // CHECK-DAG: dynamicLookup implementation '' prop true - // CHECK-DAG: dynamicLookup interface '' prop true - var prop: String? - - // CHECK-DAG: dynamicLookup implementation '' unusedProp true - // CHECK-DAG: dynamicLookup interface '' unusedProp true - var unusedProp: Int = 0 - - - // CHECK-DAG: dynamicLookup implementation '' classFunc true - // CHECK-DAG: dynamicLookup interface '' classFunc true - class func classFunc() {} -} - -func getAnyObject() -> AnyObject? { return nil } - -func testDynamicLookup(_ obj: AnyObject) { - // CHECK-DAG: dynamicLookup interface '' description false - _ = obj.description - // CHECK-DAG: dynamicLookup interface '' method false - _ = obj.method(5, with: 5.0 as Double) - - // TODO: unable to resolve ambiguity - // C/HECK-DAG: dynamicLookup interface '' subscript false - // _ = obj[2] as Any - // _ = obj[2] as Any! -} - -// CHECK-DAG: dynamicLookup interface '' counter false -let globalUse = getAnyObject()?.counter - -// NEGATIVE-NOT: dynamicLookup interface '' cat1Method false -// NEGATIVE-NOT: dynamicLookup interface '' unusedProp false diff --git a/test/Incremental/Dependencies/reference-dependencies-errors.swift b/test/Incremental/Dependencies/reference-dependencies-errors.swift deleted file mode 100644 index 72dc06066331f..0000000000000 --- a/test/Incremental/Dependencies/reference-dependencies-errors.swift +++ /dev/null @@ -1,9 +0,0 @@ -// RUN: %empty-directory(%t) -// RUN: cp %s %t/main.swift -// RUN: not %target-swift-frontend -typecheck -primary-file %t/main.swift -emit-reference-dependencies-path - > %t.swiftdeps - -associatedtype Baz -case bar -deinit {} -extension Foo {} -init() {} diff --git a/test/Incremental/Dependencies/reference-dependencies-fine.swift b/test/Incremental/Dependencies/reference-dependencies-fine.swift deleted file mode 100644 index 1081e31a7f309..0000000000000 --- a/test/Incremental/Dependencies/reference-dependencies-fine.swift +++ /dev/null @@ -1,542 +0,0 @@ -// RUN: %empty-directory(%t) -// RUN: cp %s %t/main.swift - -// Check that the output is deterministic. -// RUN: %target-swift-frontend -typecheck -primary-file %t/main.swift %S/../Inputs/reference-dependencies-helper.swift -emit-reference-dependencies-path - > %t.swiftdeps -// RUN: %target-swift-frontend -typecheck -primary-file %t/main.swift %S/../Inputs/reference-dependencies-helper.swift -emit-reference-dependencies-path - > %t-2.swiftdeps - -// Merge each entry onto one line and sort to overcome order differences -// RUN: %{python} %S/../../Inputs/process_fine_grained_swiftdeps.py %swift-dependency-tool %t.swiftdeps > %t-processed.swiftdeps -// RUN: %{python} %S/../../Inputs/process_fine_grained_swiftdeps.py %swift-dependency-tool %t-2.swiftdeps > %t-2-processed.swiftdeps -// RUN: diff %t-processed.swiftdeps %t-2-processed.swiftdeps - -// RUN: %FileCheck -check-prefix=NEGATIVE %s < %t-processed.swiftdeps -// RUN: %FileCheck %s -check-prefix=CHECK-TOPLEVEL < %t-processed.swiftdeps -// RUN: %FileCheck %s -check-prefix=CHECK-MEMBER < %t-processed.swiftdeps -// RUN: %FileCheck %s -check-prefix=CHECK-NOMINAL < %t-processed.swiftdeps -// RUN: %FileCheck %s -check-prefix=CHECK-NOMINAL-2 < %t-processed.swiftdeps -// RUN: %FileCheck %s -check-prefix=CHECK-POTENTIALMEMBER < %t-processed.swiftdeps - - -// CHECK-TOPLEVEL-DAG: topLevel interface '' IntWrapper true -// CHECK-TOPLEVEL-DAG: topLevel interface '' '==' true -// CHECK-TOPLEVEL-DAG: topLevel interface '' '<' true -// CHECK-TOPLEVEL-DAG: topLevel interface '' '***' true -// CHECK-TOPLEVEL-DAG: topLevel interface '' ^^^ true -// CHECK-TOPLEVEL-DAG: topLevel interface '' Subclass true -// CHECK-TOPLEVEL-DAG: topLevel interface '' MyArray true -// CHECK-TOPLEVEL-DAG: topLevel interface '' someGlobal true -// CHECK-TOPLEVEL-DAG: topLevel interface '' ExpressibleByExtraFloatLiteral true -// CHECK-TOPLEVEL-DAG: topLevel interface '' ThreeTilde true -// CHECK-TOPLEVEL-DAG: topLevel interface '' overloadedOnProto true -// CHECK-TOPLEVEL-DAG: topLevel interface '' FourTilde true -// CHECK-TOPLEVEL-DAG: topLevel interface '' FourTildeImpl true -// CHECK-TOPLEVEL-DAG: topLevel interface '' FiveTildeImpl true -// CHECK-TOPLEVEL-DAG: topLevel interface '' topLevelComputedProperty true -// CHECK-TOPLEVEL-DAG: topLevel interface '' lookUpManyTopLevelNames true -// CHECK-TOPLEVEL-DAG: topLevel interface '' testOperators true -// CHECK-TOPLEVEL-DAG: topLevel interface '' TopLevelForMemberLookup true -// CHECK-TOPLEVEL-DAG: topLevel interface '' lookUpMembers true -// CHECK-TOPLEVEL-DAG: topLevel interface '' publicUseOfMember true -// CHECK-TOPLEVEL-DAG: topLevel interface '' Outer true -// CHECK-TOPLEVEL-DAG: topLevel interface '' eof true -// CHECK-TOPLEVEL-DAG: topLevel interface '' '~~~' true -// CHECK-TOPLEVEL-DAG: topLevel interface '' '~~~~' true -// CHECK-TOPLEVEL-DAG: topLevel interface '' '~~~~~' true - -// CHECK-TOPLEVEL-DAG: topLevel implementation '' IntWrapper true -// CHECK-TOPLEVEL-DAG: topLevel implementation '' '==' true -// CHECK-TOPLEVEL-DAG: topLevel implementation '' '<' true -// CHECK-TOPLEVEL-DAG: topLevel implementation '' '***' true -// CHECK-TOPLEVEL-DAG: topLevel implementation '' ^^^ true -// CHECK-TOPLEVEL-DAG: topLevel implementation '' Subclass true -// CHECK-TOPLEVEL-DAG: topLevel implementation '' MyArray true -// CHECK-TOPLEVEL-DAG: topLevel implementation '' someGlobal true -// CHECK-TOPLEVEL-DAG: topLevel implementation '' ExpressibleByExtraFloatLiteral true -// CHECK-TOPLEVEL-DAG: topLevel implementation '' ThreeTilde true -// CHECK-TOPLEVEL-DAG: topLevel implementation '' overloadedOnProto true -// CHECK-TOPLEVEL-DAG: topLevel implementation '' FourTilde true -// CHECK-TOPLEVEL-DAG: topLevel implementation '' FourTildeImpl true -// CHECK-TOPLEVEL-DAG: topLevel implementation '' FiveTildeImpl true -// CHECK-TOPLEVEL-DAG: topLevel implementation '' topLevelComputedProperty true -// CHECK-TOPLEVEL-DAG: topLevel implementation '' lookUpManyTopLevelNames true -// CHECK-TOPLEVEL-DAG: topLevel implementation '' testOperators true -// CHECK-TOPLEVEL-DAG: topLevel implementation '' TopLevelForMemberLookup true -// CHECK-TOPLEVEL-DAG: topLevel implementation '' lookUpMembers true -// CHECK-TOPLEVEL-DAG: topLevel implementation '' publicUseOfMember true -// CHECK-TOPLEVEL-DAG: topLevel implementation '' Outer true -// CHECK-TOPLEVEL-DAG: topLevel implementation '' eof true -// CHECK-TOPLEVEL-DAG: topLevel implementation '' '~~~' true -// CHECK-TOPLEVEL-DAG: topLevel implementation '' '~~~~' true -// CHECK-TOPLEVEL-DAG: topLevel implementation '' '~~~~~' true - - -// CHECK-NOMINAL-DAG: nominal interface 4main10IntWrapperV '' true -// CHECK-NOMINAL-DAG: nominal interface 4main10IntWrapperV16InnerForNoReasonV '' true -// CHECK-NOMINAL-DAG: nominal interface 4main8SubclassC '' true -// CHECK-NOMINAL-DAG: nominal interface Sb4mainE11InnerToBoolV '' true -// CHECK-NOMINAL-DAG: nominal interface 4main9Sentinel1V '' true -// CHECK-NOMINAL-DAG: nominal interface 4main9Sentinel2V '' true - -// CHECK-NOMINAL-DAG: nominal implementation 4main10IntWrapperV '' true -// CHECK-NOMINAL-DAG: nominal implementation 4main10IntWrapperV16InnerForNoReasonV '' true -// CHECK-NOMINAL-DAG: nominal implementation 4main8SubclassC '' true -// CHECK-NOMINAL-DAG: nominal implementation Sb4mainE11InnerToBoolV '' true -// CHECK-NOMINAL-DAG: nominal implementation 4main9Sentinel1V '' true -// CHECK-NOMINAL-DAG: nominal implementation 4main9Sentinel2V '' true - - -// CHECK-POTENTIALMEMBER-DAG: potentialMember interface 4main10IntWrapperV '' true -// CHECK-POTENTIALMEMBER-DAG: potentialMember interface 4main10IntWrapperV16InnerForNoReasonV '' true -// CHECK-POTENTIALMEMBER-DAG: potentialMember interface 4main8SubclassC '' true -// CHECK-POTENTIALMEMBER-DAG: potentialMember interface s25ExpressibleByArrayLiteralP '' true -// CHECK-POTENTIALMEMBER-DAG: potentialMember interface Sb '' true -// CHECK-POTENTIALMEMBER-DAG: potentialMember interface Sb4mainE11InnerToBoolV '' true -// CHECK-POTENTIALMEMBER-DAG: potentialMember interface 4main9Sentinel1V '' true -// CHECK-POTENTIALMEMBER-DAG: potentialMember interface 4main9Sentinel2V '' true - -// CHECK-POTENTIALMEMBER-DAG: potentialMember implementation 4main10IntWrapperV '' true -// CHECK-POTENTIALMEMBER-DAG: potentialMember implementation 4main10IntWrapperV16InnerForNoReasonV '' true -// CHECK-POTENTIALMEMBER-DAG: potentialMember implementation 4main8SubclassC '' true -// CHECK-POTENTIALMEMBER-DAG: potentialMember implementation s25ExpressibleByArrayLiteralP '' true -// CHECK-POTENTIALMEMBER-DAG: potentialMember implementation Sb '' true -// CHECK-POTENTIALMEMBER-DAG: potentialMember implementation Sb4mainE11InnerToBoolV '' true -// CHECK-POTENTIALMEMBER-DAG: potentialMember implementation 4main9Sentinel1V '' true -// CHECK-POTENTIALMEMBER-DAG: potentialMember implementation 4main9Sentinel2V '' true - - -// CHECK-MEMBER-DAG: member interface s25ExpressibleByArrayLiteralP useless true -// CHECK-MEMBER-DAG: member interface s25ExpressibleByArrayLiteralP useless2 true -// CHECK-MEMBER-DAG: member interface Sb InnerToBool true -// CHECK-MEMBER-DAG: member interface {{.*[0-9]}}FourTildeImplV '~~~~' true -// CHECK-MEMBER-DAG: member interface {{.*[0-9]}}FiveTildeImplV '~~~~~' true - -// CHECK-MEMBER-DAG: member implementation s25ExpressibleByArrayLiteralP useless true -// CHECK-MEMBER-DAG: member implementation s25ExpressibleByArrayLiteralP useless2 true -// CHECK-MEMBER-DAG: member implementation Sb InnerToBool true -// CHECK-MEMBER-DAG: member implementation {{.*[0-9]}}FourTildeImplV '~~~~' true -// CHECK-MEMBER-DAG: member implementation {{.*[0-9]}}FiveTildeImplV '~~~~~' true - - -// CHECK-TOPLEVEL-DAG: topLevel interface '' Comparable false - -struct IntWrapper: Comparable { - // CHECK-TOPLEVEL-DAG: topLevel interface '' Int false - var value: Int - - struct InnerForNoReason {} - - // CHECK-TOPLEVEL-DAG: topLevel interface '' TypeReferencedOnlyBySubscript false - subscript(_: TypeReferencedOnlyBySubscript) -> Void { return () } - - // CHECK-TOPLEVEL-DAG: topLevel interface '' TypeReferencedOnlyByPrivateSubscript false - private subscript(_: TypeReferencedOnlyByPrivateSubscript) -> Void { return () } -} - -// CHECK-TOPLEVEL-DAG: topLevel interface '' Bool false -func ==(lhs: IntWrapper, rhs: IntWrapper) -> Bool { - return lhs.value == rhs.value -} - -func <(lhs: IntWrapper, rhs: IntWrapper) -> Bool { - return lhs.value < rhs.value -} - -// Test operator lookup without a use of the same operator. -// This is declared in the other file. -prefix func ***(lhs: IntWrapper) {} - -// This is provided as an operator but not implemented here. -prefix operator ^^^ - -// CHECK-TOPLEVEL-DAG: topLevel interface '' ClassFromOtherFile false -class Subclass : ClassFromOtherFile {} - -// CHECK-TOPLEVEL-DAG: topLevel interface '' Array false -typealias MyArray = Array - -// CHECK-TOPLEVEL-DAG: topLevel interface '' ExpressibleByArrayLiteral false -extension ExpressibleByArrayLiteral { - func useless() {} -} - -// CHECK-TOPLEVEL-DAG: topLevel interface '' OtherFileElementType false -extension ExpressibleByArrayLiteral where ArrayLiteralElement == OtherFileElementType { - func useless2() {} -} - -// CHECK-TOPLEVEL-DAG: topLevel interface '' IntegerLiteralType false -let someGlobal = 42 - -extension Bool { - struct InnerToBool {} -} - -// CHECK-TOPLEVEL-DAG: topLevel interface '' ExpressibleByOtherFileAliasForFloatLiteral false -protocol ExpressibleByExtraFloatLiteral - : ExpressibleByOtherFileAliasForFloatLiteral { -} -// CHECK-TOPLEVEL-DAG: topLevel interface '' ExpressibleByUnicodeScalarLiteral false -private protocol ExpressibleByExtraCharLiteral : ExpressibleByUnicodeScalarLiteral { -} - -prefix operator ~~~ -protocol ThreeTilde { - prefix static func ~~~(lhs: Self) -} - -private struct ThreeTildeTypeImpl : ThreeTilde { -} - -func overloadedOnProto(_: T) {} -func overloadedOnProto(_: T) {} - -private prefix func ~~~(_: ThreeTildeTypeImpl) {} - -prefix operator ~~~~ -protocol FourTilde { - prefix static func ~~~~(arg: Self) -} -struct FourTildeImpl : FourTilde {} -extension FourTildeImpl { - prefix static func ~~~~(arg: FourTildeImpl) {} -} - -// ~~~~~ is declared in the other file. -struct FiveTildeImpl {} -extension FiveTildeImpl { - prefix static func ~~~~~(arg: FiveTildeImpl) {} -} - -var topLevelComputedProperty: Bool { - return true -} - -func lookUpManyTopLevelNames() { - // CHECK-TOPLEVEL-DAG: topLevel interface '' Dictionary false - let _: Dictionary = [1:1] - - // CHECK-TOPLEVEL-DAG: topLevel interface '' UInt false - // CHECK-TOPLEVEL-DAG: topLevel interface '' '+' false - let _: UInt = [1, 2].reduce(0, +) - - // CHECK-TOPLEVEL-DAG: topLevel interface '' '-' false - let _: UInt = 3 - 2 - 1 - - // CHECK-TOPLEVEL-DAG: topLevel interface '' AliasFromOtherFile false - let _: AliasFromOtherFile = 1 - - // CHECK-TOPLEVEL-DAG: topLevel interface '' funcFromOtherFile false - funcFromOtherFile() - - // "CInt" is not used as a top-level name here. - // CHECK-TOPLEVEL-DAG: topLevel interface '' StringLiteralType false - // NEGATIVE-NOT: "CInt" - _ = "abc" - - // NEGATIVE-NOT: - "max" - print(Int.max) - - // NEGATIVE-NOT: - "Stride" - let _: Int.Stride = 0 - - // CHECK-TOPLEVEL-DAG: topLevel interface '' OtherFileOuterType false - _ = OtherFileOuterType.InnerType.sharedConstant - _ = OtherFileOuterType.InnerType() - - // CHECK-TOPLEVEL-DAG: topLevel interface '' OtherFileAliasForSecret false - _ = OtherFileAliasForSecret.constant - - // CHECK-TOPLEVEL-DAG: topLevel interface '' otherFileUse false - // CHECK-TOPLEVEL-DAG: topLevel interface '' otherFileGetImpl false - otherFileUse(otherFileGetImpl()) - - // CHECK-TOPLEVEL-DAG: topLevel interface '' otherFileUseGeneric false - // CHECK-TOPLEVEL-DAG: topLevel interface '' otherFileGetImpl2 false - otherFileUseGeneric(otherFileGetImpl2()) - - // CHECK-TOPLEVEL-DAG: topLevel interface '' getOtherFileIntArray false - for _ in getOtherFileIntArray() {} - - // CHECK-TOPLEVEL-DAG: topLevel interface '' getOtherFileEnum false - switch getOtherFileEnum() { - case .Value: - break - default: - break - } - - _ = .Value as OtherFileEnumWrapper.Enum - let _: OtherFileEnumWrapper.Enum = .Value - _ = OtherFileEnumWrapper.Enum.Value - - _ = { (_: PrivateTopLevelStruct.ValueType) -> PrivateTopLevelStruct2.ValueType? in - return nil - } - - typealias X = OtherFileEnumWrapper.Enum - - let value: Any = .Value as X - switch value { - case is OtherFileEnumWrapper.Enum: - break - default: - break - } - - // CHECK-TOPLEVEL-DAG: topLevel interface '' '~=' false - switch 42 { - case 50: - break - default: - break - } - - for _: OtherFileEnumWrapper.Enum in EmptyIterator() {} - - // CHECK-TOPLEVEL-DAG: topLevel interface '' otherFileGetNonImpl false - overloadedOnProto(otherFileGetNonImpl()) -} - -func testOperators(generic: T, specific: Flyswatter) { - // CHECK-TOPLEVEL-DAG: topLevel interface '' '****' false - // CHECK-TOPLEVEL-DAG: topLevel interface '' '*****' false - // CHECK-TOPLEVEL-DAG: topLevel interface '' '******' false - ****generic - generic*****0 - 0******generic - - ****specific - specific*****0 - 0******specific -} - -// CHECK-NOMINAL-DAG: nominal interface 4main23TopLevelForMemberLookupV '' true -// CHECK-NOMINAL-DAG: nominal implementation 4main23TopLevelForMemberLookupV '' true - -struct TopLevelForMemberLookup { - static func m1() {} - static func m2() {} - static func m3() {} -} - -func lookUpMembers() { - TopLevelForMemberLookup.m1() - TopLevelForMemberLookup.m3() -} -public let publicUseOfMember: () = TopLevelForMemberLookup.m2() - -struct Outer { - struct Inner { - func method() { - // CHECK-TOPLEVEL-DAG: topLevel interface '' CUnsignedInt false - let _: CUnsignedInt = 5 - } - } -} - -// CHECK-TOPLEVEL-DAG: topLevel interface '' privateFunc true -// CHECK-TOPLEVEL-DAG: topLevel implementation '' privateFunc true -private func privateFunc() {} - -// CHECK-TOPLEVEL-DAG: topLevel interface '' topLevel1 false -var use1 = topLevel1() -// CHECK-TOPLEVEL-DAG: topLevel interface '' topLevel2 false -var use2 = { topLevel2() } -// CHECK-TOPLEVEL-DAG: topLevel interface '' topLevel3 false -var use3 = { ({ topLevel3() })() } -// CHECK-TOPLEVEL-DAG: topLevel interface '' topLevel4 false -// CHECK-TOPLEVEL-DAG: topLevel interface '' TopLevelProto1 false -struct Use4 : TopLevelProto1 { - var use4 = topLevel4() -} - -// CHECK-TOPLEVEL-DAG: topLevel interface '' '*' false -_ = 42 * 30 - -// FIXME: Incorrectly marked non-private dependencies -// CHECK-TOPLEVEL-DAG: topLevel interface '' topLevel6 false -_ = topLevel6() -// CHECK-TOPLEVEL-DAG: topLevel interface '' topLevel7 false -private var use7 = topLevel7() -// CHECK-TOPLEVEL-DAG: topLevel interface '' topLevel8 false -var use8: Int = topLevel8() -// CHECK-TOPLEVEL-DAG: topLevel interface '' topLevel9 false -var use9 = { () -> Int in return topLevel9() } - - -// CHECK-TOPLEVEL-DAG: topLevel interface '' TopLevelTy1 false -func useTy1(_ x: TopLevelTy1) {} -// CHECK-TOPLEVEL-DAG: topLevel interface '' TopLevelTy2 false -func useTy2() -> TopLevelTy2 {} -// CHECK-TOPLEVEL-DAG: topLevel interface '' TopLevelTy3 false -// CHECK-TOPLEVEL-DAG: topLevel interface '' TopLevelProto2 false -extension Use4 : TopLevelProto2 { - var useTy3: TopLevelTy3? { return nil } -} - -// CHECK-TOPLEVEL-DAG: topLevel interface '' TopLevelStruct false -// CHECK-TOPLEVEL-DAG: topLevel interface '' TopLevelStruct2 false -let useTy4 = { (_: TopLevelStruct.ValueType) -> TopLevelStruct2.ValueType? in - return nil -} -// CHECK-TOPLEVEL-DAG: topLevel interface '' TopLevelStruct3 false -// CHECK-TOPLEVEL-DAG: topLevel interface '' TopLevelStruct4 false -typealias useTy5 = TopLevelStruct3.ValueType -let useTy6: TopLevelStruct4.ValueType = 0 - -struct StructForDeclaringProperties { - // CHECK-TOPLEVEL-DAG: topLevel interface '' TopLevelStruct5 false - var prop: TopLevelStruct5.ValueType { return 0 } -} - -// CHECK-TOPLEVEL-DAG: topLevel interface '' privateTopLevel1 false -func private1(_ a: Int = privateTopLevel1()) {} -// CHECK-TOPLEVEL-DAG: topLevel interface '' privateTopLevel2 false -// CHECK-TOPLEVEL-DAG: topLevel interface '' PrivateProto1 false -private struct Private2 : PrivateProto1 { - var private2 = privateTopLevel2() -} -// CHECK-TOPLEVEL-DAG: topLevel interface '' privateTopLevel3 false -func outerPrivate3() { - let _ = { privateTopLevel3() } -} - -// CHECK-TOPLEVEL-DAG: topLevel interface '' PrivateTopLevelTy1 false -private extension Use4 { - var privateTy1: PrivateTopLevelTy1? { return nil } -} -// CHECK-TOPLEVEL-DAG: topLevel interface '' PrivateTopLevelTy2 false -// CHECK-TOPLEVEL-DAG: topLevel interface '' PrivateProto2 false -extension Private2 : PrivateProto2 { - // FIXME: This test is supposed to check that we get this behavior /without/ - // marking the property private, just from the base type. - private var privateTy2: PrivateTopLevelTy2? { return nil } -} -// CHECK-TOPLEVEL-DAG: topLevel interface '' PrivateTopLevelTy3 false -func outerPrivateTy3() { - func inner(_ a: PrivateTopLevelTy3?) {} - inner(nil) -} -// CHECK-TOPLEVEL-DAG: topLevel interface '' PrivateTopLevelStruct3 false -private typealias PrivateTy4 = PrivateTopLevelStruct3.ValueType -// CHECK-TOPLEVEL-DAG: topLevel interface '' PrivateTopLevelStruct4 false -private func privateTy5(_ x: PrivateTopLevelStruct4.ValueType) -> PrivateTopLevelStruct4.ValueType { - return x -} - -// Deliberately empty. -private struct PrivateTy6 {} -// CHECK-TOPLEVEL-DAG: topLevel interface '' PrivateProto3 false -extension PrivateTy6 : PrivateProto3 {} - -// CHECK-TOPLEVEL-DAG: topLevel interface '' ProtoReferencedOnlyInGeneric false -func genericTest(_: T) {} -// CHECK-TOPLEVEL-DAG: topLevel interface '' ProtoReferencedOnlyInPrivateGeneric false -private func privateGenericTest(_: T) {} - -struct PrivateStoredProperty { - // CHECK-TOPLEVEL-DAG: topLevel interface '' TypeReferencedOnlyByPrivateVar false - private var value: TypeReferencedOnlyByPrivateVar -} -class PrivateStoredPropertyRef { - // CHECK-TOPLEVEL-DAG: topLevel interface '' TypeReferencedOnlyByPrivateClassVar false - private var value: TypeReferencedOnlyByPrivateClassVar? -} - -struct Sentinel1 {} - -private protocol ExtensionProto {} -extension OtherFileTypeToBeExtended : ExtensionProto { - private func foo() {} -} -private extension OtherFileTypeToBeExtended { - var bar: Bool { return false } -} - -struct Sentinel2 {} - - - -// CHECK-MEMBER-DAG: member interface 4main10IntWrapperV Int false -// CHECK-POTENTIALMEMBER-DAG: potentialMember interface SL '' false -// CHECK-POTENTIALMEMBER-DAG: potentialMember interface 4main18ClassFromOtherFileC '' false -// CHECK-MEMBER-DAG: member interface Si max false -// CHECK-POTENTIALMEMBER-DAG: potentialMember interface s25ExpressibleByFloatLiteralP '' false -// CHECK-POTENTIALMEMBER-DAG: potentialMember interface s33ExpressibleByUnicodeScalarLiteralP '' false -// CHECK-MEMBER-DAG: member interface Sx Stride false -// CHECK-MEMBER-DAG: member interface Sa reduce false -// CHECK-POTENTIALMEMBER-DAG: potentialMember interface 4main17OtherFileIntArrayV '' false -// CHECK-MEMBER-DAG: member interface 4main18OtherFileOuterTypeV InnerType false -// CHECK-MEMBER-DAG: member interface 4main18OtherFileOuterTypeV05InnerE0V init false -// CHECK-MEMBER-DAG: member interface 4main18OtherFileOuterTypeV05InnerE0V sharedConstant false -// CHECK-MEMBER-DAG: member interface 4main26OtherFileSecretTypeWrapperV0dE0V constant false -// CHECK-POTENTIALMEMBER-DAG: potentialMember interface 4main25OtherFileProtoImplementorV '' false -// CHECK-POTENTIALMEMBER-DAG: potentialMember interface 4main26OtherFileProtoImplementor2V '' false -// CHECK-MEMBER-DAG: member interface s15EmptyCollectionV8IteratorV init false -// CHECK-MEMBER-DAG: member interface 4main13OtherFileEnumO Value false -// CHECK-MEMBER-DAG: member interface 4main20OtherFileEnumWrapperV Enum false - -// CHECK-MEMBER-DAG: member interface 4main14TopLevelStructV ValueType false -// CHECK-MEMBER-DAG: member interface 4main15TopLevelStruct2V ValueType false -// CHECK-MEMBER-DAG: member interface 4main15TopLevelStruct3V ValueType false -// CHECK-MEMBER-DAG: member interface 4main15TopLevelStruct4V ValueType false -// CHECK-MEMBER-DAG: member interface 4main15TopLevelStruct5V ValueType false -// CHECK-MEMBER-DAG: member interface 4main21PrivateTopLevelStructV ValueType false -// CHECK-MEMBER-DAG: member interface 4main22PrivateTopLevelStruct2V ValueType false -// CHECK-MEMBER-DAG: member interface 4main22PrivateTopLevelStruct3V ValueType false -// CHECK-MEMBER-DAG: member interface 4main22PrivateTopLevelStruct4V ValueType false - -// CHECK-POTENTIALMEMBER-DAG: potentialMember interface 4main14TopLevelProto1P '' false -// CHECK-POTENTIALMEMBER-DAG: potentialMember interface 4main14TopLevelProto2P '' false -// CHECK-POTENTIALMEMBER-DAG: potentialMember interface 4main13PrivateProto1P '' false -// CHECK-POTENTIALMEMBER-DAG: potentialMember interface 4main13PrivateProto2P '' false -// CHECK-POTENTIALMEMBER-DAG: potentialMember interface 4main13PrivateProto3P '' false - -// CHECK-NOMINAL-2-DAG: nominal interface Sa '' false -// CHECK-NOMINAL-2-DAG: nominal interface Sb '' true -// CHECK-NOMINAL-2-DAG: nominal implementation Sb '' true -// CHECK-NOMINAL-2-DAG: nominal interface 4main18ClassFromOtherFileC '' false -// CHECK-NOMINAL-2-DAG: nominal interface SL '' false -// CHECK-NOMINAL-2-DAG: nominal interface s25ExpressibleByFloatLiteralP '' false -// CHECK-NOMINAL-2-DAG: nominal interface s33ExpressibleByUnicodeScalarLiteralP '' false -// CHECK-NOMINAL-2-DAG: nominal interface 4main18OtherFileOuterTypeV05InnerE0V '' false -// CHECK-NOMINAL-2-DAG: nominal interface Si '' false -// CHECK-NOMINAL-2-DAG: nominal interface 4main13OtherFileEnumO '' false -// CHECK-NOMINAL-2-DAG: nominal interface 4main20OtherFileEnumWrapperV '' false -// CHECK-NOMINAL-2-DAG: nominal interface 4main17OtherFileIntArrayV '' false -// CHECK-NOMINAL-2-DAG: nominal interface 4main18OtherFileOuterTypeV '' false -// CHECK-NOMINAL-2-DAG: nominal interface 4main25OtherFileProtoImplementorV '' false -// CHECK-NOMINAL-2-DAG: nominal interface 4main26OtherFileProtoImplementor2V '' false -// CHECK-NOMINAL-2-DAG: nominal interface 4main13PrivateProto1P '' false -// CHECK-NOMINAL-2-DAG: nominal interface 4main13PrivateProto2P '' false -// CHECK-NOMINAL-2-DAG: nominal interface 4main13PrivateProto3P '' false -// CHECK-NOMINAL-2-DAG: nominal interface 4main21PrivateTopLevelStructV '' false -// CHECK-NOMINAL-2-DAG: nominal interface 4main22PrivateTopLevelStruct2V '' false -// CHECK-NOMINAL-2-DAG: nominal interface 4main22PrivateTopLevelStruct3V '' false -// CHECK-NOMINAL-2-DAG: nominal interface 4main22PrivateTopLevelStruct4V '' false -// CHECK-NOMINAL-2-DAG: nominal interface 4main26OtherFileSecretTypeWrapperV0dE0V '' false -// CHECK-NOMINAL-2-DAG: nominal interface Sx '' false -// CHECK-NOMINAL-2-DAG: nominal interface 4main14TopLevelProto1P '' false -// CHECK-NOMINAL-2-DAG: nominal interface 4main14TopLevelProto2P '' false -// CHECK-NOMINAL-2-DAG: nominal interface 4main14TopLevelStructV '' false -// CHECK-NOMINAL-2-DAG: nominal interface 4main15TopLevelStruct2V '' false -// CHECK-NOMINAL-2-DAG: nominal interface 4main15TopLevelStruct3V '' false -// CHECK-NOMINAL-2-DAG: nominal interface 4main15TopLevelStruct4V '' false -// CHECK-NOMINAL-2-DAG: nominal interface 4main15TopLevelStruct5V '' false - -// String is not used anywhere in this file, though a string literal is. -// NEGATIVE-NOT: "String" -// These are used by the other file in this module, but not by this one. -// NEGATIVE-NOT: "ExpressibleByFloatLiteral" -// NEGATIVE-NOT: "Int16" -// NEGATIVE-NOT: "OtherFileProto" -// NEGATIVE-NOT: "OtherFileProtoImplementor" -// NEGATIVE-NOT: "OtherFileProto2" -// NEGATIVE-NOT: "OtherFileProtoImplementor2" - -// OtherFileSecretTypeWrapper is never used directly in this file. -// NEGATIVE-NOT: "OtherFileSecretTypeWrapper" -// NEGATIVE-NOT: "4main26OtherFileSecretTypeWrapperV" - -let eof: () = () diff --git a/test/Incremental/Dependencies/reference-dependencies-members-fine.swift b/test/Incremental/Dependencies/reference-dependencies-members-fine.swift deleted file mode 100644 index bfe167373208d..0000000000000 --- a/test/Incremental/Dependencies/reference-dependencies-members-fine.swift +++ /dev/null @@ -1,62 +0,0 @@ -// RUN: %empty-directory(%t) -// RUN: cp %s %t/main.swift - -// RUN: %target-swift-frontend -typecheck -primary-file %t/main.swift %S/../Inputs/reference-dependencies-members-helper.swift -emit-reference-dependencies-path - > %t.swiftdeps - -// RUN: %target-swift-frontend -typecheck -primary-file %t/main.swift %S/../Inputs/reference-dependencies-members-helper.swift -emit-reference-dependencies-path - > %t-2.swiftdeps -// RUN: %{python} %S/../../Inputs/process_fine_grained_swiftdeps.py %swift-dependency-tool %t.swiftdeps > %t-processed.swiftdeps -// RUN: %{python} %S/../../Inputs/process_fine_grained_swiftdeps.py %swift-dependency-tool %t-2.swiftdeps > %t-2-processed.swiftdeps - -// RUN: diff %t-processed.swiftdeps %t-2-processed.swiftdeps - -// RUN: %FileCheck -check-prefix=PROVIDES-NOMINAL %s < %t-processed.swiftdeps -// RUN: %FileCheck -check-prefix=PROVIDES-NOMINAL-2 %s < %t-processed.swiftdeps -// RUN: %FileCheck -check-prefix=PROVIDES-MEMBER %s < %t-processed.swiftdeps -// RUN: %FileCheck -check-prefix=PROVIDES-MEMBER-NEGATIVE %s < %t-processed.swiftdeps -// RUN: %FileCheck -check-prefix=DEPENDS-NOMINAL %s < %t-processed.swiftdeps -// RUN: %FileCheck -check-prefix=DEPENDS-MEMBER %s < %t-processed.swiftdeps - -// PROVIDES-NOMINAL-DAG: nominal implementation 4main4BaseC '' true -// PROVIDES-NOMINAL-DAG: nominal interface 4main4BaseC '' true -class Base { - // PROVIDES-MEMBER-DAG: potentialMember implementation 4main4BaseC '' true - // PROVIDES-MEMBER-DAG: potentialMember interface 4main4BaseC '' true - // PROVIDES-MEMBER-NEGATIVE-NOT: member {{.*}} 4main4BaseC {{[^']]+}} true - func foo() {} -} - -// PROVIDES-NOMINAL-DAG: nominal implementation 4main3SubC '' true -// PROVIDES-NOMINAL-DAG: nominal interface 4main3SubC '' true -// DEPENDS-NOMINAL-DAG: nominal interface 4main9OtherBaseC '' false -class Sub : OtherBase { - // PROVIDES-MEMBER-DAG: potentialMember implementation 4main3SubC '' true - // PROVIDES-MEMBER-NEGATIVE-NOT: {{potentialM|m}}}}ember implementation 4main3SubC {{.+}} true - // DEPENDS-MEMBER-DAG: potentialMember interface 4main9OtherBaseC '' false - // DEPENDS-MEMBER-DAG: member interface 4main9OtherBaseC foo false - // DEPENDS-MEMBER-DAG: member interface 4main9OtherBaseC init false - func foo() {} -} - -// PROVIDES-NOMINAL-DAG: nominal implementation 4main9SomeProtoP '' true -// PROVIDES-NOMINAL-DAG: nominal interface 4main9SomeProtoP '' true -// PROVIDES-MEMBER-DAG: potentialMember interface 4main9SomeProtoP '' true -protocol SomeProto {} - -// PROVIDES-NOMINAL-DAG: nominal implementation 4main10OtherClassC '' true -// PROVIDES-NOMINAL-2-DAG: nominal interface 4main10OtherClassC '' true -// PROVIDES-MEMBER-DAG: potentialMember interface 4main10OtherClassC '' true -// DEPENDS-MEMBER-DAG: potentialMember interface 4main10OtherClassC '' true -extension OtherClass : SomeProto {} - -// PROVIDES-NOMINAL-DAG: nominal implementation 4main11OtherStructV '' true -// PROVIDES-NOMINAL-DAG: nominal interface 4main11OtherStructV '' true -extension OtherStruct { - // PROVIDES-MEMBER-DAG: potentialMember interface 4main11OtherStructV '' true - // PROVIDES-MEMBER-DAG: member interface 4main11OtherStructV foo true - // PROVIDES-MEMBER-DAG: member interface 4main11OtherStructV bar true - // PROVIDES-MEMBER-DAG: member interface 4main11OtherStructV baz true - // DEPENDS-MEMBER-DAG: potentialMember interface 4main11OtherStructV '' true - func foo() {} - var bar: () { return () } - private func baz() {} -} diff --git a/test/Incremental/Dependencies/struct-member-fine.swift b/test/Incremental/Dependencies/struct-member-fine.swift deleted file mode 100644 index b723c68989f5e..0000000000000 --- a/test/Incremental/Dependencies/struct-member-fine.swift +++ /dev/null @@ -1,17 +0,0 @@ -// RUN: %target-swift-frontend -emit-silgen -primary-file %s %S/Inputs/InterestingType.swift -DOLD -emit-reference-dependencies-path %t.swiftdeps -module-name main | %FileCheck %s -check-prefix=CHECK-OLD -// RUN: %{python} %S/../../Inputs/process_fine_grained_swiftdeps.py %swift-dependency-tool %t.swiftdeps > %t-processed.swiftdeps -// RUN: %FileCheck -check-prefix=CHECK-DEPS %s < %t-processed.swiftdeps - -// RUN: %target-swift-frontend -emit-silgen -primary-file %s %S/Inputs/InterestingType.swift -DNEW -emit-reference-dependencies-path %t.swiftdeps -module-name main | %FileCheck %s -check-prefix=CHECK-NEW -// RUN: %{python} %S/../../Inputs/process_fine_grained_swiftdeps.py %swift-dependency-tool %t.swiftdeps > %t-processed.swiftdeps -// RUN: %FileCheck -check-prefix=CHECK-DEPS %s < %t-processed.swiftdeps - -private struct Wrapper { - static func test() -> InterestingType { fatalError() } -} - -// CHECK-OLD: sil_global @$s4main1x{{[^ ]+}} : $Int -// CHECK-NEW: sil_global @$s4main1x{{[^ ]+}} : $Double -public var x = Wrapper.test() + 0 - -/// CHECK-DEPS: topLevel interface '' InterestingType false diff --git a/test/Incremental/Dependencies/subscript-fine.swift b/test/Incremental/Dependencies/subscript-fine.swift deleted file mode 100644 index 994a4bd61cfe1..0000000000000 --- a/test/Incremental/Dependencies/subscript-fine.swift +++ /dev/null @@ -1,17 +0,0 @@ -// RUN: %target-swift-frontend -emit-silgen -primary-file %s %S/Inputs/InterestingType.swift -DOLD -emit-reference-dependencies-path %t.swiftdeps -module-name main | %FileCheck %s -check-prefix=CHECK-OLD -// RUN: %{python} %S/../../Inputs/process_fine_grained_swiftdeps.py %swift-dependency-tool %t.swiftdeps > %t-processed.swiftdeps -// RUN: %FileCheck -check-prefix=CHECK-DEPS %s < %t-processed.swiftdeps - -// RUN: %target-swift-frontend -emit-silgen -primary-file %s %S/Inputs/InterestingType.swift -DNEW -emit-reference-dependencies-path %t.swiftdeps -module-name main | %FileCheck %s -check-prefix=CHECK-NEW -// RUN: %{python} %S/../../Inputs/process_fine_grained_swiftdeps.py %swift-dependency-tool %t.swiftdeps > %t-processed.swiftdeps -// RUN: %FileCheck -check-prefix=CHECK-DEPS %s < %t-processed.swiftdeps - -struct Wrapper { - fileprivate subscript() -> InterestingType { fatalError() } -} - -// CHECK-OLD: sil_global @$s4main1x{{[^ ]+}} : $Int -// CHECK-NEW: sil_global @$s4main1x{{[^ ]+}} : $Double -public var x = Wrapper()[] + 0 - -// CHECK-DEPS: topLevel interface '' InterestingType false diff --git a/test/Incremental/Dependencies/tuple-member.swift b/test/Incremental/Dependencies/tuple-member.swift deleted file mode 100644 index c7e6e42c6ae8f..0000000000000 --- a/test/Incremental/Dependencies/tuple-member.swift +++ /dev/null @@ -1,11 +0,0 @@ -// RUN: %empty-directory(%t) -// RUN: %target-swift-frontend -typecheck -primary-file %s -emit-reference-dependencies-path %t/tuple-members.swiftdeps - -func f() {} -func f() -> S {} - -struct S { - var x: Int -} - -_ = f().x diff --git a/test/Incremental/Dependencies/typealias-fine.swift b/test/Incremental/Dependencies/typealias-fine.swift deleted file mode 100644 index af140c8605b83..0000000000000 --- a/test/Incremental/Dependencies/typealias-fine.swift +++ /dev/null @@ -1,17 +0,0 @@ -// RUN: %target-swift-frontend -emit-silgen -primary-file %s %S/Inputs/InterestingType.swift -DOLD -emit-reference-dependencies-path %t.swiftdeps -module-name main | %FileCheck %s -check-prefix=CHECK-OLD -// RUN: %{python} %S/../../Inputs/process_fine_grained_swiftdeps.py %swift-dependency-tool %t.swiftdeps > %t-processed.swiftdeps -// RUN: %FileCheck -check-prefix=CHECK-DEPS %s < %t-processed.swiftdeps - -// RUN: %target-swift-frontend -emit-silgen -primary-file %s %S/Inputs/InterestingType.swift -DNEW -emit-reference-dependencies-path %t.swiftdeps -module-name main | %FileCheck %s -check-prefix=CHECK-NEW -// RUN: %{python} %S/../../Inputs/process_fine_grained_swiftdeps.py %swift-dependency-tool %t.swiftdeps > %t-processed.swiftdeps -// RUN: %FileCheck -check-prefix=CHECK-DEPS %s < %t-processed.swiftdeps - -private struct Wrapper { - static func test() -> InterestingType { fatalError() } -} - -// CHECK-OLD: sil_global @$s4main1x{{[^ ]+}} : $Int -// CHECK-NEW: sil_global @$s4main1x{{[^ ]+}} : $Double -public var x = Wrapper.test() + 0 - -// CHECK-DEPS: topLevel interface '' InterestingType false diff --git a/test/Incremental/Dependencies/var-fine.swift b/test/Incremental/Dependencies/var-fine.swift deleted file mode 100644 index 90b1d75a83bd1..0000000000000 --- a/test/Incremental/Dependencies/var-fine.swift +++ /dev/null @@ -1,16 +0,0 @@ -// RUN: %target-swift-frontend -emit-silgen -primary-file %s %S/Inputs/InterestingType.swift -DOLD -emit-reference-dependencies-path %t.swiftdeps -module-name main | %FileCheck %s -check-prefix=CHECK-OLD - -// RUN: %{python} %S/../../Inputs/process_fine_grained_swiftdeps.py %swift-dependency-tool %t.swiftdeps > %t-processed.swiftdeps - -// RUN: %FileCheck -check-prefix=CHECK-DEPS %s < %t-processed.swiftdeps - -// RUN: %target-swift-frontend -emit-silgen -primary-file %s %S/Inputs/InterestingType.swift -DNEW -emit-reference-dependencies-path %t.swiftdeps -module-name main | %FileCheck %s -check-prefix=CHECK-NEW -// RUN: %FileCheck -check-prefix=CHECK-DEPS %s < %t-processed.swiftdeps - -private var privateVar: InterestingType { fatalError() } - -// CHECK-OLD: sil_global @$s4main1x{{[^ ]+}} : $Int -// CHECK-NEW: sil_global @$s4main1x{{[^ ]+}} : $Double -public var x = privateVar + 0 - -// CHECK-DEPS: topLevel interface '' InterestingType false diff --git a/test/Incremental/Fingerprints/Inputs/class-fingerprint/definesAB-after.swift b/test/Incremental/Fingerprints/Inputs/class-fingerprint/definesAB-after.swift deleted file mode 100644 index 8070b0fb4f9ee..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/class-fingerprint/definesAB-after.swift +++ /dev/null @@ -1,5 +0,0 @@ -class A { - var x = 17 -} -class B { -} diff --git a/test/Incremental/Fingerprints/Inputs/class-fingerprint/definesAB-before.swift b/test/Incremental/Fingerprints/Inputs/class-fingerprint/definesAB-before.swift deleted file mode 100644 index 878a9dc917cb2..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/class-fingerprint/definesAB-before.swift +++ /dev/null @@ -1,4 +0,0 @@ -class A { -} -class B { -} diff --git a/test/Incremental/Fingerprints/Inputs/class-fingerprint/main.swift b/test/Incremental/Fingerprints/Inputs/class-fingerprint/main.swift deleted file mode 100644 index 8b137891791fe..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/class-fingerprint/main.swift +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/Incremental/Fingerprints/Inputs/class-fingerprint/ofm.json b/test/Incremental/Fingerprints/Inputs/class-fingerprint/ofm.json deleted file mode 100644 index 42d8972a2c390..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/class-fingerprint/ofm.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "definesAB.swift": { - "object": "./definesAB.o", - "swift-dependencies": "./definesAB.swiftdeps" - }, - "usesA.swift": { - "object": "./usesA.o", - "swift-dependencies": "./usesA.swiftdeps" - }, - "usesB.swift": { - "object": "./usesB.o", - "swift-dependencies": "./usesB.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} - diff --git a/test/Incremental/Fingerprints/Inputs/class-fingerprint/usesA.swift b/test/Incremental/Fingerprints/Inputs/class-fingerprint/usesA.swift deleted file mode 100644 index d947cb11b9830..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/class-fingerprint/usesA.swift +++ /dev/null @@ -1 +0,0 @@ -let a = A() diff --git a/test/Incremental/Fingerprints/Inputs/class-fingerprint/usesB.swift b/test/Incremental/Fingerprints/Inputs/class-fingerprint/usesB.swift deleted file mode 100644 index ecff1d6a467fc..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/class-fingerprint/usesB.swift +++ /dev/null @@ -1 +0,0 @@ -let b = B() diff --git a/test/Incremental/Fingerprints/Inputs/enum-fingerprint/definesAB-after.swift b/test/Incremental/Fingerprints/Inputs/enum-fingerprint/definesAB-after.swift deleted file mode 100644 index 600087c46ac79..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/enum-fingerprint/definesAB-after.swift +++ /dev/null @@ -1,7 +0,0 @@ -enum A { - case a1 - var pi: Int {3} -} -enum B { - case a1 -} diff --git a/test/Incremental/Fingerprints/Inputs/enum-fingerprint/definesAB-before.swift b/test/Incremental/Fingerprints/Inputs/enum-fingerprint/definesAB-before.swift deleted file mode 100644 index 6fd9bc435e51b..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/enum-fingerprint/definesAB-before.swift +++ /dev/null @@ -1,6 +0,0 @@ -enum A { - case a1 -} -enum B { - case a1 -} diff --git a/test/Incremental/Fingerprints/Inputs/enum-fingerprint/main.swift b/test/Incremental/Fingerprints/Inputs/enum-fingerprint/main.swift deleted file mode 100644 index 8b137891791fe..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/enum-fingerprint/main.swift +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/Incremental/Fingerprints/Inputs/enum-fingerprint/ofm.json b/test/Incremental/Fingerprints/Inputs/enum-fingerprint/ofm.json deleted file mode 100644 index 42d8972a2c390..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/enum-fingerprint/ofm.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "definesAB.swift": { - "object": "./definesAB.o", - "swift-dependencies": "./definesAB.swiftdeps" - }, - "usesA.swift": { - "object": "./usesA.o", - "swift-dependencies": "./usesA.swiftdeps" - }, - "usesB.swift": { - "object": "./usesB.o", - "swift-dependencies": "./usesB.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} - diff --git a/test/Incremental/Fingerprints/Inputs/enum-fingerprint/usesA.swift b/test/Incremental/Fingerprints/Inputs/enum-fingerprint/usesA.swift deleted file mode 100644 index 4e498195442e0..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/enum-fingerprint/usesA.swift +++ /dev/null @@ -1 +0,0 @@ -let a = A.a1 diff --git a/test/Incremental/Fingerprints/Inputs/enum-fingerprint/usesB.swift b/test/Incremental/Fingerprints/Inputs/enum-fingerprint/usesB.swift deleted file mode 100644 index 99d8c6f8ce72b..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/enum-fingerprint/usesB.swift +++ /dev/null @@ -1 +0,0 @@ -let b = B.a1 diff --git a/test/Incremental/Fingerprints/Inputs/extension-adds-member/definesAB-after.swift b/test/Incremental/Fingerprints/Inputs/extension-adds-member/definesAB-after.swift deleted file mode 100644 index 5ac12ff109f4a..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/extension-adds-member/definesAB-after.swift +++ /dev/null @@ -1,9 +0,0 @@ -struct A { -} -struct B { -} -extension A { - init(_ x: String = "") {} -} -extension B { -} diff --git a/test/Incremental/Fingerprints/Inputs/extension-adds-member/definesAB-before.swift b/test/Incremental/Fingerprints/Inputs/extension-adds-member/definesAB-before.swift deleted file mode 100644 index 9a8e36dc90d98..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/extension-adds-member/definesAB-before.swift +++ /dev/null @@ -1,8 +0,0 @@ -struct A { -} -struct B { -} -extension A { -} -extension B { -} diff --git a/test/Incremental/Fingerprints/Inputs/extension-adds-member/main.swift b/test/Incremental/Fingerprints/Inputs/extension-adds-member/main.swift deleted file mode 100644 index 8b137891791fe..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/extension-adds-member/main.swift +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/Incremental/Fingerprints/Inputs/extension-adds-member/ofm.json b/test/Incremental/Fingerprints/Inputs/extension-adds-member/ofm.json deleted file mode 100644 index 42d8972a2c390..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/extension-adds-member/ofm.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "definesAB.swift": { - "object": "./definesAB.o", - "swift-dependencies": "./definesAB.swiftdeps" - }, - "usesA.swift": { - "object": "./usesA.o", - "swift-dependencies": "./usesA.swiftdeps" - }, - "usesB.swift": { - "object": "./usesB.o", - "swift-dependencies": "./usesB.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} - diff --git a/test/Incremental/Fingerprints/Inputs/extension-adds-member/usesA.swift b/test/Incremental/Fingerprints/Inputs/extension-adds-member/usesA.swift deleted file mode 100644 index d947cb11b9830..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/extension-adds-member/usesA.swift +++ /dev/null @@ -1 +0,0 @@ -let a = A() diff --git a/test/Incremental/Fingerprints/Inputs/extension-adds-member/usesB.swift b/test/Incremental/Fingerprints/Inputs/extension-adds-member/usesB.swift deleted file mode 100644 index ecff1d6a467fc..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/extension-adds-member/usesB.swift +++ /dev/null @@ -1 +0,0 @@ -let b = B() diff --git a/test/Incremental/Fingerprints/Inputs/extension-changes-member/definesS-after.swift b/test/Incremental/Fingerprints/Inputs/extension-changes-member/definesS-after.swift deleted file mode 100644 index 90230c2204621..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/extension-changes-member/definesS-after.swift +++ /dev/null @@ -1,8 +0,0 @@ -public struct S { - private - static func foo(_ i: Int) {print("1: other:2 commented out")} -} -extension S { - // private // commented out to ensure we see a change to the fingerprint - static func foo2(_ i: Int) {print("2: other:6 commented out")} -} diff --git a/test/Incremental/Fingerprints/Inputs/extension-changes-member/definesS-before.swift b/test/Incremental/Fingerprints/Inputs/extension-changes-member/definesS-before.swift deleted file mode 100644 index 8d19c3a4b09f6..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/extension-changes-member/definesS-before.swift +++ /dev/null @@ -1,8 +0,0 @@ -public struct S { - private // commenting out this line works - static func foo(_ i: Int) {print("1: other:2 commented out")} -} -extension S { - private // commenting out this line fails - static func foo2(_ i: Int) {print("2: other:6 commented out")} -} diff --git a/test/Incremental/Fingerprints/Inputs/extension-changes-member/main.swift b/test/Incremental/Fingerprints/Inputs/extension-changes-member/main.swift deleted file mode 100644 index 3d4e274882f4a..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/extension-changes-member/main.swift +++ /dev/null @@ -1,11 +0,0 @@ -extension S { - static func foo(_ si: I) { - print("1: other:2 not commented out") - } - static func foo2(_ si: I) { - print("2: other:6 not commented out") - } -} - -S.foo(3) -S.foo2(3) diff --git a/test/Incremental/Fingerprints/Inputs/extension-changes-member/ofm.json b/test/Incremental/Fingerprints/Inputs/extension-changes-member/ofm.json deleted file mode 100644 index 4a5e4cc1b61c0..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/extension-changes-member/ofm.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "definesS.swift": { - "object": "./definesS.o", - "swift-dependencies": "./definesS.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} - diff --git a/test/Incremental/Fingerprints/Inputs/member-moves-extensions/definesS-after.swift b/test/Incremental/Fingerprints/Inputs/member-moves-extensions/definesS-after.swift deleted file mode 100644 index 25b99cca79924..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/member-moves-extensions/definesS-after.swift +++ /dev/null @@ -1,17 +0,0 @@ -public protocol P { - func foo() -} - -public protocol Q: P { - func bar() -} - -public struct S {} - -extension S: P { - public func foo() {} -} - -extension S: Q { - public func bar() {} -} diff --git a/test/Incremental/Fingerprints/Inputs/member-moves-extensions/definesS-before.swift b/test/Incremental/Fingerprints/Inputs/member-moves-extensions/definesS-before.swift deleted file mode 100644 index 15f9879d92282..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/member-moves-extensions/definesS-before.swift +++ /dev/null @@ -1,18 +0,0 @@ -public protocol P { - func foo() -} - -public protocol Q: P { - func bar() -} - -public struct S {} - -extension S: P { - public func foo() {} - public func bar() {} -} - -extension S: Q { - -} diff --git a/test/Incremental/Fingerprints/Inputs/member-moves-extensions/main.swift b/test/Incremental/Fingerprints/Inputs/member-moves-extensions/main.swift deleted file mode 100644 index 82860030f4992..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/member-moves-extensions/main.swift +++ /dev/null @@ -1,7 +0,0 @@ -extension S { - public func foo(_ parameter: Int = 42) {} - public func bar(_ parameter: Int = 42) {} -} - -S().foo() -S().bar() diff --git a/test/Incremental/Fingerprints/Inputs/member-moves-extensions/ofm.json b/test/Incremental/Fingerprints/Inputs/member-moves-extensions/ofm.json deleted file mode 100644 index 4a5e4cc1b61c0..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/member-moves-extensions/ofm.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "definesS.swift": { - "object": "./definesS.o", - "swift-dependencies": "./definesS.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} - diff --git a/test/Incremental/Fingerprints/Inputs/nested-enum-fingerprint/definesAB-after.swift b/test/Incremental/Fingerprints/Inputs/nested-enum-fingerprint/definesAB-after.swift deleted file mode 100644 index 6b4f50de567a1..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/nested-enum-fingerprint/definesAB-after.swift +++ /dev/null @@ -1,11 +0,0 @@ -struct S {} - -extension S { - enum A { - case a1 - var pi: Int {3} - } - enum B { - case a1 - } -} diff --git a/test/Incremental/Fingerprints/Inputs/nested-enum-fingerprint/definesAB-before.swift b/test/Incremental/Fingerprints/Inputs/nested-enum-fingerprint/definesAB-before.swift deleted file mode 100644 index 8f5a215f99c3c..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/nested-enum-fingerprint/definesAB-before.swift +++ /dev/null @@ -1,10 +0,0 @@ -struct S {} - -extension S { - enum A { - case a1 - } - enum B { - case a1 - } -} diff --git a/test/Incremental/Fingerprints/Inputs/nested-enum-fingerprint/main.swift b/test/Incremental/Fingerprints/Inputs/nested-enum-fingerprint/main.swift deleted file mode 100644 index 8b137891791fe..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/nested-enum-fingerprint/main.swift +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/Incremental/Fingerprints/Inputs/nested-enum-fingerprint/ofm.json b/test/Incremental/Fingerprints/Inputs/nested-enum-fingerprint/ofm.json deleted file mode 100644 index 42d8972a2c390..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/nested-enum-fingerprint/ofm.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "definesAB.swift": { - "object": "./definesAB.o", - "swift-dependencies": "./definesAB.swiftdeps" - }, - "usesA.swift": { - "object": "./usesA.o", - "swift-dependencies": "./usesA.swiftdeps" - }, - "usesB.swift": { - "object": "./usesB.o", - "swift-dependencies": "./usesB.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} - diff --git a/test/Incremental/Fingerprints/Inputs/nested-enum-fingerprint/usesA.swift b/test/Incremental/Fingerprints/Inputs/nested-enum-fingerprint/usesA.swift deleted file mode 100644 index fd7fe224e1623..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/nested-enum-fingerprint/usesA.swift +++ /dev/null @@ -1 +0,0 @@ -let a = S.A.a1 diff --git a/test/Incremental/Fingerprints/Inputs/nested-enum-fingerprint/usesB.swift b/test/Incremental/Fingerprints/Inputs/nested-enum-fingerprint/usesB.swift deleted file mode 100644 index 47148c5abb8f6..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/nested-enum-fingerprint/usesB.swift +++ /dev/null @@ -1 +0,0 @@ -let b = S.B.a1 diff --git a/test/Incremental/Fingerprints/Inputs/nominal-adds-extension/definesS-after.swift b/test/Incremental/Fingerprints/Inputs/nominal-adds-extension/definesS-after.swift deleted file mode 100644 index 93da6407e2b8f..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/nominal-adds-extension/definesS-after.swift +++ /dev/null @@ -1,8 +0,0 @@ -public struct S { - private - static func foo(_ i: Int) {print("1: other:2 commented out")} -} -extension S { - private - static func foo2(_ i: Int) {print("2: other:6 commented out")} -} diff --git a/test/Incremental/Fingerprints/Inputs/nominal-adds-extension/definesS-before.swift b/test/Incremental/Fingerprints/Inputs/nominal-adds-extension/definesS-before.swift deleted file mode 100644 index f98e9771a0b69..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/nominal-adds-extension/definesS-before.swift +++ /dev/null @@ -1,5 +0,0 @@ -public struct S { - private // commenting out this line works - static func foo(_ i: Int) {print("1: other:2 commented out")} -} - diff --git a/test/Incremental/Fingerprints/Inputs/nominal-adds-extension/main.swift b/test/Incremental/Fingerprints/Inputs/nominal-adds-extension/main.swift deleted file mode 100644 index 3d4e274882f4a..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/nominal-adds-extension/main.swift +++ /dev/null @@ -1,11 +0,0 @@ -extension S { - static func foo(_ si: I) { - print("1: other:2 not commented out") - } - static func foo2(_ si: I) { - print("2: other:6 not commented out") - } -} - -S.foo(3) -S.foo2(3) diff --git a/test/Incremental/Fingerprints/Inputs/nominal-adds-extension/ofm.json b/test/Incremental/Fingerprints/Inputs/nominal-adds-extension/ofm.json deleted file mode 100644 index 4a5e4cc1b61c0..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/nominal-adds-extension/ofm.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "definesS.swift": { - "object": "./definesS.o", - "swift-dependencies": "./definesS.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} - diff --git a/test/Incremental/Fingerprints/Inputs/protocol-fingerprint/definesAB-after.swift b/test/Incremental/Fingerprints/Inputs/protocol-fingerprint/definesAB-after.swift deleted file mode 100644 index 572874907e7f4..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/protocol-fingerprint/definesAB-after.swift +++ /dev/null @@ -1,5 +0,0 @@ -protocol A { - var x: Int {get} -} -protocol B { -} diff --git a/test/Incremental/Fingerprints/Inputs/protocol-fingerprint/definesAB-before.swift b/test/Incremental/Fingerprints/Inputs/protocol-fingerprint/definesAB-before.swift deleted file mode 100644 index 4d9f0e46ac19a..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/protocol-fingerprint/definesAB-before.swift +++ /dev/null @@ -1,4 +0,0 @@ -protocol A { -} -protocol B { -} diff --git a/test/Incremental/Fingerprints/Inputs/protocol-fingerprint/main.swift b/test/Incremental/Fingerprints/Inputs/protocol-fingerprint/main.swift deleted file mode 100644 index 8b137891791fe..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/protocol-fingerprint/main.swift +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/Incremental/Fingerprints/Inputs/protocol-fingerprint/ofm.json b/test/Incremental/Fingerprints/Inputs/protocol-fingerprint/ofm.json deleted file mode 100644 index 42d8972a2c390..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/protocol-fingerprint/ofm.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "definesAB.swift": { - "object": "./definesAB.o", - "swift-dependencies": "./definesAB.swiftdeps" - }, - "usesA.swift": { - "object": "./usesA.o", - "swift-dependencies": "./usesA.swiftdeps" - }, - "usesB.swift": { - "object": "./usesB.o", - "swift-dependencies": "./usesB.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} - diff --git a/test/Incremental/Fingerprints/Inputs/protocol-fingerprint/usesA.swift b/test/Incremental/Fingerprints/Inputs/protocol-fingerprint/usesA.swift deleted file mode 100644 index 83c36da794bac..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/protocol-fingerprint/usesA.swift +++ /dev/null @@ -1,3 +0,0 @@ -struct SA: A { - var x = 3 -} diff --git a/test/Incremental/Fingerprints/Inputs/protocol-fingerprint/usesB.swift b/test/Incremental/Fingerprints/Inputs/protocol-fingerprint/usesB.swift deleted file mode 100644 index f3a3076b7ac11..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/protocol-fingerprint/usesB.swift +++ /dev/null @@ -1,2 +0,0 @@ -struct SB: B { -} diff --git a/test/Incremental/Fingerprints/Inputs/struct-fingerprint/definesAB-after.swift b/test/Incremental/Fingerprints/Inputs/struct-fingerprint/definesAB-after.swift deleted file mode 100644 index cd62af38d1cbe..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/struct-fingerprint/definesAB-after.swift +++ /dev/null @@ -1,5 +0,0 @@ -struct A { - var x = 17 -} -struct B { -} diff --git a/test/Incremental/Fingerprints/Inputs/struct-fingerprint/definesAB-before.swift b/test/Incremental/Fingerprints/Inputs/struct-fingerprint/definesAB-before.swift deleted file mode 100644 index c085264d20767..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/struct-fingerprint/definesAB-before.swift +++ /dev/null @@ -1,4 +0,0 @@ -struct A { -} -struct B { -} diff --git a/test/Incremental/Fingerprints/Inputs/struct-fingerprint/main.swift b/test/Incremental/Fingerprints/Inputs/struct-fingerprint/main.swift deleted file mode 100644 index 8b137891791fe..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/struct-fingerprint/main.swift +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/Incremental/Fingerprints/Inputs/struct-fingerprint/ofm.json b/test/Incremental/Fingerprints/Inputs/struct-fingerprint/ofm.json deleted file mode 100644 index 42d8972a2c390..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/struct-fingerprint/ofm.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "definesAB.swift": { - "object": "./definesAB.o", - "swift-dependencies": "./definesAB.swiftdeps" - }, - "usesA.swift": { - "object": "./usesA.o", - "swift-dependencies": "./usesA.swiftdeps" - }, - "usesB.swift": { - "object": "./usesB.o", - "swift-dependencies": "./usesB.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} - diff --git a/test/Incremental/Fingerprints/Inputs/struct-fingerprint/usesA.swift b/test/Incremental/Fingerprints/Inputs/struct-fingerprint/usesA.swift deleted file mode 100644 index d947cb11b9830..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/struct-fingerprint/usesA.swift +++ /dev/null @@ -1 +0,0 @@ -let a = A() diff --git a/test/Incremental/Fingerprints/Inputs/struct-fingerprint/usesB.swift b/test/Incremental/Fingerprints/Inputs/struct-fingerprint/usesB.swift deleted file mode 100644 index ecff1d6a467fc..0000000000000 --- a/test/Incremental/Fingerprints/Inputs/struct-fingerprint/usesB.swift +++ /dev/null @@ -1 +0,0 @@ -let b = B() diff --git a/test/Incremental/Fingerprints/class-fingerprint.swift b/test/Incremental/Fingerprints/class-fingerprint.swift deleted file mode 100644 index b90b5cc7a8350..0000000000000 --- a/test/Incremental/Fingerprints/class-fingerprint.swift +++ /dev/null @@ -1,34 +0,0 @@ -// Test per-type-body fingerprints for classes -// - -// Establish status quo - -// RUN: %empty-directory(%t) -// RUN: cp %S/Inputs/class-fingerprint/* %t -// RUN: cp %t/definesAB{-before,}.swift - -// Seeing weird failure on CI, so set the mod times -// RUN: touch -t 200101010101 %t/*.swift - -// RUN: cd %t && %target-stdlib-swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output3 - -// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB3.swiftdeps - - -// Change one type, only uses of that type get recompiled - -// RUN: cp %t/definesAB{-after,}.swift - -// Seeing weird failure on CI, so ensure that definesAB.swift is newer -// RUN: touch -t 200201010101 %t/* -// RUN: touch -t 200101010101 %t/*.swift -// RUN: touch -t 200301010101 %t/definesAB.swift - -// RUN: cd %t && %target-stdlib-swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output4 - -// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB4.swiftdeps - -// RUN: %FileCheck -check-prefix=CHECK-MAINAB-RECOMPILED %s < %t/output4 - -// CHECK-MAINAB-RECOMPILED: Queuing (initial): {compile: definesAB.o <= definesAB.swift} -// CHECK-MAINAB-RECOMPILED: Queuing because of dependencies discovered later: {compile: usesA.o <= usesA.swift} diff --git a/test/Incremental/Fingerprints/enum-fingerprint.swift b/test/Incremental/Fingerprints/enum-fingerprint.swift deleted file mode 100644 index a8963860209f1..0000000000000 --- a/test/Incremental/Fingerprints/enum-fingerprint.swift +++ /dev/null @@ -1,34 +0,0 @@ -// Test per-type-body fingerprints for enums -// - -// Establish status quo - -// RUN: %empty-directory(%t) -// RUN: cp %S/Inputs/enum-fingerprint/* %t -// RUN: cp %t/definesAB{-before,}.swift - -// Seeing weird failure on CI, so set the mod times -// RUN: touch -t 200101010101 %t/*.swift - -// RUN: cd %t && %target-stdlib-swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output3 - -// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB3.swiftdeps - - -// Change one type, only uses of that type get recompiled - -// RUN: cp %t/definesAB{-after,}.swift - -// Seeing weird failure on CI, so ensure that definesAB.swift is newer -// RUN: touch -t 200201010101 %t/* -// RUN: touch -t 200101010101 %t/*.swift -// RUN: touch -t 200301010101 %t/definesAB.swift - -// RUN: cd %t && %target-stdlib-swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output4 - -// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB4.swiftdeps - -// RUN: %FileCheck -check-prefix=CHECK-MAINAB-RECOMPILED %s < %t/output4 - -// CHECK-MAINAB-RECOMPILED: Queuing (initial): {compile: definesAB.o <= definesAB.swift} -// CHECK-MAINAB-RECOMPILED: Queuing because of dependencies discovered later: {compile: usesA.o <= usesA.swift} diff --git a/test/Incremental/Fingerprints/extension-adds-member.swift b/test/Incremental/Fingerprints/extension-adds-member.swift deleted file mode 100644 index b24b8dad36983..0000000000000 --- a/test/Incremental/Fingerprints/extension-adds-member.swift +++ /dev/null @@ -1,33 +0,0 @@ -// Test that adding an overloaded member to an extension causes the users -// depending on that extension to rebuild. - -// Establish status quo - -// RUN: %empty-directory(%t) -// RUN: cp %S/Inputs/extension-adds-member/* %t -// RUN: cp %t/definesAB{-before,}.swift - -// Seeing weird failure on CI, so set the mod times -// RUN: touch -t 200101010101 %t/*.swift - -// RUN: cd %t && %target-stdlib-swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >& %t/output3 - -// Change one type, only uses of that type get recompiled - -// RUN: cp %t/definesAB{-after,}.swift - -// Seeing weird failure on CI, so ensure that definesAB.swift is newer -// RUN: touch -t 200201010101 %t/* -// RUN: touch -t 200101010101 %t/*.swift -// RUN: touch -t 200301010101 %t/definesAB.swift - -// RUN: cd %t && %target-stdlib-swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >& %t/output4 - -// RUN: %FileCheck -check-prefix=CHECK-RECOMPILED-W %s < %t/output4 -// RUN: %FileCheck -check-prefix=CHECK-NOT-RECOMPILED-W %s < %t/output4 - -// CHECK-RECOMPILED-W: {compile: definesAB.o <= definesAB.swift} -// CHECK-RECOMPILED-W: {compile: usesA.o <= usesA.swift} - - -// CHECK-NOT-RECOMPILED-W-NOT: {compile: main.o <= main.swift} diff --git a/test/Incremental/Fingerprints/extension-changes-member.swift b/test/Incremental/Fingerprints/extension-changes-member.swift deleted file mode 100644 index 0c0a21381e4dd..0000000000000 --- a/test/Incremental/Fingerprints/extension-changes-member.swift +++ /dev/null @@ -1,30 +0,0 @@ -// Test that moving an overloaded member from one extension to another forces a -// rebuild of existing users. We do not strictly need this behavior to occur in -// all cases, but it's good to be safe. - -// Establish status quo - -// RUN: %empty-directory(%t) -// RUN: cp %S/Inputs/extension-changes-member/* %t -// RUN: cp %t/definesS{-before,}.swift - -// Seeing weird failure on CI, so set the mod times -// RUN: touch -t 200101010101 %t/*.swift - -// RUN: cd %t && %target-swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesS.swift -module-name main -output-file-map ofm.json >& %t/output3 - -// Change one type, only uses of that type get recompiled - -// RUN: cp %t/definesS{-after,}.swift - -// Seeing weird failure on CI, so ensure that definesS.swift is newer -// RUN: touch -t 200201010101 %t/* -// RUN: touch -t 200101010101 %t/*.swift -// RUN: touch -t 200301010101 %t/definesS.swift - -// RUN: cd %t && %target-swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesS.swift -module-name main -output-file-map ofm.json >& %t/output4 - -// RUN: %FileCheck -check-prefix=CHECK-RECOMPILED-W %s < %t/output4 - -// CHECK-RECOMPILED-W: {compile: definesS.o <= definesS.swift} -// CHECK-RECOMPILED-W: {compile: main.o <= main.swift} diff --git a/test/Incremental/Fingerprints/member-moves-extensions.swift b/test/Incremental/Fingerprints/member-moves-extensions.swift deleted file mode 100644 index 28fd2bfaaac9d..0000000000000 --- a/test/Incremental/Fingerprints/member-moves-extensions.swift +++ /dev/null @@ -1,32 +0,0 @@ -// Test per-type-body fingerprints using simple extensions -// -// If the parser is allowed to use a body fingerprint for an extension -// this test will fail because usesA.swift won't be recompiled for the -// last step. - -// Establish status quo - -// RUN: %empty-directory(%t) -// RUN: cp %S/Inputs/member-moves-extensions/* %t -// RUN: cp %t/definesS{-before,}.swift - -// Seeing weird failure on CI, so set the mod times -// RUN: touch -t 200101010101 %t/*.swift - -// RUN: cd %t && %target-swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesS.swift -module-name main -output-file-map ofm.json >& %t/output3 - -// Change one type, only uses of that type get recompiled - -// RUN: cp %t/definesS{-after,}.swift - -// Seeing weird failure on CI, so ensure that definesS.swift is newer -// RUN: touch -t 200201010101 %t/* -// RUN: touch -t 200101010101 %t/*.swift -// RUN: touch -t 200301010101 %t/definesS.swift - -// RUN: cd %t && %target-swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesS.swift -module-name main -output-file-map ofm.json >& %t/output4 - -// RUN: %FileCheck -check-prefix=CHECK-RECOMPILED-W %s < %t/output4 - -// CHECK-RECOMPILED-W: {compile: definesS.o <= definesS.swift} -// CHECK-RECOMPILED-W: {compile: main.o <= main.swift} diff --git a/test/Incremental/Fingerprints/nested-enum-fingerprint.swift b/test/Incremental/Fingerprints/nested-enum-fingerprint.swift deleted file mode 100644 index f1e21b5bd2984..0000000000000 --- a/test/Incremental/Fingerprints/nested-enum-fingerprint.swift +++ /dev/null @@ -1,36 +0,0 @@ -// Test per-type-body fingerprints for enums nested in extensions -// - -// Establish status quo - -// RUN: %empty-directory(%t) -// RUN: cp %S/Inputs/nested-enum-fingerprint/* %t -// RUN: cp %t/definesAB{-before,}.swift - -// Seeing weird failure on CI, so set the mod times -// RUN: touch -t 200101010101 %t/*.swift - -// RUN: cd %t && %target-stdlib-swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output3 - -// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB3.swiftdeps - - -// Change one type, only uses of that type get recompiled - -// RUN: cp %t/definesAB{-after,}.swift - -// Seeing weird failure on CI, so ensure that definesAB.swift is newer -// RUN: touch -t 200201010101 %t/* -// RUN: touch -t 200101010101 %t/*.swift -// RUN: touch -t 200301010101 %t/definesAB.swift - -// RUN: cd %t && %target-stdlib-swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output4 - -// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB4.swiftdeps - -// RUN: %FileCheck -check-prefix=CHECK-MAINAB-RECOMPILED %s < %t/output4 - -// REQUIRES: rdar106170343 - -// CHECK-MAINAB-RECOMPILED: Queuing (initial): {compile: definesAB.o <= definesAB.swift} -// CHECK-MAINAB-RECOMPILED: Queuing because of dependencies discovered later: {compile: usesA.o <= usesA.swift} diff --git a/test/Incremental/Fingerprints/nominal-adds-extension.swift b/test/Incremental/Fingerprints/nominal-adds-extension.swift deleted file mode 100644 index 4a22fe79dea32..0000000000000 --- a/test/Incremental/Fingerprints/nominal-adds-extension.swift +++ /dev/null @@ -1,30 +0,0 @@ -// Test that moving an overloaded member from one extension to another forces a -// rebuild of existing users. We do not strictly need this behavior to occur in -// all cases, but it's good to be safe. - -// Establish status quo - -// RUN: %empty-directory(%t) -// RUN: cp %S/Inputs/nominal-adds-extension/* %t -// RUN: cp %t/definesS{-before,}.swift - -// Seeing weird failure on CI, so set the mod times -// RUN: touch -t 200101010101 %t/*.swift - -// RUN: cd %t && %target-swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesS.swift -module-name main -output-file-map ofm.json >& %t/output3 - -// Change one type, only uses of that type get recompiled - -// RUN: cp %t/definesS{-after,}.swift - -// Seeing weird failure on CI, so ensure that definesS.swift is newer -// RUN: touch -t 200201010101 %t/* -// RUN: touch -t 200101010101 %t/*.swift -// RUN: touch -t 200301010101 %t/definesS.swift - -// RUN: cd %t && %target-swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesS.swift -module-name main -output-file-map ofm.json >& %t/output4 - -// RUN: %FileCheck -check-prefix=CHECK-RECOMPILED-W %s < %t/output4 - -// CHECK-RECOMPILED-W: {compile: definesS.o <= definesS.swift} -// CHECK-RECOMPILED-W: {compile: main.o <= main.swift} diff --git a/test/Incremental/Fingerprints/protocol-fingerprint.swift b/test/Incremental/Fingerprints/protocol-fingerprint.swift deleted file mode 100644 index 830bf63e9e114..0000000000000 --- a/test/Incremental/Fingerprints/protocol-fingerprint.swift +++ /dev/null @@ -1,34 +0,0 @@ -// Test per-type-body fingerprints: the protocol case. -// - -// Establish status quo - -// RUN: %empty-directory(%t) -// RUN: cp %S/Inputs/protocol-fingerprint/* %t -// RUN: cp %t/definesAB{-before,}.swift - -// Seeing weird failure on CI, so set the mod times -// RUN: touch -t 200101010101 %t/*.swift - -// RUN: cd %t && %target-stdlib-swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output3 - -// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB3.swiftdeps - - -// Change one type, only uses of that type get recompiled - -// RUN: cp %t/definesAB{-after,}.swift - -// Seeing weird failure on CI, so ensure that definesAB.swift is newer -// RUN: touch -t 200201010101 %t/* -// RUN: touch -t 200101010101 %t/*.swift -// RUN: touch -t 200301010101 %t/definesAB.swift - -// RUN: cd %t && %target-stdlib-swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output4 - -// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB4.swiftdeps - -// RUN: %FileCheck -check-prefix=CHECK-MAINAB-RECOMPILED %s < %t/output4 - -// CHECK-MAINAB-RECOMPILED: Queuing (initial): {compile: definesAB.o <= definesAB.swift} -// CHECK-MAINAB-RECOMPILED: Queuing because of dependencies discovered later: {compile: usesA.o <= usesA.swift} diff --git a/test/Incremental/Fingerprints/struct-fingerprint.swift b/test/Incremental/Fingerprints/struct-fingerprint.swift deleted file mode 100644 index fd9a0feef8a61..0000000000000 --- a/test/Incremental/Fingerprints/struct-fingerprint.swift +++ /dev/null @@ -1,36 +0,0 @@ -// Test per-type-body fingerprints for structs -// - -// Establish status quo - -// RUN: %empty-directory(%t) -// RUN: cp %S/Inputs/struct-fingerprint/* %t -// RUN: cp %t/definesAB{-before,}.swift - -// Seeing weird failure on CI, so set the mod times -// RUN: touch -t 200101010101 %t/*.swift - -// RUN: cd %t && %target-stdlib-swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output3 - -// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB3.swiftdeps - - -// Change one type, only uses of that type get recompiled - -// RUN: cp %t/definesAB{-after,}.swift - -// Seeing weird failure on CI, so ensure that definesAB.swift is newer -// RUN: touch -t 200201010101 %t/* -// RUN: touch -t 200101010101 %t/*.swift -// RUN: touch -t 200301010101 %t/definesAB.swift - -// RUN: cd %t && %target-stdlib-swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output4 - -// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB4.swiftdeps - -// RUN: %FileCheck -check-prefix=CHECK-MAINAB-RECOMPILED %s < %t/output4 - -// REQUIRES: rdar106170343 - -// CHECK-MAINAB-RECOMPILED: Queuing (initial): {compile: definesAB.o <= definesAB.swift} -// CHECK-MAINAB-RECOMPILED: Queuing because of dependencies discovered later: {compile: usesA.o <= usesA.swift} diff --git a/test/Incremental/Inputs/autolinking/AutolinkingTest.framework/AutolinkingTest b/test/Incremental/Inputs/autolinking/AutolinkingTest.framework/AutolinkingTest deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/test/Incremental/Inputs/autolinking/AutolinkingTest.framework/Headers/AutolinkingTest.h b/test/Incremental/Inputs/autolinking/AutolinkingTest.framework/Headers/AutolinkingTest.h deleted file mode 100644 index aa2153b3bb514..0000000000000 --- a/test/Incremental/Inputs/autolinking/AutolinkingTest.framework/Headers/AutolinkingTest.h +++ /dev/null @@ -1,3 +0,0 @@ -struct Test { - int value; -}; diff --git a/test/Incremental/Inputs/autolinking/AutolinkingTest.framework/Modules/module.modulemap b/test/Incremental/Inputs/autolinking/AutolinkingTest.framework/Modules/module.modulemap deleted file mode 100644 index ad5b042c590b0..0000000000000 --- a/test/Incremental/Inputs/autolinking/AutolinkingTest.framework/Modules/module.modulemap +++ /dev/null @@ -1,5 +0,0 @@ -framework module AutolinkingTest { - umbrella header "AutolinkingTest.h" - export * - module * { export * } -} diff --git a/test/Incremental/Inputs/autolinking/autolinking-other.swift b/test/Incremental/Inputs/autolinking/autolinking-other.swift deleted file mode 100644 index 8b137891791fe..0000000000000 --- a/test/Incremental/Inputs/autolinking/autolinking-other.swift +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/Incremental/Inputs/autolinking/ofm.json b/test/Incremental/Inputs/autolinking/ofm.json deleted file mode 100644 index fd598466a11c0..0000000000000 --- a/test/Incremental/Inputs/autolinking/ofm.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "autolinking.swift": { - "object": "./autolinking.o", - "swift-dependencies": "./autolinking.swiftdeps" - }, - "autolinking-overlay.swift": { - "object": "./autolinking-overlay.o", - "swift-dependencies": "./autolinking-overlay.swiftdeps" - }, - "autolinking-other.swift": { - "object": "./autolinking-other.o", - "swift-dependencies": "./autolinking-other.swiftdeps" - }, - "": { - "swift-dependencies": "./autolinking~buildrecord.swiftdeps" - } -} - diff --git a/test/Incremental/Inputs/cross-file-failure/definesA-one.swift b/test/Incremental/Inputs/cross-file-failure/definesA-one.swift deleted file mode 100644 index 5f4a9254d93ae..0000000000000 --- a/test/Incremental/Inputs/cross-file-failure/definesA-one.swift +++ /dev/null @@ -1 +0,0 @@ -struct A {} diff --git a/test/Incremental/Inputs/cross-file-failure/definesA-three.swift b/test/Incremental/Inputs/cross-file-failure/definesA-three.swift deleted file mode 100644 index 24345c2eb6bac..0000000000000 --- a/test/Incremental/Inputs/cross-file-failure/definesA-three.swift +++ /dev/null @@ -1 +0,0 @@ -struct B {} diff --git a/test/Incremental/Inputs/cross-file-failure/definesA-two.swift b/test/Incremental/Inputs/cross-file-failure/definesA-two.swift deleted file mode 100644 index e286b7f8c9a9f..0000000000000 --- a/test/Incremental/Inputs/cross-file-failure/definesA-two.swift +++ /dev/null @@ -1 +0,0 @@ -struct B< {} diff --git a/test/Incremental/Inputs/cross-file-failure/main.swift b/test/Incremental/Inputs/cross-file-failure/main.swift deleted file mode 100644 index 8b137891791fe..0000000000000 --- a/test/Incremental/Inputs/cross-file-failure/main.swift +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/Incremental/Inputs/cross-file-failure/ofm.json b/test/Incremental/Inputs/cross-file-failure/ofm.json deleted file mode 100644 index 801579d81d1d2..0000000000000 --- a/test/Incremental/Inputs/cross-file-failure/ofm.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "definesA.swift": { - "object": "./definesA.o", - "swift-dependencies": "./definesA.swiftdeps" - }, - "usesA.swift": { - "object": "./usesA.o", - "swift-dependencies": "./usesA.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} - diff --git a/test/Incremental/Inputs/cross-file-failure/usesA.swift b/test/Incremental/Inputs/cross-file-failure/usesA.swift deleted file mode 100644 index 9edd764f1217c..0000000000000 --- a/test/Incremental/Inputs/cross-file-failure/usesA.swift +++ /dev/null @@ -1,3 +0,0 @@ -func use() { - let _ = A() -} diff --git a/test/Incremental/Inputs/reference-dependencies-helper.swift b/test/Incremental/Inputs/reference-dependencies-helper.swift deleted file mode 100644 index 78d3a1af00b96..0000000000000 --- a/test/Incremental/Inputs/reference-dependencies-helper.swift +++ /dev/null @@ -1,157 +0,0 @@ -class ClassFromOtherFile {} - -// This Int16 is specifically checked for in the primary file. -typealias AliasFromOtherFile = Int16 - -func funcFromOtherFile() {} - -struct OtherFileOuterType { - struct InnerType { - static let sharedConstant = 42 - } -} - -struct OtherFileOuterType2 { - struct InnerType { - } -} - -struct OtherFileSecretTypeWrapper { - struct SecretType { - static let constant = 42 - } -} - -struct OtherFileIntArray : Sequence { - var array: [Int] = [] - func makeIterator() -> Array.Iterator { return array.makeIterator() } -} -func getOtherFileIntArray() -> OtherFileIntArray { return OtherFileIntArray() } - -typealias OtherFileAliasForSecret = OtherFileSecretTypeWrapper.SecretType - -prefix operator *** -prefix operator ~~~~~ - -prefix operator **** -infix operator ***** -infix operator ****** -protocol Starry { - static prefix func ****(arg: Self) - static func *****(lhs: Self, rhs: Int) - static func ******(lhs: Int, rhs: Self) -} -// Deliberately does not conform to Starry. -struct Flyswatter { - static prefix func ****(arg: Flyswatter) {} - static func *****(lhs: Flyswatter, rhs: Int) {} - static func ******(lhs: Int, rhs: Flyswatter) {} -} - -typealias ExpressibleByOtherFileAliasForFloatLiteral = ExpressibleByFloatLiteral - -enum OtherFileEnum { - case Value - case AnotherValue - case ValueWithPayload(Int) -} - -func getOtherFileEnum() -> OtherFileEnum { return .Value } - -struct OtherFileEnumWrapper { - enum Enum { - case Value - case AnotherValue - case ValueWithPayload(Int) - } -} - -protocol OtherFileProto {} -struct OtherFileProtoImplementor : OtherFileProto {} -func otherFileGetImpl() -> OtherFileProtoImplementor {} -func otherFileUse(_: OtherFileProto) {} - -protocol OtherFileProto2 {} -struct OtherFileProtoImplementor2 : OtherFileProto2 {} -func otherFileGetImpl2() -> OtherFileProtoImplementor2 {} -func otherFileUseGeneric(_: T) {} - -struct OtherFileProtoNonImplementor {} -func otherFileGetNonImpl() -> OtherFileProtoNonImplementor {} - -func topLevel1() -> Int { return 2 } -func topLevel2() -> Int { return 2 } -func topLevel3() -> Int { return 2 } -func topLevel4() -> Int { return 2 } -func topLevel5() -> Int { return 2 } -func topLevel6() -> Int { return 2 } -func topLevel7() -> Int { return 2 } -func topLevel8() -> Int { return 2 } -func topLevel9() -> Int { return 2 } - -typealias TopLevelTy1 = Int -typealias TopLevelTy2 = Int -typealias TopLevelTy3 = Int -typealias TopLevelTy4 = Int -struct TopLevelStruct { - typealias ValueType = Int -} -struct TopLevelStruct2 { - typealias ValueType = Int -} -struct TopLevelStruct3 { - typealias ValueType = Int -} -struct TopLevelStruct4 { - typealias ValueType = Int -} -struct TopLevelStruct5 { - typealias ValueType = Int -} - -protocol TopLevelProto1 {} -protocol TopLevelProto2 {} -protocol TopLevelProto3 {} - -func privateTopLevel1() -> Int { return 2 } -func privateTopLevel2() -> Int { return 2 } -func privateTopLevel3() -> Int { return 2 } -func privateTopLevel4() -> Int { return 2 } -func privateTopLevel5() -> Int { return 2 } -func privateTopLevel6() -> Int { return 2 } -func privateTopLevel7() -> Int { return 2 } -func privateTopLevel8() -> Int { return 2 } -func privateTopLevel9() -> Int { return 2 } - -typealias PrivateTopLevelTy1 = Int -typealias PrivateTopLevelTy2 = Int -typealias PrivateTopLevelTy3 = Int -struct PrivateTopLevelStruct { - typealias ValueType = Int -} -struct PrivateTopLevelStruct2 { - typealias ValueType = Int -} -struct PrivateTopLevelStruct3 { - typealias ValueType = Int -} -struct PrivateTopLevelStruct4 { - typealias ValueType = Int -} - -protocol PrivateProto1 {} -protocol PrivateProto2 {} -protocol PrivateProto3 {} - -struct OtherFileElementType {} - -struct OtherFileTypeToBeExtended {} - -struct TypeReferencedOnlyBySubscript {} -struct TypeReferencedOnlyByPrivateSubscript {} - -protocol ProtoReferencedOnlyInGeneric {} -protocol ProtoReferencedOnlyInPrivateGeneric {} - -struct TypeReferencedOnlyByPrivateVar {} -struct TypeReferencedOnlyByPrivateClassVar {} diff --git a/test/Incremental/Inputs/reference-dependencies-members-helper.swift b/test/Incremental/Inputs/reference-dependencies-members-helper.swift deleted file mode 100644 index ee43ad3db0405..0000000000000 --- a/test/Incremental/Inputs/reference-dependencies-members-helper.swift +++ /dev/null @@ -1,6 +0,0 @@ -class OtherSub : Base {} -class OtherBase {} - -class OtherClass {} - -struct OtherStruct {} diff --git a/test/Incremental/Inputs/superfluous-cascade/definesPoint-after.swift b/test/Incremental/Inputs/superfluous-cascade/definesPoint-after.swift deleted file mode 100644 index b24f3dbec3e06..0000000000000 --- a/test/Incremental/Inputs/superfluous-cascade/definesPoint-after.swift +++ /dev/null @@ -1,4 +0,0 @@ -struct Point { - let x: Double - let y: Double -} diff --git a/test/Incremental/Inputs/superfluous-cascade/definesPoint-before.swift b/test/Incremental/Inputs/superfluous-cascade/definesPoint-before.swift deleted file mode 100644 index 1ae14aa530e4d..0000000000000 --- a/test/Incremental/Inputs/superfluous-cascade/definesPoint-before.swift +++ /dev/null @@ -1,4 +0,0 @@ -struct Point { - let x: Float - let y: Float -} diff --git a/test/Incremental/Inputs/superfluous-cascade/main.swift b/test/Incremental/Inputs/superfluous-cascade/main.swift deleted file mode 100644 index 8b137891791fe..0000000000000 --- a/test/Incremental/Inputs/superfluous-cascade/main.swift +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/Incremental/Inputs/superfluous-cascade/ofm.json b/test/Incremental/Inputs/superfluous-cascade/ofm.json deleted file mode 100644 index 8a41eb61e3f1e..0000000000000 --- a/test/Incremental/Inputs/superfluous-cascade/ofm.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps" - }, - "definesPoint.swift": { - "object": "./definesPoint.o", - "swift-dependencies": "./definesPoint.swiftdeps" - }, - "usesPoint.swift": { - "object": "./usesPoint.o", - "swift-dependencies": "./usesPoint.swiftdeps" - }, - "usesDisplay.swift": { - "object": "./usesDisplay.o", - "swift-dependencies": "./usesDisplay.swiftdeps" - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} - diff --git a/test/Incremental/Inputs/superfluous-cascade/usesDisplay.swift b/test/Incremental/Inputs/superfluous-cascade/usesDisplay.swift deleted file mode 100644 index 54193faf97357..0000000000000 --- a/test/Incremental/Inputs/superfluous-cascade/usesDisplay.swift +++ /dev/null @@ -1,3 +0,0 @@ -struct Computer { - let display: Display -} diff --git a/test/Incremental/Inputs/superfluous-cascade/usesPoint.swift b/test/Incremental/Inputs/superfluous-cascade/usesPoint.swift deleted file mode 100644 index c6d9ea941d66a..0000000000000 --- a/test/Incremental/Inputs/superfluous-cascade/usesPoint.swift +++ /dev/null @@ -1,12 +0,0 @@ -struct Shape { - let vertices: [Point] -} - -struct Display { - let brand: Brand -} - -enum Brand { - case apple - case sun -} diff --git a/test/Incremental/Verifier/gen-output-file-map.py b/test/Incremental/Verifier/gen-output-file-map.py deleted file mode 100644 index 417b5dbb64fef..0000000000000 --- a/test/Incremental/Verifier/gen-output-file-map.py +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env python3 - -import argparse -import io -import json -import os -import sys - - -def fatal(msg): - print(msg, file=sys.stderr) - sys.exit(1) - - -def find_swift_files(path): - for parent, dirs, files in os.walk(path, topdown=True): - for filename in files: - if not filename.endswith('.swift'): - continue - yield (parent, filename) - - -def main(arguments): - parser = argparse.ArgumentParser( - description='Generate an output file map for the given directory') - parser.add_argument('-o', dest='output_dir', - help='Directory to which the file map will be emitted') - parser.add_argument('-r', dest='response_output_file', - help="""Directory to which a matching response file - will be emitted""") - parser.add_argument('input_dir', help='a directory of swift files') - args = parser.parse_args(arguments) - - if not args.output_dir: - fatal("output directory is required") - - # Create the output directory if it doesn't already exist. - if not os.path.isdir(args.output_dir): - os.makedirs(args.output_dir) - - output_path = os.path.join(args.output_dir, 'output.json') - - if not os.path.isdir(args.input_dir): - fatal("input directory does not exist, or is not a directory") - - swift_files = find_swift_files(args.input_dir) - if not swift_files: - fatal("no swift files in the given input directory") - - response_file_contents = [] - all_records = {} - for (root, swift_file) in swift_files: - file_name = os.path.splitext(swift_file)[0] - all_records['./' + swift_file] = { - 'object': './' + file_name + '.o', - 'swift-dependencies': './' + file_name + '.swiftdeps', - } - response_file_contents.append(os.path.join(root, swift_file)) - all_records[""] = { - 'swift-dependencies': './main-buildrecord.swiftdeps' - } - - with io.open(output_path, 'w', encoding='utf-8', newline='\n') as f: - f.write(str(json.dumps(all_records, ensure_ascii=False))) - - if args.response_output_file is not None: - with io.open(args.response_output_file, 'w', - encoding='utf-8', newline='\n') as f: - for line in response_file_contents: - f.write(str(line + " ")) - - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) diff --git a/test/Incremental/Verifier/multi-file-private/Inputs/Base.swift b/test/Incremental/Verifier/multi-file-private/Inputs/Base.swift deleted file mode 100644 index 5ed787d1fd0c6..0000000000000 --- a/test/Incremental/Verifier/multi-file-private/Inputs/Base.swift +++ /dev/null @@ -1,39 +0,0 @@ -open class OpenBase {} // expected-provides {{OpenBase}} -// expected-member {{main.OpenBase.init}} -// expected-member {{main.OpenBase.deinit}} - -public class PublicBase {} // expected-provides {{PublicBase}} -// expected-member {{main.PublicBase.init}} -// expected-member {{main.PublicBase.deinit}} - -internal class InternalBase {} // expected-provides {{InternalBase}} -// expected-member {{main.InternalBase.init}} -// expected-member {{main.InternalBase.deinit}} - -fileprivate class FilePrivateBase {} // expected-provides {{FilePrivateBase}} -// expected-member {{main.FilePrivateBase.init}} -// expected-member {{main.FilePrivateBase.deinit}} - -private class PrivateBase {} // expected-provides {{PrivateBase}} -// expected-member {{main.PrivateBase.init}} -// expected-member {{main.PrivateBase.deinit}} - -final fileprivate class FilePrivateSubclass: FilePrivateBase {} // expected-provides {{FilePrivateSubclass}} expected-superclass {{main.FilePrivateBase}} -// expected-member {{main.FilePrivateSubclass.init}} -// expected-member {{main.FilePrivateSubclass.deinit}} - -final private class PrivateSubclass: PrivateBase {} // expected-provides {{PrivateSubclass}} expected-superclass {{main.PrivateBase}} -// expected-member {{main.PrivateSubclass.init}} -// expected-member {{main.PrivateSubclass.deinit}} - -public protocol PublicBaseProtocol {} // expected-provides {{PublicBaseProtocol}} - -internal protocol InternalBaseProtocol {} // expected-provides {{InternalBaseProtocol}} - -fileprivate protocol FilePrivateBaseProtocol {} // expected-provides {{FilePrivateBaseProtocol}} - -private protocol PrivateBaseProtocol {} // expected-provides {{PrivateBaseProtocol}} - -fileprivate protocol FilePrivateProtocol: FilePrivateBaseProtocol {} // expected-provides {{FilePrivateProtocol}} expected-conformance {{main.FilePrivateBaseProtocol}} - -private protocol PrivateProtocol: PrivateBaseProtocol {} // expected-provides {{PrivateProtocol}} expected-conformance {{main.PrivateBaseProtocol}} diff --git a/test/Incremental/Verifier/multi-file-private/Inputs/Derived.swift b/test/Incremental/Verifier/multi-file-private/Inputs/Derived.swift deleted file mode 100644 index fda263fae1b98..0000000000000 --- a/test/Incremental/Verifier/multi-file-private/Inputs/Derived.swift +++ /dev/null @@ -1,30 +0,0 @@ -final public class OpenSubclass: OpenBase {} // expected-provides {{OpenSubclass}} expected-superclass {{main.OpenBase}} -// expected-provides {{OpenBase}} -// expected-member {{main.OpenBase.init}} -// expected-member {{main.OpenBase.deinit}} -// expected-member {{main.OpenSubclass.init}} -// expected-member {{main.OpenSubclass.deinit}} - -final public class PublicSubclass: PublicBase {} // expected-provides {{PublicSubclass}} expected-superclass {{main.PublicBase}} -// expected-provides {{PublicBase}} -// expected-member {{main.PublicBase.init}} -// expected-member {{main.PublicBase.deinit}} -// expected-member {{main.PublicSubclass.init}} -// expected-member {{main.PublicSubclass.deinit}} - -final internal class InternalSubclass: InternalBase {} // expected-provides {{InternalSubclass}} expected-superclass {{main.InternalBase}} -// expected-provides {{InternalBase}} -// expected-member {{main.InternalBase.init}} -// expected-member {{main.InternalBase.deinit}} -// expected-member {{main.InternalSubclass.init}} -// expected-member {{main.InternalSubclass.deinit}} - -public protocol PublicProtocol: PublicBaseProtocol {} -// expected-provides {{PublicProtocol}} -// expected-provides {{PublicBaseProtocol}} -// expected-conformance {{main.PublicBaseProtocol}} - -internal protocol InternalProtocol: InternalBaseProtocol {} -// expected-provides {{InternalProtocol}} -// expected-provides {{InternalBaseProtocol}} -// expected-conformance {{main.InternalBaseProtocol}} diff --git a/test/Incremental/Verifier/multi-file-private/Inputs/Inner.swift b/test/Incremental/Verifier/multi-file-private/Inputs/Inner.swift deleted file mode 100644 index 7d26febe2fb9e..0000000000000 --- a/test/Incremental/Verifier/multi-file-private/Inputs/Inner.swift +++ /dev/null @@ -1,15 +0,0 @@ -// expected-provides{{Inner}} -// expected-member{{main.Inner.init}} -// expected-member{{main.Inner.deinit}} -public struct Inner {} - -// expected-provides{{Foo}} -public typealias Foo = () -> (Inner) - -// expected-provides{{blah}} -public func blah(foo: Foo) {} - -// expected-provides{{defaultFoo}} -public var defaultFoo: Foo = { - return Inner() -} diff --git a/test/Incremental/Verifier/multi-file-private/Inputs/UsesInner.swift b/test/Incremental/Verifier/multi-file-private/Inputs/UsesInner.swift deleted file mode 100644 index 63d0448bab11d..0000000000000 --- a/test/Incremental/Verifier/multi-file-private/Inputs/UsesInner.swift +++ /dev/null @@ -1,12 +0,0 @@ -// expected-provides{{Inner}} -// expected-provides{{defaultFoo}} -// expected-provides{{blah}} -// expected-provides{{Foo}} -// expected-provides{{??}} -public func blah(foo: Foo?) { - blah(foo: foo ?? defaultFoo) -} - - -// expected-member {{Swift.Optional.deinit}} -// expected-member {{main.Inner.deinit}} diff --git a/test/Incremental/Verifier/multi-file-private/main.swift b/test/Incremental/Verifier/multi-file-private/main.swift deleted file mode 100644 index 613e9530e80e8..0000000000000 --- a/test/Incremental/Verifier/multi-file-private/main.swift +++ /dev/null @@ -1,8 +0,0 @@ -// RUN: %empty-directory(%t) -// RUN: %{python} %S/../gen-output-file-map.py -o %t %S/Inputs -r %t.resp -// RUN: cd %t && %target-swiftc_driver -c -output-file-map %t/output.json -incremental -module-name main -verify-incremental-dependencies @%t.resp -// RUN: cd %t && %target-swiftc_driver -c -output-file-map %t/output.json -incremental -enable-batch-mode -module-name main -verify-incremental-dependencies @%t.resp - -// N.B. These tests are meant to continue to expand to more and more input files -// as more kinds of cross-type dependencies are discovered. This will naturally -// increase the chance that input ordering bugs will be surfaced by batch mode. diff --git a/test/Incremental/Verifier/single-file-private/AnyObject.swift b/test/Incremental/Verifier/single-file-private/AnyObject.swift deleted file mode 100644 index 2ed6ca6b3aad2..0000000000000 --- a/test/Incremental/Verifier/single-file-private/AnyObject.swift +++ /dev/null @@ -1,117 +0,0 @@ -// UNSUPPORTED: CPU=i386 && OS=ios -// UNSUPPORTED: CPU=armv7 && OS=ios -// UNSUPPORTED: CPU=armv7s && OS=ios -// UNSUPPORTED: CPU=armv7k && OS=ios -// Exclude iOS-based 32-bit platforms because the Foundation overlays introduce -// an extra dependency on _KeyValueCodingAndObservingPublishing only for 64-bit -// platforms. -// REQUIRES: objc_interop - -// RUN: %empty-directory(%t) -// RUN: cd %t && %target-swift-frontend(mock-sdk: %clang-importer-sdk) -c -module-name main -verify-incremental-dependencies -primary-file %s -o /dev/null - -import Foundation - -// expected-provides {{LookupFactory}} -// expected-provides {{NSObject}} -// expected-provides {{Selector}} -// expected-provides {{Bool}} -// expected-provides {{ObjCBool}} -// expected-provides {{==}} -// expected-provides {{Equatable}} -// expected-provides {{Hasher}} -// expected-provides {{_ObjectiveCBridgeable}} -// expected-provides{{Hashable}} -// expected-member {{ObjectiveC.NSObject.NSObject}} -// expected-superclass {{ObjectiveC.NSObject}} -// expected-conformance {{ObjectiveC.NSObjectProtocol}} -// expected-member {{ObjectiveC.NSObjectProtocol.NSObject}} -// expected-member {{ObjectiveC.NSObject.Bool}} -// expected-conformance {{Swift.Hashable}} -// expected-conformance {{Swift.Equatable}} -// expected-conformance {{Swift.Sequence}} -// expected-member {{Swift._ExpressibleByBuiltinIntegerLiteral.init}} -@objc private class LookupFactory: NSObject { - // expected-provides {{AssignmentPrecedence}} - // expected-provides {{IntegerLiteralType}} - // expected-provides {{FloatLiteralType}} - // expected-provides {{Int}} - // expected-member {{ObjectiveC.NSObject.someMember}} - // expected-member {{ObjectiveC.NSObject.Int}} - // expected-member {{ObjectiveC.NSObjectProtocol.someMember}} - // expected-member {{ObjectiveC.NSObjectProtocol.Int}} - // expected-member {{main.LookupFactory.Int}} - @objc var someMember: Int = 0 - // expected-member {{ObjectiveC.NSObject.someMethod}} - // expected-member {{ObjectiveC.NSObjectProtocol.someMethod}} - @objc func someMethod() {} - - // expected-member {{ObjectiveC.NSObject.init}} - // expected-member {{ObjectiveC.NSObject.deinit}} - // expected-member {{ObjectiveC.NSObjectProtocol.init}} - // expected-member {{ObjectiveC.NSObjectProtocol.deinit}} - // expected-member {{main.LookupFactory.init}} - // expected-member {{main.LookupFactory.deinit}} - // expected-member {{main.LookupFactory.someMember}} - // expected-member {{main.LookupFactory.someMethod}} -} - -// expected-member {{Swift.ExpressibleByNilLiteral.callAsFunction}} -// expected-member {{Swift.CustomReflectable.callAsFunction}} -// expected-member {{Swift._ObjectiveCBridgeable.callAsFunction}} -// expected-member {{Swift.Optional.callAsFunction}} -// expected-member {{Swift.CustomDebugStringConvertible.callAsFunction}} -// expected-member {{Swift.Equatable.callAsFunction}} -// expected-member {{Swift.Hashable.callAsFunction}} -// expected-member {{Swift.Encodable.callAsFunction}} -// expected-member {{Swift.Decodable.callAsFunction}} -// expected-member {{Swift._BitwiseCopyable.callAsFunction}} - -// expected-member {{Swift.Hashable._rawHashValue}} -// expected-member {{ObjectiveC.NSObject.hash}} -// expected-member {{Swift.Equatable.hashValue}} -// expected-member{{Swift.Hashable.hashValue}} -// expected-member{{Swift.Hashable.hash}} -// expected-member{{ObjectiveC.NSObjectProtocol.==}} -// expected-member {{ObjectiveC.NSObjectProtocol.hashValue}} -// expected-member {{ObjectiveC.NSObjectProtocol.Hasher}} -// expected-member {{Swift.Equatable._rawHashValue}} -// expected-member {{ObjectiveC.NSObject.hashValue}} -// expected-member {{ObjectiveC.NSObjectProtocol.Bool}} -// expected-member {{ObjectiveC.NSObject.==}} -// expected-member {{Swift.Equatable.==}} -// expected-member {{ObjectiveC.NSObject.Hasher}} -// expected-member {{ObjectiveC.NSObjectProtocol.hash}} - -// expected-member {{Swift.Hashable.init}} -// expected-member {{Swift.Hashable.deinit}} -// expected-member {{Swift.Equatable.init}} -// expected-member {{Swift.Equatable.deinit}} - -// expected-member {{Swift.Hashable.==}} -// expected-member {{Swift.Equatable.hash}} -// expected-member {{ObjectiveC.NSObject._rawHashValue}} -// expected-member {{ObjectiveC.NSObjectProtocol._rawHashValue}} - -// expected-provides {{AnyObject}} -func lookupOnAnyObject(object: AnyObject) { // expected-provides {{lookupOnAnyObject}} - _ = object.someMember // expected-dynamic-member {{someMember}} - object.someMethod() // expected-dynamic-member {{someMethod}} -} - -// expected-member {{Swift.Hashable.someMethod}} -// expected-member {{Swift.Equatable.someMethod}} -// expected-member {{Swift.Equatable.someMember}} -// expected-member {{Swift.Hashable.someMember}} -// expected-member {{Swift.Sendable.callAsFunction}} -// expected-member {{ObjectiveC.NSObject.someMethodWithDeprecatedOptions}} -// expected-member {{ObjectiveC.NSObject.someMethodWithPotentiallyUnavailableOptions}} -// expected-member {{ObjectiveC.NSObject.someMethodWithUnavailableOptions}} -// expected-member {{ObjectiveC.NSObjectProtocol.someMethodWithUnavailableOptions}} -// expected-member {{ObjectiveC.NSObjectProtocol.someMethodWithPotentiallyUnavailableOptions}} -// expected-member {{ObjectiveC.NSObjectProtocol.someMethodWithDeprecatedOptions}} - -// expected-member {{Swift.Optional.deinit}} -// expected-member {{Swift.Int32.deinit}} -// expected-member {{Swift.Int.deinit}} -// expected-member {{Swift.UnsafeMutablePointer.deinit}} diff --git a/test/Incremental/Verifier/single-file-private/Conformances.swift b/test/Incremental/Verifier/single-file-private/Conformances.swift deleted file mode 100644 index 45ed1ecadc63c..0000000000000 --- a/test/Incremental/Verifier/single-file-private/Conformances.swift +++ /dev/null @@ -1,28 +0,0 @@ -// RUN: %empty-directory(%t) -// RUN: %{python} %S/../gen-output-file-map.py -o %t %S -// RUN: cd %t && %target-swiftc_driver -typecheck -output-file-map %t/output.json -incremental -module-name main -verify-incremental-dependencies %s - -public protocol PublicProtocol { } // expected-provides {{PublicProtocol}} -internal protocol InternalProtocol { } // expected-provides {{InternalProtocol}} -fileprivate protocol FilePrivateProtocol { } // expected-provides {{FilePrivateProtocol}} -private protocol PrivateProtocol { } // expected-provides {{PrivateProtocol}} - -public struct PublicConformance { } // expected-provides {{PublicConformance}} -// expected-member {{main.PublicConformance.init}} - -// expected-conformance {{main.PublicConformance}} -extension PublicConformance: PublicProtocol { } -extension PublicConformance: InternalProtocol { } -extension PublicConformance: FilePrivateProtocol { } -extension PublicConformance: PrivateProtocol { } - - -private struct PrivateConformance { } // expected-provides {{PrivateConformance}} -// expected-member {{main.PrivateConformance.init}} - -// expected-conformance {{main.PrivateConformance}} -extension PrivateConformance: PublicProtocol { } // expected-conformance {{main.PublicProtocol}} -extension PrivateConformance: InternalProtocol { } // expected-conformance {{main.InternalProtocol}} -extension PrivateConformance: FilePrivateProtocol { } // expected-conformance {{main.FilePrivateProtocol}} -extension PrivateConformance: PrivateProtocol { } // expected-conformance {{main.PrivateProtocol}} - diff --git a/test/Incremental/autolinking-overlay.swift b/test/Incremental/autolinking-overlay.swift deleted file mode 100644 index 9e923bd0ffaba..0000000000000 --- a/test/Incremental/autolinking-overlay.swift +++ /dev/null @@ -1,19 +0,0 @@ -// This test shares inputs with its cousin autolinking.swift -// This one specifically tests an overlay-esque build. - -// RUN: %empty-directory(%t) -// RUN: cp %s %t -// RUN: cp -r %S/Inputs/autolinking/* %t -// RUN: cd %t - -// RUN: %target-build-swift-dylib(%t/%target-library-name(AutolinkingTest)) -autolink-force-load -module-link-name swiftAutolinkingTest -incremental -driver-show-incremental -module-name AutolinkingTest -output-file-map ofm.json -F %t -import-underlying-module autolinking-overlay.swift autolinking-other.swift - -// Make sure `swift_FORCE_LOAD_$_swiftAutolinkingTest` appears in all objects -// RUN: llvm-readobj --symbols --coff-exports %t/autolinking-overlay.o | %FileCheck %s -// RUN: llvm-readobj --symbols --coff-exports %t/autolinking-other.o | %FileCheck %s -// RUN: llvm-readobj --symbols --coff-exports %t/%target-library-name(AutolinkingTest) | %FileCheck %s - -// Emulate an overlay build by importing content from the underlying module. -extension Test { } - -// CHECK: _swift_FORCE_LOAD_$_swiftAutolinkingTest diff --git a/test/Incremental/autolinking.swift b/test/Incremental/autolinking.swift deleted file mode 100644 index d23f2ec471901..0000000000000 --- a/test/Incremental/autolinking.swift +++ /dev/null @@ -1,16 +0,0 @@ -// This test shares inputs with its cousin autolinking-overlay.swift -// This one specifically tests the bare minimum: two empty swift files. - -// RUN: %empty-directory(%t) -// RUN: cp %s %t -// RUN: cp -r %S/Inputs/autolinking/* %t -// RUN: cd %t - -// RUN: %target-build-swift-dylib(%t/%target-library-name(AutolinkingTest)) -autolink-force-load -module-link-name swiftAutolinkingTest -incremental -driver-show-incremental -module-name AutolinkingTest -output-file-map ofm.json autolinking.swift autolinking-other.swift - -// Make sure `swift_FORCE_LOAD_$_swiftAutolinkingTest` appears in all objects -// RUN: llvm-readobj --symbols --coff-exports %t/autolinking.o | %FileCheck %s -// RUN: llvm-readobj --symbols --coff-exports %t/autolinking-other.o | %FileCheck %s -// RUN: llvm-readobj --symbols --coff-exports %t/%target-library-name(AutolinkingTest) | %FileCheck %s - -// CHECK: _swift_FORCE_LOAD_$_swiftAutolinkingTest diff --git a/test/Incremental/cross-file-failure.swift b/test/Incremental/cross-file-failure.swift deleted file mode 100644 index ecdf59efb1b85..0000000000000 --- a/test/Incremental/cross-file-failure.swift +++ /dev/null @@ -1,29 +0,0 @@ -// Establish baseline - -// RUN: %empty-directory(%t) -// RUN: cp %S/Inputs/cross-file-failure/* %t -// RUN: cp %t/definesA{-one,}.swift -// RUN: touch -t 200101010101 %t/*.swift -// RUN: cd %t - -// RUN: %target-stdlib-swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesA.swift usesA.swift -module-name main -output-file-map ofm.json >&output-baseline - -// Change one type and cause a syntax error. This should cause _both_ files to -// rebuild. - -// RUN: cp %t/definesA{-two,}.swift -// RUN: touch -t 200201010101 %t/* -// RUN: touch -t 200101010101 %t/*.swift -// RUN: touch -t 200301010101 %t/definesA.swift - -// RUN: not %target-stdlib-swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesA.swift usesA.swift -module-name main -output-file-map ofm.json - -// RUN: cp %t/definesA{-three,}.swift -// RUN: touch -t 200401010101 %t/definesA.swift - -// RUN: not %target-stdlib-swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesA.swift usesA.swift -module-name main -output-file-map ofm.json >&output-incremental - -// RUN: %FileCheck -check-prefix=CHECK-RECOMPILED %s --dump-input=always < %t/output-incremental - -// CHECK-RECOMPILED: Queuing (initial): {compile: definesA.o <= definesA.swift} -// CHECK-RECOMPILED: Queuing because of dependencies discovered later: {compile: usesA.o <= usesA.swift} diff --git a/test/Incremental/superfluous-cascade.swift b/test/Incremental/superfluous-cascade.swift deleted file mode 100644 index 9092a1d30f932..0000000000000 --- a/test/Incremental/superfluous-cascade.swift +++ /dev/null @@ -1,22 +0,0 @@ -// Establish baseline - -// RUN: %empty-directory(%t) -// RUN: cp %S/Inputs/superfluous-cascade/* %t -// RUN: cp %t/definesPoint{-before,}.swift -// RUN: touch -t 200101010101 %t/*.swift - -// RUN: cd %t && %target-stdlib-swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesPoint.swift usesPoint.swift usesDisplay.swift -module-name main -output-file-map ofm.json >&output3 - -// Change one type - now only the user of that type rebuilds - -// RUN: cp %t/definesPoint{-after,}.swift -// RUN: touch -t 200201010101 %t/* -// RUN: touch -t 200101010101 %t/*.swift -// RUN: touch -t 200301010101 %t/definesPoint.swift - -// RUN: cd %t && %target-stdlib-swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesPoint.swift usesPoint.swift usesDisplay.swift -module-name main -output-file-map ofm.json >&output4 - -// RUN: %FileCheck -check-prefix=CHECK-RECOMPILED %s --dump-input=always < %t/output4 - -// CHECK-RECOMPILED: Queuing because of dependencies discovered later: {compile: usesPoint.o <= usesPoint.swift} -// CHECK-RECOMPILED-NOT: Queuing because of dependencies discovered later: {compile: usesDisplay.o <= usesDisplay.swift} diff --git a/test/lit.cfg b/test/lit.cfg index ef5922883889e..2543db274b6da 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -870,10 +870,6 @@ elif swift_test_subset == 'only_stress': config.available_features.add("stress_test") config.limit_to_features.add("stress_test") config.limit_to_features.discard("executable_test") -elif swift_test_subset == 'only_early_swiftdriver': - # Point this subset at a driver-specific set of tests. These are the known reduced subset - # of tests to verify the basic functionality of the standalone (early) swift-driver. - config.test_source_root = os.path.join(config.test_source_root, 'Driver', 'Dependencies') else: lit_config.fatal("Unknown test mode %r" % swift_test_subset) @@ -886,8 +882,7 @@ if not 'swift_driver' in lit_config.params: # Check if we need to run lit tests using the legacy driver or the new driver # The default for existing test runs is to use the legacy driver. # The new driver is tested separately. -if swift_test_subset != 'only_early_swiftdriver' and\ - os.environ.get('SWIFT_FORCE_TEST_NEW_DRIVER') is None: +if os.environ.get('SWIFT_FORCE_TEST_NEW_DRIVER') is None: config.environment['SWIFT_USE_OLD_DRIVER'] = '1' config.environment['SWIFT_AVOID_WARNING_USING_OLD_DRIVER'] = '1' diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index 9342efbbc9ed3..41e0048aa865c 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -8,7 +8,6 @@ if(SWIFT_INCLUDE_TOOLS) add_subdirectory(Basic) add_subdirectory(ClangImporter) add_subdirectory(DependencyScan) - add_subdirectory(Driver) add_subdirectory(FrontendTool) add_subdirectory(Localization) add_subdirectory(IDE) diff --git a/unittests/Driver/CMakeLists.txt b/unittests/Driver/CMakeLists.txt deleted file mode 100644 index 8f3a8cd1953ac..0000000000000 --- a/unittests/Driver/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -add_swift_unittest(SwiftDriverTests - FineGrainedDependencyGraphTests.cpp - MockingFineGrainedDependencyGraphs.cpp - UnitTestSourceFileDepGraphFactory.cpp -) - -target_link_libraries(SwiftDriverTests PRIVATE - swiftAST - swiftClangImporter - swiftSema - swiftDriver) diff --git a/unittests/Driver/FineGrainedDependencyGraphTests.cpp b/unittests/Driver/FineGrainedDependencyGraphTests.cpp deleted file mode 100644 index 430b7cbb67333..0000000000000 --- a/unittests/Driver/FineGrainedDependencyGraphTests.cpp +++ /dev/null @@ -1,917 +0,0 @@ -//===--------------- FineGrainedDependencyGraphTests.cpp ------------------===// -// -// This source file is part of the Swift.org open source project -// -// Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -// -//===----------------------------------------------------------------------===// - -#include "MockingFineGrainedDependencyGraphs.h" -#include "swift/Basic/ReferenceDependencyKeys.h" -#include "swift/Driver/FineGrainedDependencyDriverGraph.h" -#include "swift/Driver/Job.h" -#include "gtest/gtest.h" - -// \c findJobsToRecompileWhenWholeJobChanges, -// \c findExternallyDependentUntracedJobs, and \c simulateReload -// may include jobs in their result that -// would be excluded in the coarse-grained graph. But since these will be jobs -// that have already been scheduled, downstream mechanisms will filter them out. - -// \c \c findExternallyDependentUntracedJobs may also return duplicates - -// To debug a test, create the \c ModuleDepGraph and pass true as the second -// argument to the constructor, then find the dot files in the directory -// where the tests run, -// and inspect them with, e.g. OmniGraffle. - -using namespace swift; -using namespace fine_grained_dependencies; -using namespace mocking_fine_grained_dependency_graphs; -using Job = driver::Job; - -static OutputFileMap OFM; - -static Job - job0(OFM, "0"), - job1(OFM, "1"), - job2(OFM, "2"), - job3(OFM, "3"), - job4(OFM, "4"), - job5(OFM, "5"), - job6(OFM, "6"), - job7(OFM, "7"), - job8(OFM, "8"), - job9(OFM, "9"), - job10(OFM, "10"), - job11(OFM, "11"), - job12(OFM, "12"); - -template -static bool contains(const Range &range, const T &value) { - return std::find(std::begin(range), std::end(range), value) != - std::end(range); -} - -/// Ensure that 0 and 10 get distinct fingerprints -TEST(ModuleDepGraph, FingerprintFormation) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::topLevel, {"a"}}}); - simulateLoad(graph, &job1, {{NodeKind::topLevel, {"a->", "z"}}}); - simulateLoad(graph, &job10, {{NodeKind::topLevel, {"z"}}}); - { - auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job0); - EXPECT_FALSE(contains(jobs, &job10)); - } -} - -TEST(ModuleDepGraph, BasicLoad) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::topLevel, {"a->", "b->"}}}); - simulateLoad(graph, &job1, {{NodeKind::nominal, {"c->", "d->"}}}); - simulateLoad(graph, &job2, {{NodeKind::topLevel, {"e", "f"}}}); - simulateLoad(graph, &job3, {{NodeKind::nominal, {"g", "h"}}}); - simulateLoad(graph, &job4, {{NodeKind::dynamicLookup, {"i", "j"}}}); - simulateLoad(graph, &job5, {{NodeKind::dynamicLookup, {"k->", "l->"}}}); - simulateLoad(graph, &job6, {{NodeKind::member, {"m,mm", "n,nn"}}}); - simulateLoad(graph, &job7, {{NodeKind::member, {"o,oo->", "p,pp->"}}}); - simulateLoad(graph, &job8, - {{NodeKind::externalDepend, {"/foo->", "/bar->"}}}); - - simulateLoad(graph, &job9, - {{NodeKind::nominal, {"a", "b", "c->", "d->"}}, - {NodeKind::topLevel, {"b", "c", "d->", "a->"}}}); -} - -TEST(ModuleDepGraph, IndependentNodes) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::topLevel, {"a0", "a->"}}}); - simulateLoad(graph, &job1, {{NodeKind::topLevel, {"b0", "b->"}}}); - simulateLoad(graph, &job2, {{NodeKind::topLevel, {"c0", "c->"}}}); - - EXPECT_EQ(1u, graph.findJobsToRecompileWhenWholeJobChanges(&job0).size()); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job1)); - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job2)); - - // Mark 0 again -- should be no change. - EXPECT_EQ(0u, graph.findJobsToRecompileWhenWholeJobChanges(&job0).size()); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job1)); - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job2)); - - EXPECT_EQ(1u, graph.findJobsToRecompileWhenWholeJobChanges(&job2).size()); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job1)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job2)); - - EXPECT_EQ(1u, graph.findJobsToRecompileWhenWholeJobChanges(&job1).size()); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job2)); -} - -TEST(ModuleDepGraph, IndependentDepKinds) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::nominal, {"a", "a->"}}}); - simulateLoad(graph, &job1, {{NodeKind::topLevel, {"a", "b->"}}}); - - EXPECT_EQ(1u, graph.findJobsToRecompileWhenWholeJobChanges(&job0).size()); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job1)); -} - -TEST(ModuleDepGraph, IndependentDepKinds2) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::nominal, {"a->", "b"}}}); - simulateLoad(graph, &job1, {{NodeKind::topLevel, {"b->", "a"}}}); - - EXPECT_EQ(1u, graph.findJobsToRecompileWhenWholeJobChanges(&job1).size()); - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); -} - -TEST(ModuleDepGraph, IndependentMembers) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::member, {"a,aa"}}}); - simulateLoad(graph, &job1, {{NodeKind::member, {"a,bb->"}}}); - simulateLoad(graph, &job2, {{NodeKind::potentialMember, {"a"}}}); - simulateLoad(graph, &job3, {{NodeKind::member, {"b,aa->"}}}); - simulateLoad(graph, &job4, {{NodeKind::member, {"b,bb->"}}}); - - EXPECT_EQ(1u, graph.findJobsToRecompileWhenWholeJobChanges(&job0).size()); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job1)); - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job2)); - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job3)); - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job4)); -} - -TEST(ModuleDepGraph, SimpleDependent) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::topLevel, {"a", "b", "c"}}}); - simulateLoad(graph, &job1, {{NodeKind::topLevel, {"x->", "b->", "z->"}}}); - { - auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job0); - EXPECT_EQ(2u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job1)); - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - - EXPECT_EQ(0u, graph.findJobsToRecompileWhenWholeJobChanges(&job0).size()); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); -} - -TEST(ModuleDepGraph, SimpleDependentReverse) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::topLevel, {"a->", "b->", "c->"}}}); - simulateLoad(graph, &job1, {{NodeKind::topLevel, {"x", "b", "z"}}}); - - { - auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job1); - EXPECT_EQ(2u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job0)); - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - { - const auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job0); - EXPECT_EQ(1u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job0)); - } - EXPECT_EQ(0u, graph.findJobsToRecompileWhenWholeJobChanges(&job0).size()); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); -} - -TEST(ModuleDepGraph, SimpleDependent2) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::nominal, {"a", "b", "c"}}}); - simulateLoad(graph, &job1, {{NodeKind::nominal, {"x->", "b->", "z->"}}}); - - { - auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job0); - EXPECT_EQ(2u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job1)); - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - - EXPECT_EQ(0u, graph.findJobsToRecompileWhenWholeJobChanges(&job0).size()); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); -} - -TEST(ModuleDepGraph, SimpleDependent3) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, - {{NodeKind::nominal, {"a"}}, {NodeKind::topLevel, {"a"}}}); - simulateLoad(graph, &job1, {{NodeKind::nominal, {"a->"}}}); - - { - auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job0); - EXPECT_EQ(2u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job1)); - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - - EXPECT_EQ(0u, graph.findJobsToRecompileWhenWholeJobChanges(&job0).size()); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); -} - -TEST(ModuleDepGraph, SimpleDependent4) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::nominal, {"a"}}}); - simulateLoad(graph, &job1, - {{NodeKind::nominal, {"a->"}}, {NodeKind::topLevel, {"a->"}}}); - - { - auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job0); - EXPECT_EQ(2u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job1)); - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - - EXPECT_EQ(0u, graph.findJobsToRecompileWhenWholeJobChanges(&job0).size()); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); -} - -TEST(ModuleDepGraph, SimpleDependent5) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, - {{NodeKind::nominal, {"a"}}, {NodeKind::topLevel, {"a"}}}); - simulateLoad(graph, &job1, - {{NodeKind::nominal, {"a->"}}, {NodeKind::topLevel, {"a->"}}}); - - { - auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job0); - EXPECT_EQ(2u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job1)); - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - - auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job0); - EXPECT_EQ(0u, graph.findJobsToRecompileWhenWholeJobChanges(&job0).size()); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); -} - -TEST(ModuleDepGraph, SimpleDependent6) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::dynamicLookup, {"a", "b", "c"}}}); - simulateLoad(graph, &job1, - {{NodeKind::dynamicLookup, {"x->", "b->", "z->"}}}); - { - auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job0); - EXPECT_EQ(2u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job1)); - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - - EXPECT_EQ(0u, graph.findJobsToRecompileWhenWholeJobChanges(&job0).size()); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); -} - -TEST(ModuleDepGraph, SimpleDependentMember) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::member, {"a,aa", "b,bb", "c,cc"}}}); - simulateLoad(graph, &job1, - {{NodeKind::member, {"x,xx->", "b,bb->", "z,zz->"}}}); - - { - auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job0); - EXPECT_EQ(2u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job1)); - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - - EXPECT_EQ(0u, graph.findJobsToRecompileWhenWholeJobChanges(&job0).size()); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); -} - -TEST(ModuleDepGraph, MultipleDependentsSame) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::nominal, {"a", "b", "c"}}}); - simulateLoad(graph, &job1, {{NodeKind::nominal, {"x->", "b->", "z->"}}}); - simulateLoad(graph, &job2, {{NodeKind::nominal, {"q->", "b->", "s->"}}}); - - { - auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job0); - EXPECT_EQ(3u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job1)); - EXPECT_TRUE(contains(jobs, &job2)); - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job2)); - - EXPECT_EQ(0u, graph.findJobsToRecompileWhenWholeJobChanges(&job0).size()); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job2)); -} - -TEST(ModuleDepGraph, MultipleDependentsDifferent) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::nominal, {"a", "b", "c"}}}); - simulateLoad(graph, &job1, {{NodeKind::nominal, {"x->", "b->", "z->"}}}); - simulateLoad(graph, &job2, {{NodeKind::nominal, {"q->", "r->", "c->"}}}); - - { - auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job0); - EXPECT_EQ(3u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job1)); - EXPECT_TRUE(contains(jobs, &job2)); - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job2)); - - EXPECT_EQ(0u, graph.findJobsToRecompileWhenWholeJobChanges(&job0).size()); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job2)); -} - -TEST(ModuleDepGraph, ChainedDependents) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::nominal, {"a", "b", "c"}}}); - simulateLoad(graph, &job1, {{NodeKind::nominal, {"x->", "b->", "z"}}}); - simulateLoad(graph, &job2, {{NodeKind::nominal, {"z->"}}}); - - { - auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job0); - EXPECT_EQ(3u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job1)); - EXPECT_TRUE(contains(jobs, &job2)); - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job2)); - - EXPECT_EQ(0u, graph.findJobsToRecompileWhenWholeJobChanges(&job0).size()); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job2)); -} - -TEST(ModuleDepGraph, ChainedNoncascadingDependents) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::nominal, {"a", "b", "c"}}}); - simulateLoad(graph, &job1, {{NodeKind::nominal, {"x->", "b->", "#z"}}}); - simulateLoad(graph, &job2, {{NodeKind::nominal, {"#z->"}}}); - - { - auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job0); - EXPECT_EQ(3u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job1)); - EXPECT_TRUE(contains(jobs, &job2)); - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job2)); - - EXPECT_EQ(0u, graph.findJobsToRecompileWhenWholeJobChanges(&job0).size()); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job2)); -} - -TEST(ModuleDepGraph, ChainedNoncascadingDependents2) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::topLevel, {"a", "b", "c"}}}); - simulateLoad( - graph, &job1, - {{NodeKind::topLevel, {"x->", "#b->"}}, {NodeKind::nominal, {"z"}}}); - simulateLoad(graph, &job2, {{NodeKind::nominal, {"z->"}}}); - - { - auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job0); - EXPECT_EQ(2u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job1)); - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job2)); -} - -TEST(ModuleDepGraph, MarkTwoNodes) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::topLevel, {"a", "b"}}}); - simulateLoad(graph, &job1, {{NodeKind::topLevel, {"a->", "z"}}}); - simulateLoad(graph, &job2, {{NodeKind::topLevel, {"z->"}}}); - simulateLoad(graph, &job10, {{NodeKind::topLevel, {"y", "z", "q->"}}}); - simulateLoad(graph, &job11, {{NodeKind::topLevel, {"y->"}}}); - simulateLoad(graph, &job12, {{NodeKind::topLevel, {"q->", "q"}}}); - - { - auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job0); - EXPECT_EQ(3u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job1)); - EXPECT_TRUE(contains(jobs, &job2)); //????? - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job2)); - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job10)); - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job11)); - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job12)); - - { - auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job10); - EXPECT_EQ(2u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job10)); - EXPECT_TRUE(contains(jobs, &job11)); - EXPECT_FALSE(contains(jobs, &job2)); - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job2)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job10)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job11)); - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job12)); -} - -TEST(ModuleDepGraph, MarkOneNodeTwice) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::nominal, {"a"}}}); - simulateLoad(graph, &job1, {{NodeKind::nominal, {"a->"}}}); - simulateLoad(graph, &job2, {{NodeKind::nominal, {"b->"}}}); - - { - auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job0); - EXPECT_EQ(2u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job1)); - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job2)); - - { - auto jobs = simulateReload(graph, &job0, {{NodeKind::nominal, {"b"}}}); - EXPECT_EQ(2u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job2)); - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job2)); -} - -TEST(ModuleDepGraph, MarkOneNodeTwice2) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::nominal, {"a"}}}); - simulateLoad(graph, &job1, {{NodeKind::nominal, {"a->"}}}); - simulateLoad(graph, &job2, {{NodeKind::nominal, {"b->"}}}); - - { - auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job0); - EXPECT_EQ(2u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job1)); - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job2)); - - { - auto jobs = simulateReload(graph, &job0, {{NodeKind::nominal, {"a", "b"}}}); - EXPECT_EQ(2u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job2)); - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job2)); -} - -TEST(ModuleDepGraph, ReloadDetectsChange) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::nominal, {"a"}}}); - simulateLoad(graph, &job1, {{NodeKind::nominal, {"a->"}}}); - simulateLoad(graph, &job2, {{NodeKind::nominal, {"b->"}}}); - { - auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job1); - EXPECT_EQ(1u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job1)); - } - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job2)); - - { - auto jobs = - simulateReload(graph, &job1, {{NodeKind::nominal, {"b", "a->"}}}); - EXPECT_EQ(2u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job1)); - EXPECT_TRUE(contains(jobs, &job2)); - } - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job2)); -} - -TEST(ModuleDepGraph, NotTransitiveOnceMarked) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::nominal, {"a"}}}); - simulateLoad(graph, &job1, {{NodeKind::nominal, {"a->"}}}); - simulateLoad(graph, &job2, {{NodeKind::nominal, {"b->"}}}); - - { - const auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job1); - EXPECT_EQ(1u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job1)); - } - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job2)); - - { - const auto jobs = - simulateReload(graph, &job1, {{NodeKind::nominal, {"b", "a->"}}}); - EXPECT_EQ(2u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job1)); - EXPECT_TRUE(contains(jobs, &job2)); - } - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job2)); -} - -TEST(ModuleDepGraph, DependencyLoops) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::topLevel, {"a", "b", "c", "a->"}}}); - simulateLoad(graph, &job1, - {{NodeKind::topLevel, {"x", "x->", "b->", "z->"}}}); - simulateLoad(graph, &job2, {{NodeKind::topLevel, {"x->"}}}); - - { - auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job0); - EXPECT_EQ(3u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job1)); - EXPECT_TRUE(contains(jobs, &job2)); - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job2)); - - { - auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job0); - EXPECT_EQ(0u, jobs.size()); - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job2)); -} - -TEST(ModuleDepGraph, MarkIntransitive) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::topLevel, {"a", "b", "c"}}}); - simulateLoad(graph, &job1, {{NodeKind::topLevel, {"x->", "b->", "z->"}}}); - - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job1)); - - { - auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job0); - EXPECT_EQ(2u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job1)); - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); -} - -TEST(ModuleDepGraph, MarkIntransitiveTwice) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::topLevel, {"a", "b", "c"}}}); - simulateLoad(graph, &job1, {{NodeKind::topLevel, {"x->", "b->", "z->"}}}); - - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job1)); -} - -TEST(ModuleDepGraph, MarkIntransitiveThenIndirect) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::topLevel, {"a", "b", "c"}}}); - simulateLoad(graph, &job1, {{NodeKind::topLevel, {"x->", "b->", "z->"}}}); - - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job1)); - - { - auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job0); - EXPECT_EQ(2u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job0)); - EXPECT_TRUE(contains(jobs, &job1)); - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); -} - -TEST(ModuleDepGraph, SimpleExternal) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, - {{NodeKind::externalDepend, {"/foo->", "/bar->"}}}); - - EXPECT_TRUE(contains(graph.getExternalDependencies(), "/foo")); - EXPECT_TRUE(contains(graph.getExternalDependencies(), "/bar")); - - { - auto jobs = graph.findExternallyDependentUntracedJobs("/foo"); - EXPECT_EQ(jobs.size(), 1u); - EXPECT_TRUE(contains(jobs, &job0)); - } - - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - - EXPECT_EQ(0u, graph.findExternallyDependentUntracedJobs("/foo").size()); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); -} - -TEST(ModuleDepGraph, SimpleExternal2) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, - {{NodeKind::externalDepend, {"/foo->", "/bar->"}}}); - - EXPECT_EQ(1u, graph.findExternallyDependentUntracedJobs("/bar").size()); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - - EXPECT_EQ(0u, graph.findExternallyDependentUntracedJobs("/bar").size()); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); -} - -TEST(ModuleDepGraph, ChainedExternal) { - ModuleDepGraph graph; - - simulateLoad( - graph, &job0, - {{NodeKind::externalDepend, {"/foo->"}}, {NodeKind::topLevel, {"a"}}}); - simulateLoad( - graph, &job1, - {{NodeKind::externalDepend, {"/bar->"}}, {NodeKind::topLevel, {"a->"}}}); - - EXPECT_TRUE(contains(graph.getExternalDependencies(), "/foo")); - EXPECT_TRUE(contains(graph.getExternalDependencies(), "/bar")); - - { - auto jobs = graph.findExternallyDependentUntracedJobs("/foo"); - EXPECT_EQ(jobs.size(), 2u); - EXPECT_TRUE(contains(jobs, &job0)); - EXPECT_TRUE(contains(jobs, &job1)); - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - - { - auto jobs = graph.findExternallyDependentUntracedJobs("/foo"); - EXPECT_EQ(jobs.size(), 0u); - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); -} - -TEST(ModuleDepGraph, ChainedExternalReverse) { - ModuleDepGraph graph; - - simulateLoad( - graph, &job0, - {{NodeKind::externalDepend, {"/foo->"}}, {NodeKind::topLevel, {"a"}}}); - simulateLoad( - graph, &job1, - {{NodeKind::externalDepend, {"/bar->"}}, {NodeKind::topLevel, {"a->"}}}); - - { - auto jobs = graph.findExternallyDependentUntracedJobs("/bar"); - EXPECT_EQ(1u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job1)); - } - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - - EXPECT_EQ(0u, graph.findExternallyDependentUntracedJobs("/bar").size()); - EXPECT_FALSE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); - - { - auto jobs = graph.findExternallyDependentUntracedJobs("/foo"); - EXPECT_EQ(1u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job0)); - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); -} - -TEST(ModuleDepGraph, ChainedExternalPreMarked) { - ModuleDepGraph graph; - - simulateLoad( - graph, &job0, - {{NodeKind::externalDepend, {"/foo->"}}, {NodeKind::topLevel, {"a"}}}); - simulateLoad( - graph, &job1, - {{NodeKind::externalDepend, {"/bar->"}}, {NodeKind::topLevel, {"a->"}}}); - - { - auto jobs = graph.findExternallyDependentUntracedJobs("/foo"); - EXPECT_EQ(2u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job0)); - EXPECT_TRUE(contains(jobs, &job1)); - } - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job0)); - EXPECT_TRUE(graph.haveAnyNodesBeenTraversedIn(&job1)); -} - -TEST(ModuleDepGraph, MutualInterfaceHash) { - ModuleDepGraph graph; - simulateLoad(graph, &job0, {{NodeKind::topLevel, {"a", "b->"}}}); - simulateLoad(graph, &job1, {{NodeKind::topLevel, {"a->", "b"}}}); - - const auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job0); - EXPECT_TRUE(contains(jobs, &job1)); -} - -TEST(ModuleDepGraph, EnabledTypeBodyFingerprints) { - ModuleDepGraph graph; - - simulateLoad(graph, &job0, {{NodeKind::nominal, {"B2->"}}}); - simulateLoad(graph, &job1, {{NodeKind::nominal, {"B1", "B2"}}}); - simulateLoad(graph, &job2, {{NodeKind::nominal, {"B1->"}}}); - - { - const auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job1); - EXPECT_EQ(3u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job0)); - EXPECT_TRUE(contains(jobs, &job1)); - EXPECT_TRUE(contains(jobs, &job2)); - } -} - -TEST(ModuleDepGraph, BaselineForPrintsAndCrossType) { - ModuleDepGraph graph; - - // Because when A1 changes, B1 and not B2 is affected, only jobs1 and job2 - // should be recompiled, except type fingerprints is off! - - simulateLoad(graph, &job0, {{NodeKind::nominal, {"A1", "A2"}}}); - simulateLoad(graph, &job1, {{NodeKind::nominal, {"B1", "A1->"}}}); - simulateLoad(graph, &job2, {{NodeKind::nominal, {"C1", "A2->"}}}); - simulateLoad(graph, &job3, {{NodeKind::nominal, {"D1"}}}); - - { - const auto jobs = simulateReload( - graph, &job0, {{NodeKind::nominal, {"A1", "A2"}}}, - Fingerprint::fromString("33333333333333333333333333333333")); - EXPECT_EQ(3u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job0)); - EXPECT_TRUE(contains(jobs, &job1)); - EXPECT_TRUE(contains(jobs, &job2)); - EXPECT_FALSE(contains(jobs, &job3)); - } -} - -TEST(ModuleDepGraph, LoadPassesWithFingerprint) { - ModuleDepGraph graph; - EXPECT_TRUE( - getChangesForSimulatedLoad(graph, &job0, {{NodeKind::nominal, {"A@1"}}})); -} - -TEST(ModuleDepGraph, UseFingerprints) { - ModuleDepGraph graph; - - // Because when A1 changes, B1 and not B2 is affected, only jobs1 and job2 - // should be recompiled, except type fingerprints is off! - // Include a dependency on A1, to ensure it does not muck things up. - - simulateLoad(graph, &job0, {{NodeKind::nominal, {"A1@1", "A2@2", "A1->"}}}); - simulateLoad(graph, &job1, {{NodeKind::nominal, {"B1", "A1->"}}}); - simulateLoad(graph, &job2, {{NodeKind::nominal, {"C1", "A2->"}}}); - simulateLoad(graph, &job3, {{NodeKind::nominal, {"D1"}}}); - - { - const auto jobs = - simulateReload(graph, &job0, {{NodeKind::nominal, {"A1@11", "A2@2"}}}); - EXPECT_EQ(3u, jobs.size()); - EXPECT_TRUE(contains(jobs, &job0)); - EXPECT_TRUE(contains(jobs, &job1)); - EXPECT_TRUE(contains(jobs, &job2)); - EXPECT_FALSE(contains(jobs, &job3)); - } -} - -TEST(ModuleDepGraph, CrossTypeDependencyBaseline) { - ModuleDepGraph graph; - simulateLoad(graph, &job0, {{NodeKind::nominal, {"A"}}}); - simulateLoad(graph, &job1, {{NodeKind::nominal, {"B", "C", "A->"}}}); - simulateLoad(graph, &job2, {{NodeKind::nominal, {"B->"}}}); - simulateLoad(graph, &job3, {{NodeKind::nominal, {"C->"}}}); - - const auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job0); - EXPECT_TRUE(contains(jobs, &job0)); - EXPECT_TRUE(contains(jobs, &job1)); - EXPECT_TRUE(contains(jobs, &job2)); - EXPECT_TRUE(contains(jobs, &job3)); -} - -TEST(ModuleDepGraph, CrossTypeDependency) { - ModuleDepGraph graph; - // Because of the cross-type dependency, A->B, - // when A changes, only B is dirtied in job1. - - simulateLoad(graph, &job0, {{NodeKind::nominal, {"A"}}}); - simulateLoad(graph, &job1, {{NodeKind::nominal, {"B", "C", "A->B"}}}); - simulateLoad(graph, &job2, {{NodeKind::nominal, {"B->"}}}); - simulateLoad(graph, &job3, {{NodeKind::nominal, {"C->"}}}); - - const auto jobs = graph.findJobsToRecompileWhenWholeJobChanges(&job0); - EXPECT_TRUE(contains(jobs, &job0)); - EXPECT_TRUE(contains(jobs, &job1)); - EXPECT_TRUE(contains(jobs, &job2)); - EXPECT_FALSE(contains(jobs, &job3)); -} - -TEST(ModuleDepGraph, CrossTypeDependencyBaselineWithFingerprints) { - ModuleDepGraph graph; - simulateLoad(graph, &job0, {{NodeKind::nominal, {"A1@1", "A2@2"}}}); - simulateLoad(graph, &job1, {{NodeKind::nominal, {"B1", "C1", "A1->"}}}); - simulateLoad(graph, &job2, {{NodeKind::nominal, {"B1->"}}}); - simulateLoad(graph, &job3, {{NodeKind::nominal, {"C1->"}}}); - simulateLoad(graph, &job4, {{NodeKind::nominal, {"B2", "C2", "A2->"}}}); - simulateLoad(graph, &job5, {{NodeKind::nominal, {"B2->"}}}); - simulateLoad(graph, &job6, {{NodeKind::nominal, {"C2->"}}}); - - const auto jobs = - simulateReload(graph, &job0, {{NodeKind::nominal, {"A1@11", "A2@2"}}}); - EXPECT_TRUE(contains(jobs, &job0)); - EXPECT_TRUE(contains(jobs, &job1)); - EXPECT_TRUE(contains(jobs, &job2)); - EXPECT_TRUE(contains(jobs, &job3)); - EXPECT_FALSE(contains(jobs, &job4)); - EXPECT_FALSE(contains(jobs, &job5)); - EXPECT_FALSE(contains(jobs, &job6)); -} - -TEST(ModuleDepGraph, CrossTypeDependencyWithFingerprints) { - ModuleDepGraph graph; - // Because of the cross-type dependency, A->B, - // when A changes, only B is dirtied in job1. - - simulateLoad(graph, &job0, {{NodeKind::nominal, {"A1@1", "A2@2"}}}); - simulateLoad(graph, &job1, {{NodeKind::nominal, {"B1", "C1", "A1->B1"}}}); - simulateLoad(graph, &job2, {{NodeKind::nominal, {"B1->"}}}); - simulateLoad(graph, &job3, {{NodeKind::nominal, {"C1->"}}}); - simulateLoad(graph, &job4, {{NodeKind::nominal, {"B2", "C2", "A2->B2"}}}); - simulateLoad(graph, &job5, {{NodeKind::nominal, {"B2->"}}}); - simulateLoad(graph, &job6, {{NodeKind::nominal, {"C2->"}}}); - - const auto jobs = - simulateReload(graph, &job0, {{NodeKind::nominal, {"A1@11", "A2@2"}}}); - EXPECT_TRUE(contains(jobs, &job0)); - EXPECT_TRUE(contains(jobs, &job1)); - EXPECT_TRUE(contains(jobs, &job2)); - EXPECT_FALSE(contains(jobs, &job3)); - EXPECT_FALSE(contains(jobs, &job4)); - EXPECT_FALSE(contains(jobs, &job5)); - EXPECT_FALSE(contains(jobs, &job6)); -} diff --git a/unittests/Driver/MockingFineGrainedDependencyGraphs.cpp b/unittests/Driver/MockingFineGrainedDependencyGraphs.cpp deleted file mode 100644 index e16718d2ef017..0000000000000 --- a/unittests/Driver/MockingFineGrainedDependencyGraphs.cpp +++ /dev/null @@ -1,91 +0,0 @@ -//===--------------- MockingFineGrainedDependencyGraphs.cpp ---------------===// -// -// This source file is part of the Swift.org open source project -// -// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -// -//===----------------------------------------------------------------------===// - -#include "MockingFineGrainedDependencyGraphs.h" -#include "swift/AST/AbstractSourceFileDepGraphFactory.h" -#include "swift/AST/DiagnosticEngine.h" -#include "swift/Basic/ReferenceDependencyKeys.h" -#include "swift/Basic/SourceManager.h" -#include "llvm/Support/VirtualOutputBackends.h" - -#include -#include - -using namespace swift; -using namespace fine_grained_dependencies; -using namespace mocking_fine_grained_dependency_graphs; - -void mocking_fine_grained_dependency_graphs::simulateLoad( - ModuleDepGraph &g, const driver::Job *cmd, - const DependencyDescriptions &dependencyDescriptions, - llvm::Optional interfaceHashIfNonEmpty, - const bool hadCompilationError) { - const auto changes = getChangesForSimulatedLoad( - g, cmd, dependencyDescriptions, interfaceHashIfNonEmpty, - hadCompilationError); - assert(changes && "simulated load should always succeed"); -} - -ModuleDepGraph::Changes -mocking_fine_grained_dependency_graphs::getChangesForSimulatedLoad( - ModuleDepGraph &g, const driver::Job *cmd, - const DependencyDescriptions &dependencyDescriptions, - llvm::Optional interfaceHashIfNonEmpty, - const bool hadCompilationError) { - auto swiftDeps = - cmd->getOutput().getAdditionalOutputForType(file_types::TY_SwiftDeps).str(); - auto swiftDepsFingerprint = - swift::mockFingerprintFromString(swiftDeps).value(); - auto interfaceHash = interfaceHashIfNonEmpty.value_or(swiftDepsFingerprint); - - SourceManager sm; - DiagnosticEngine diags(sm); - llvm::vfs::OnDiskOutputBackend backend; - - auto sfdg = - UnitTestSourceFileDepGraphFactory( - hadCompilationError, swiftDeps, interfaceHash, - g.emitFineGrainedDependencyDotFileAfterEveryImport, - dependencyDescriptions, diags, backend) - .construct(); - - return g.loadFromSourceFileDepGraph(cmd, sfdg, diags); -} - -std::vector -mocking_fine_grained_dependency_graphs::simulateReload( - ModuleDepGraph &g, const driver::Job *cmd, - const DependencyDescriptions &dependencyDescriptions, - llvm::Optional interfaceHashIfNonEmpty, - const bool hadCompilationError) { - const auto changedNodes = getChangesForSimulatedLoad( - g, cmd, dependencyDescriptions, interfaceHashIfNonEmpty, - hadCompilationError); - if (!changedNodes) - return g.getAllJobs(); - return g.findJobsToRecompileWhenNodesChange(changedNodes.value()); -} - -LLVM_ATTRIBUTE_UNUSED -std::vector -mocking_fine_grained_dependency_graphs::printJobsForDebugging( - const std::vector &jobs) { - llvm::errs() << "\nprintForDebugging: "; - for (auto *j : jobs) { - const auto swiftDeps = - j->getOutput().getAdditionalOutputForType(file_types::TY_SwiftDeps); - assert(!swiftDeps.empty()); - llvm::errs() << "job" << swiftDeps << " "; - } - llvm::errs() << "\n"; - return jobs; -} diff --git a/unittests/Driver/MockingFineGrainedDependencyGraphs.h b/unittests/Driver/MockingFineGrainedDependencyGraphs.h deleted file mode 100644 index 2dc305c814677..0000000000000 --- a/unittests/Driver/MockingFineGrainedDependencyGraphs.h +++ /dev/null @@ -1,120 +0,0 @@ -//===----------- MockingFineGrainedDependencyGraphs.h -----------*- C++ -*-===// -// -// This source file is part of the Swift.org open source project -// -// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -// -//===----------------------------------------------------------------------===// - -#ifndef MOCKING_FINE_GRAINED_DEPENDENCY_GRAPHS_H -#define MOCKING_FINE_GRAINED_DEPENDENCY_GRAPHS_H - -#include "UnitTestSourceFileDepGraphFactory.h" -#include "swift/AST/AbstractSourceFileDepGraphFactory.h" -#include "swift/AST/FineGrainedDependencies.h" -#include "swift/Driver/FineGrainedDependencyDriverGraph.h" - -namespace swift { -namespace fine_grained_dependencies { - -/// Affordances for testing the \c SourceFileDepGraph and \c ModuleFileDepGraph -/// -/// Because fine-grained swiftdeps files are somewhat verbose, this file -/// provides affordances to mock them up in a concise fashion. - -namespace mocking_fine_grained_dependency_graphs { - -/// Simulate loading for unit testing, as if the driver is reading the swiftdeps -/// file for the first time. -/// -/// \param g The graph to load into. -/// \param cmd The \c Job whose dependency info will be loaded. -/// \param dependencyDescriptions Dependency info, see below -/// \param interfaceHashIfNonEmpty If non-empty, overrides the default simulated -/// in the dependency information. -/// \param hadCompilationError Simulate a compilation error. -/// -/// Fails an assertion if the information is not valid (for instance a -/// fingerprint where it should not be). -/// -/// *Dependency info format:* -/// A list of entries, each of which is keyed by a \c NodeKind and contains a -/// list of dependency nodes. -/// -/// *Dependency node format:* -/// Each node here is either a "provides" (i.e. a declaration provided by the -/// file) or a "depends" (i.e. a declaration that is depended upon). -/// -/// For "provides" (i.e. declarations provided by the source file): -/// = [#][@], -/// where the '#' prefix indicates that the declaration is file-private. -/// -/// = | , -/// where is a mangled type name, and is a base-name. -/// -/// For "depends" (i.e. uses of declarations in the source file): -/// [#][~]->[] -/// where the '#' prefix indicates that the use does not cascade, -/// the '~' prefix indicates that the holder is private, -/// is the depended-upon declaration and the optional -/// is the dependent declaration if known. If not known, the -/// use will be the entire file. - -void simulateLoad( - ModuleDepGraph &g, const driver::Job *cmd, - const DependencyDescriptions &dependencyDescriptions, - llvm::Optional interfaceHashIfNonEmpty = llvm::None, - const bool hadCompilationError = false); - -/// Same as \ref simulateLoad, but returns the specifically changed nodes or -/// None if the load failed. - -ModuleDepGraph::Changes getChangesForSimulatedLoad( - ModuleDepGraph &g, const driver::Job *cmd, - const DependencyDescriptions &dependencyDescriptions, - llvm::Optional interfaceHashIfNonEmpty = llvm::None, - const bool hadCompilationError = false); - -/// Simulates the driver reloading a swiftdeps file after a job has run. -/// Returns the jobs that must now be run, possibly redundantly including \p -/// cmd. -/// -/// See \ref simulateLoad for a parameter description. - -std::vector -simulateReload(ModuleDepGraph &g, const driver::Job *cmd, - const DependencyDescriptions &dependencyDescriptions, - llvm::Optional interfaceHashIfNonEmpty = llvm::None, - const bool hadCompilationError = false); - -std::vector -printJobsForDebugging(const std::vector &jobs); - -} // end namespace mocking_fine_grained_dependency_graphs -} // namespace fine_grained_dependencies - -/// Aborts if unconvertible, returns \c None for an empty string. -inline llvm::Optional -mockFingerprintFromString(llvm::StringRef value) { - auto contents = value.str(); - const auto n = value.size(); - if (n == 0 || n > Fingerprint::DIGEST_LENGTH) - return llvm::None; - // Insert at start so that "1" and "10" are distinct - contents.insert(0, Fingerprint::DIGEST_LENGTH - n, '0'); - auto fingerprint = Fingerprint::fromString(contents); - if (!fingerprint) { - llvm::errs() << "unconvertable fingerprint from switdeps ':" - << contents << "'\n"; - abort(); - } - return fingerprint; -} - -} // end namespace swift - -#endif /* MOCKING_FINE_GRAINED_DEPENDENCY_GRAPHS_H */ diff --git a/unittests/Driver/UnitTestSourceFileDepGraphFactory.cpp b/unittests/Driver/UnitTestSourceFileDepGraphFactory.cpp deleted file mode 100644 index 50c4be96a532a..0000000000000 --- a/unittests/Driver/UnitTestSourceFileDepGraphFactory.cpp +++ /dev/null @@ -1,172 +0,0 @@ -//===--- UnitTestSourceFileDepGraphFactory.cpp ----------------------------===// -// -// This source file is part of the Swift.org open source project -// -// Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -// -//===----------------------------------------------------------------------===// - -#include "UnitTestSourceFileDepGraphFactory.h" -#include "MockingFineGrainedDependencyGraphs.h" - -using namespace swift; -using namespace swift::fine_grained_dependencies; -using namespace swift::fine_grained_dependencies:: - mocking_fine_grained_dependency_graphs; - -//============================================================================== -// MARK: UnitTestSourceFileDepGraphFactory - adding collections of Decls -//============================================================================== - -void UnitTestSourceFileDepGraphFactory::forEachEntry( - function_ref fn) { - for (const auto &kindAndEntries : dependencyDescriptions) { - for (StringRef s : kindAndEntries.second) - fn(kindAndEntries.first, s); - } -} - -void UnitTestSourceFileDepGraphFactory::addAllDefinedDecls() { - forEachEntry([&](NodeKind kind, StringRef s) { - if (isADefinedDecl(s)) - addADefinedDecl(s, kind); - }); -} - -void UnitTestSourceFileDepGraphFactory::addAllUsedDecls() { - forEachEntry([&](NodeKind kind, StringRef s) { - if (!isADefinedDecl(s)) - addAUsedDecl(s, kind); - }); -} - -//============================================================================== -// MARK: UnitTestSourceFileDepGraphFactory - adding individual Decls -//============================================================================== - -void UnitTestSourceFileDepGraphFactory::addADefinedDecl(StringRef s, - const NodeKind kind) { - const llvm::Optional key = - parseADefinedDecl(s, kind, DeclAspect::interface); - if (!key) - return; - auto fingerprintString = s.split(fingerprintSeparator).second.str(); - const llvm::Optional fingerprint = - swift::mockFingerprintFromString(fingerprintString); - - AbstractSourceFileDepGraphFactory::addADefinedDecl(key.value(), - fingerprint); -} - -void UnitTestSourceFileDepGraphFactory::addAUsedDecl(const StringRef s, - const NodeKind kind) { - const auto defAndUseKeys = parseAUsedDecl(s, kind); - if (defAndUseKeys) { - AbstractSourceFileDepGraphFactory::addAUsedDecl(defAndUseKeys->first, - defAndUseKeys->second); - } -} - -DependencyKey -UnitTestSourceFileDepGraphFactory::computeUseKey(StringRef s, - const bool isCascadingUse) { - // For now, in unit tests, mock uses are always nominal - static const NodeKind kindOfUse = NodeKind::nominal; - const DeclAspect aspectOfUse = - isCascadingUse ? DeclAspect::interface : DeclAspect::implementation; - - if (!s.empty()) - return parseADefinedDecl(s, kindOfUse, aspectOfUse).value(); - StringRef swiftDepsRef(swiftDeps); - return DependencyKey::Builder(NodeKind::sourceFileProvide, aspectOfUse) - .withName(swiftDepsRef) - .build(); -} - -//============================================================================== -// MARK: AbstractSourceFileDepGraphFactory - parsing -//============================================================================== - -const char *UnitTestSourceFileDepGraphFactory::defUseSeparator = "->"; - -bool UnitTestSourceFileDepGraphFactory::isADefinedDecl(StringRef s) { - return s.find(defUseSeparator) == StringRef::npos; -} - -llvm::Optional -UnitTestSourceFileDepGraphFactory::parseADefinedDecl(StringRef s, - const NodeKind kind, - const DeclAspect aspect) { - static const char *privatePrefix = "#"; - - s.consume_front(privatePrefix); - const std::string context = - parseContext(s.split(fingerprintSeparator).first, kind); - std::string name = parseName(s.split(fingerprintSeparator).first, kind); - - return DependencyKey(kind, aspect, context, name); -} - -llvm::Optional> -UnitTestSourceFileDepGraphFactory::parseAUsedDecl(const StringRef argString, - const NodeKind kind) { - static const char *noncascadingPrefix = "#"; - static const char *privateHolderPrefix = "~"; - - StringRef s = argString; - const bool isCascadingUse = !s.consume_front(noncascadingPrefix); - // Someday, we might differentiate. - const DeclAspect aspectOfDefUsed = DeclAspect::interface; - - s.consume_front(privateHolderPrefix); - const auto defUseStrings = s.split(defUseSeparator); - const auto context = parseContext(defUseStrings.first, kind); - const auto name = parseName(defUseStrings.first, kind); - - const DependencyKey defKey = - DependencyKey(kind, aspectOfDefUsed, context, name); - - return std::make_pair(defKey, - computeUseKey(defUseStrings.second, isCascadingUse)); -} - -llvm::Optional -UnitTestSourceFileDepGraphFactory::singleNameIsContext(const NodeKind kind) { - switch (kind) { - case NodeKind::nominal: - case NodeKind::potentialMember: - return true; - case NodeKind::topLevel: - case NodeKind::dynamicLookup: - case NodeKind::externalDepend: - case NodeKind::sourceFileProvide: - return false; - case NodeKind::member: - return llvm::None; - case NodeKind::kindCount: - llvm_unreachable("impossible case"); - } -} - -std::string -UnitTestSourceFileDepGraphFactory::parseContext(const StringRef s, - const NodeKind kind) { - return !singleNameIsContext(kind) - ? s.split(nameContextSeparator).first.str() - : singleNameIsContext(kind).value() ? s.str() : ""; -} - -std::string UnitTestSourceFileDepGraphFactory::parseName(const StringRef s, - const NodeKind kind) { - const std::string name = - !singleNameIsContext(kind) - ? s.split(nameContextSeparator).second.str() - : singleNameIsContext(kind).value() ? "" : s.str(); - assert(kind != NodeKind::member || - !name.empty() && "Should be a potentialMember"); - return name; -} diff --git a/unittests/Driver/UnitTestSourceFileDepGraphFactory.h b/unittests/Driver/UnitTestSourceFileDepGraphFactory.h deleted file mode 100644 index bebb330fcfc8d..0000000000000 --- a/unittests/Driver/UnitTestSourceFileDepGraphFactory.h +++ /dev/null @@ -1,83 +0,0 @@ -//===----- UnitTestSourceFileDepGraphFactory.h ------------------*- C++ -*-===// -// -// This source file is part of the Swift.org open source project -// -// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -// -//===----------------------------------------------------------------------===// -#ifndef UnitTestSourceFileDepGraphFactory_h -#define UnitTestSourceFileDepGraphFactory_h - -#include "swift/AST/AbstractSourceFileDepGraphFactory.h" -#include "llvm/Support/VirtualOutputBackend.h" - -namespace swift { -namespace fine_grained_dependencies { -namespace mocking_fine_grained_dependency_graphs { - -using DependencyDescriptions = - std::unordered_multimap>; - -class UnitTestSourceFileDepGraphFactory - : public AbstractSourceFileDepGraphFactory { - const DependencyDescriptions dependencyDescriptions; - -public: - UnitTestSourceFileDepGraphFactory( - bool hadCompilationError, StringRef swiftDeps, - Fingerprint fileFingerprint, bool emitDotFileAfterConstruction, - const DependencyDescriptions &dependencyDescriptions, - DiagnosticEngine &diags, llvm::vfs::OutputBackend &backend) - : AbstractSourceFileDepGraphFactory( - hadCompilationError, swiftDeps, fileFingerprint, - emitDotFileAfterConstruction, diags, backend), - dependencyDescriptions(dependencyDescriptions) {} - - ~UnitTestSourceFileDepGraphFactory() override = default; - -private: - void addAllDefinedDecls() override; - void addAllUsedDecls() override; - - /// For brevity, unit tests specify dependencies by NodeKind, - /// but for processing, the kind is needed for each entry. - void forEachEntry(function_ref fn); - - static const char *defUseSeparator; - static bool isADefinedDecl(StringRef s); - - void addADefinedDecl(StringRef s, NodeKind kind); - void addAUsedDecl(StringRef s, NodeKind kind); - - llvm::Optional> - parseAUsedDecl(StringRef s, NodeKind); - - /// Parse and return an interface \c DependencyKey - llvm::Optional parseADefinedDecl(StringRef s, NodeKind, - DeclAspect); - - DependencyKey computeUseKey(StringRef s, bool isCascadingUse); - - /// Return true if when the name appears in a unit test, it represents a - /// context, not a baseName. Return false if a single name is a baseName, - /// without context Return None if there should be two names - static llvm::Optional singleNameIsContext(NodeKind kind); - - static constexpr char nameContextSeparator = ','; - - static constexpr char fingerprintSeparator = '@'; - - static std::string parseContext(const StringRef s, const NodeKind kind); - - static std::string parseName(const StringRef s, const NodeKind kind); -}; - -} // namespace mocking_fine_grained_dependency_graphs -} // namespace fine_grained_dependencies -} // namespace swift - -#endif /* UnitTestSourceFileDepGraphFactory_h */ diff --git a/utils/run-test b/utils/run-test index 2516af25381a3..e5364eb1aa6ed 100755 --- a/utils/run-test +++ b/utils/run-test @@ -35,7 +35,6 @@ TEST_SUBSETS = [ 'only_validation', 'only_long', 'only_stress', - 'only_early_swiftdriver' ] SWIFT_SOURCE_DIR = os.path.join(SWIFT_SOURCE_ROOT, 'swift') diff --git a/utils/swift_build_support/swift_build_support/host_specific_configuration.py b/utils/swift_build_support/swift_build_support/host_specific_configuration.py index e823935fb5695..55f742cb95e89 100644 --- a/utils/swift_build_support/swift_build_support/host_specific_configuration.py +++ b/utils/swift_build_support/swift_build_support/host_specific_configuration.py @@ -188,14 +188,6 @@ def __init__(self, host_target, args, stage_dependent_args=None): else: subset_suffix = "" - # If the compiler is being tested after being built to use the - # standalone swift-driver, we build a test-target to - # run a reduced set of lit-tests that verify the early swift-driver. - if args.test_early_swift_driver and\ - not test_host_only: - self.swift_test_run_targets.append( - "check-swift-only_early_swiftdriver-{}".format(name)) - # Support for running the macCatalyst tests with # the iOS-like target triple. macosx_platform_match = re.search("macosx-(.*)", name) diff --git a/validation-test/BuildSystem/test_early_swift_driver_and_test.test b/validation-test/BuildSystem/test_early_swift_driver_and_test.test deleted file mode 100644 index 4e9e8b12e7f91..0000000000000 --- a/validation-test/BuildSystem/test_early_swift_driver_and_test.test +++ /dev/null @@ -1,8 +0,0 @@ -# REQUIRES: standalone_build - -# RUN: %empty-directory(%t) -# RUN: mkdir -p %t -# RUN: SKIP_XCODE_VERSION_CHECK=1 SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --test --cmake %cmake 2>&1 | %FileCheck %s - -# CHECK: --- Building earlyswiftdriver --- -# CHECK: cmake --build {{.*}}check-swift-only_early_swiftdriver diff --git a/validation-test/Driver/Dependencies/Inputs/rdar23148987/helper-1.swift b/validation-test/Driver/Dependencies/Inputs/rdar23148987/helper-1.swift deleted file mode 100644 index 0b907bb930099..0000000000000 --- a/validation-test/Driver/Dependencies/Inputs/rdar23148987/helper-1.swift +++ /dev/null @@ -1,3 +0,0 @@ -public class Test { - func foo() {} -} \ No newline at end of file diff --git a/validation-test/Driver/Dependencies/Inputs/rdar23148987/helper-2.swift b/validation-test/Driver/Dependencies/Inputs/rdar23148987/helper-2.swift deleted file mode 100644 index fd2643d21a175..0000000000000 --- a/validation-test/Driver/Dependencies/Inputs/rdar23148987/helper-2.swift +++ /dev/null @@ -1,3 +0,0 @@ -public final class Test { - func foo() {} -} \ No newline at end of file diff --git a/validation-test/Driver/Dependencies/Inputs/rdar23148987/output.json b/validation-test/Driver/Dependencies/Inputs/rdar23148987/output.json deleted file mode 100644 index 7971d0ca6d0b4..0000000000000 --- a/validation-test/Driver/Dependencies/Inputs/rdar23148987/output.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "./helper.swift": { - "object": "./helper.o", - "swift-dependencies": "./helper.swiftdeps", - }, - "./main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps", - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/validation-test/Driver/Dependencies/Inputs/rdar25405605/helper-1.swift b/validation-test/Driver/Dependencies/Inputs/rdar25405605/helper-1.swift deleted file mode 100644 index ec20ab4aa0973..0000000000000 --- a/validation-test/Driver/Dependencies/Inputs/rdar25405605/helper-1.swift +++ /dev/null @@ -1,13 +0,0 @@ -enum Foo { - case one - case two -} - -func doSomething(_ value: Foo) { - switch value { - case .one: - print("Hello") - case .two: - print("Goodbye") - } -} diff --git a/validation-test/Driver/Dependencies/Inputs/rdar25405605/helper-2.swift b/validation-test/Driver/Dependencies/Inputs/rdar25405605/helper-2.swift deleted file mode 100644 index 056314b1d64e1..0000000000000 --- a/validation-test/Driver/Dependencies/Inputs/rdar25405605/helper-2.swift +++ /dev/null @@ -1,14 +0,0 @@ -enum Foo { - case one - case two - case three -} - -func doSomething(_ value: Foo) { - switch value { - case .one: - print("Hello") - case .two: - print("Goodbye") - } -} diff --git a/validation-test/Driver/Dependencies/Inputs/rdar25405605/helper-3.swift b/validation-test/Driver/Dependencies/Inputs/rdar25405605/helper-3.swift deleted file mode 100644 index 89c1f94a47824..0000000000000 --- a/validation-test/Driver/Dependencies/Inputs/rdar25405605/helper-3.swift +++ /dev/null @@ -1,15 +0,0 @@ -enum Foo { - case one - case two - case three -} - -func doSomething(_ value: Foo) { - switch value { - case .one: - print("Hello") - case .two: - print("Goodbye") - case .three: break - } -} diff --git a/validation-test/Driver/Dependencies/Inputs/rdar25405605/output.json b/validation-test/Driver/Dependencies/Inputs/rdar25405605/output.json deleted file mode 100644 index 7971d0ca6d0b4..0000000000000 --- a/validation-test/Driver/Dependencies/Inputs/rdar25405605/output.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "./helper.swift": { - "object": "./helper.o", - "swift-dependencies": "./helper.swiftdeps", - }, - "./main.swift": { - "object": "./main.o", - "swift-dependencies": "./main.swiftdeps", - }, - "": { - "swift-dependencies": "./main~buildrecord.swiftdeps" - } -} diff --git a/validation-test/Driver/Dependencies/rdar23148987.swift b/validation-test/Driver/Dependencies/rdar23148987.swift deleted file mode 100644 index 8bd9f77c50705..0000000000000 --- a/validation-test/Driver/Dependencies/rdar23148987.swift +++ /dev/null @@ -1,61 +0,0 @@ -// RUN: %empty-directory(%t) - -// RUN: cp %s %t/main.swift -// RUN: cp %S/Inputs/rdar23148987/helper-1.swift %t/helper.swift -// RUN: touch -t 201401240005 %t/*.swift - -// RUN: cd %t && %target-build-swift -c -incremental -output-file-map %S/Inputs/rdar23148987/output.json -parse-as-library ./main.swift ./helper.swift -parseable-output -j1 -module-name main 2>&1 | %FileCheck -check-prefix=CHECK-1 %s - -// CHECK-1-NOT: warning -// CHECK-1: {{^{$}} -// CHECK-1-DAG: "kind"{{ ?}}: "began" -// CHECK-1-DAG: "name"{{ ?}}: "compile" -// CHECK-1-DAG: "{{(\.\\\/)?}}main.swift" -// CHECK-1: {{^}$}} - -// CHECK-1: {{^{$}} -// CHECK-1-DAG: "kind"{{ ?}}: "began" -// CHECK-1-DAG: "name"{{ ?}}: "compile" -// CHECK-1-DAG: "{{(\.\\\/)?}}helper.swift" -// CHECK-1: {{^}$}} - -// RUN: ls %t/ | %FileCheck -check-prefix=CHECK-LS %s - -// CHECK-LS-DAG: main.o -// CHECK-LS-DAG: helper.o - -// RUN: cd %t && %target-build-swift -c -incremental -output-file-map %S/Inputs/rdar23148987/output.json -parse-as-library ./main.swift ./helper.swift -parseable-output -j1 -module-name main 2>&1 | %FileCheck -check-prefix=CHECK-1-SKIPPED %s - -// CHECK-1-SKIPPED-NOT: warning -// CHECK-1-SKIPPED: {{^{$}} -// CHECK-1-SKIPPED-DAG: "kind"{{ ?}}: "skipped" -// CHECK-1-SKIPPED-DAG: "name"{{ ?}}: "compile" -// CHECK-1-SKIPPED-DAG: "{{(\.\\\/)?}}main.swift" -// CHECK-1-SKIPPED: {{^}$}} - -// CHECK-1-SKIPPED: {{^{$}} -// CHECK-1-SKIPPED-DAG: "kind"{{ ?}}: "skipped" -// CHECK-1-SKIPPED-DAG: "name"{{ ?}}: "compile" -// CHECK-1-SKIPPED-DAG: "{{(\.\\\/)?}}helper.swift" -// CHECK-1-SKIPPED: {{^}$}} - -// RUN: cp %S/Inputs/rdar23148987/helper-2.swift %t/helper.swift -// RUN: touch -t 201401240006 %t/helper.swift -// RUN: cd %t && %target-build-swift -c -incremental -output-file-map %S/Inputs/rdar23148987/output.json -parse-as-library ./main.swift ./helper.swift -parseable-output -j1 -module-name main 2>&1 -driver-show-incremental -driver-show-job-lifecycle | %FileCheck -check-prefix=CHECK-2 %s - -// CHECK-2-NOT: warning -// CHECK-2: {{^{$}} -// CHECK-2-DAG: "kind"{{ ?}}: "began" -// CHECK-2-DAG: "name"{{ ?}}: "compile" -// CHECK-2-DAG: "{{(\.\\\/)?}}helper.swift" -// CHECK-2: {{^}$}} - -// CHECK-2: {{^{$}} -// CHECK-2-DAG: "kind"{{ ?}}: "began" -// CHECK-2-DAG: "name"{{ ?}}: "compile" -// CHECK-2-DAG: "{{(\.\\\/)?}}main.swift" -// CHECK-2: {{^}$}} - -func test(obj: Test) { - obj.foo() -} diff --git a/validation-test/Driver/Dependencies/rdar25405605.swift b/validation-test/Driver/Dependencies/rdar25405605.swift deleted file mode 100644 index d713736d99c3b..0000000000000 --- a/validation-test/Driver/Dependencies/rdar25405605.swift +++ /dev/null @@ -1,83 +0,0 @@ -// RUN: %empty-directory(%t) - -// RUN: cp %s %t/main.swift -// RUN: cp %S/Inputs/rdar25405605/helper-1.swift %t/helper.swift -// RUN: touch -t 201401240005 %t/*.swift - -// RUN: cd %t && %target-build-swift -c -incremental -output-file-map %S/Inputs/rdar25405605/output.json -parse-as-library ./main.swift ./helper.swift -parseable-output -j1 -module-name main 2>&1 | %FileCheck -check-prefix=CHECK-1 %s - -// CHECK-1-NOT: warning -// CHECK-1: {{^{$}} -// CHECK-1-DAG: "kind"{{ ?}}: "began" -// CHECK-1-DAG: "name"{{ ?}}: "compile" -// CHECK-1-DAG: "{{(\.\\\/)?}}main.swift" -// CHECK-1: {{^}$}} - -// CHECK-1: {{^{$}} -// CHECK-1-DAG: "kind"{{ ?}}: "began" -// CHECK-1-DAG: "name"{{ ?}}: "compile" -// CHECK-1-DAG: "{{(\.\\\/)?}}helper.swift" -// CHECK-1: {{^}$}} - -// RUN: ls %t/ | %FileCheck -check-prefix=CHECK-LS %s - -// CHECK-LS-DAG: main.o -// CHECK-LS-DAG: helper.o - -// RUN: cd %t && %target-build-swift -c -incremental -output-file-map %S/Inputs/rdar25405605/output.json -parse-as-library ./main.swift ./helper.swift -parseable-output -j1 -module-name main 2>&1 | %FileCheck -check-prefix=CHECK-1-SKIPPED %s - -// CHECK-1-SKIPPED-NOT: warning -// CHECK-1-SKIPPED: {{^{$}} -// CHECK-1-SKIPPED-DAG: "kind"{{ ?}}: "skipped" -// CHECK-1-SKIPPED-DAG: "name"{{ ?}}: "compile" -// CHECK-1-SKIPPED-DAG: "{{(\.\\\/)?}}main.swift" -// CHECK-1-SKIPPED: {{^}$}} - -// CHECK-1-SKIPPED: {{^{$}} -// CHECK-1-SKIPPED-DAG: "kind"{{ ?}}: "skipped" -// CHECK-1-SKIPPED-DAG: "name"{{ ?}}: "compile" -// CHECK-1-SKIPPED-DAG: "{{(\.\\\/)?}}helper.swift" -// CHECK-1-SKIPPED: {{^}$}} - -// RUN: cp %S/Inputs/rdar25405605/helper-2.swift %t/helper.swift -// RUN: touch -t 201401240006 %t/helper.swift -// RUN: cd %t && not %target-build-swift -c -incremental -output-file-map %S/Inputs/rdar25405605/output.json -parse-as-library ./main.swift ./helper.swift -parseable-output -j1 -module-name main 2>&1 | %FileCheck -check-prefix=CHECK-2 %s - -// CHECK-2-NOT: warning -// CHECK-2: {{^{$}} -// CHECK-2-DAG: "kind"{{ ?}}: "began" -// CHECK-2-DAG: "name"{{ ?}}: "compile" -// CHECK-2-DAG: "{{(\.\\\/)?}}helper.swift" -// CHECK-2: {{^}$}} - -// CHECK-2: {{^{$}} -// CHECK-2-DAG: "kind"{{ ?}}: "skipped" -// CHECK-2-DAG: "name"{{ ?}}: "compile" -// CHECK-2-DAG: "{{(\.\\\/)?}}main.swift" -// CHECK-2: {{^}$}} - -// RUN: cp %S/Inputs/rdar25405605/helper-3.swift %t/helper.swift -// RUN: touch -t 201401240007 %t/helper.swift -// Driver now schedules jobs in the order of the inputs, so since this test wants -// helper first, pass helper.swift before main.swift -// RUN: cd %t && not %target-build-swift -c -incremental -output-file-map %S/Inputs/rdar25405605/output.json -parse-as-library ./helper.swift ./main.swift -parseable-output -j1 -module-name main 2>&1 | %FileCheck -check-prefix=CHECK-3 %s - -// CHECK-3-NOT: warning -// CHECK-3: {{^{$}} -// CHECK-3-DAG: "kind"{{ ?}}: "began" -// CHECK-3-DAG: "name"{{ ?}}: "compile" -// CHECK-3-DAG: "{{(\.\\\/)?}}helper.swift" -// CHECK-3: {{^}$}} - -// CHECK-3: {{^{$}} -// CHECK-3-DAG: "kind"{{ ?}}: "began" -// CHECK-3-DAG: "name"{{ ?}}: "compile" -// CHECK-3-DAG: "{{(\.\\\/)?}}main.swift" -// CHECK-3: {{^}$}} - -func foo(_ value: Foo) -> Bool { - switch value { - case .one: return true - case .two: return false - } -}