Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions lib/DependencyScan/ScanDependencies.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -816,9 +816,6 @@ static void writeJSON(llvm::raw_ostream &out,
if (!moduleInterfacePath.empty()) {
writeJSONSingleField(out, "moduleInterfacePath", moduleInterfacePath, 5,
/*trailingComma=*/true);
writeJSONSingleField(out, "contextHash", swiftTextualDeps->context_hash,
5,
/*trailingComma=*/true);
out.indent(5 * 2);
out << "\"compiledModuleCandidates\": [\n";
for (int i = 0,
Expand Down Expand Up @@ -849,6 +846,9 @@ static void writeJSON(llvm::raw_ostream &out,
}
out.indent(5 * 2);
out << "],\n";
writeJSONSingleField(out, "contextHash", swiftTextualDeps->context_hash,
5,
/*trailingComma=*/true);
bool hasBridgingHeaderPath =
swiftTextualDeps->bridging_header_path.data &&
get_C_string(swiftTextualDeps->bridging_header_path)[0] != '\0';
Expand Down Expand Up @@ -1244,9 +1244,7 @@ generateFullDependencyGraph(const CompilerInstance &instance,
bridgedOverlayDependencyNames);

details->swift_textual_details = {
moduleInterfacePath,
create_empty_set(),
bridgingHeaderPath,
moduleInterfacePath, create_empty_set(), bridgingHeaderPath,
create_set(
swiftSourceDeps->textualModuleDetails.bridgingSourceFiles),
create_set(swiftSourceDeps->textualModuleDetails
Expand All @@ -1255,7 +1253,9 @@ generateFullDependencyGraph(const CompilerInstance &instance,
create_set(swiftSourceDeps->textualModuleDetails.buildCommandLine),
create_set(swiftSourceDeps->bridgingHeaderBuildCommandLine),
create_set(swiftSourceDeps->textualModuleDetails.extraPCMArgs),
/*contextHash*/ create_null(),
/*contextHash*/
create_clone(
instance.getInvocation().getModuleScanningHash().c_str()),
/*isFramework*/ false,
/*CASFS*/
create_clone(swiftSourceDeps->textualModuleDetails
Expand Down
2 changes: 1 addition & 1 deletion test/CAS/module_deps.swift
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ import SubE
// CHECK: ],
// CHECK-NEXT: "details": {

// CHECK: "contextHash": "{{.*}}",
// CHECK: "commandLine": [
// CHECK: "-compile-module-from-interface"
// CHECK: "-target"
Expand All @@ -144,6 +143,7 @@ import SubE
// CHECK: "-swift-version"
// CHECK: "5"
// CHECK: ],
// CHECK: "contextHash": "{{.*}}",
// CHECK_NO_CLANG_TARGET: "extraPcmArgs": [
// CHECK_NO_CLANG_TARGET-NEXT: "-Xcc",
// CHECK_NO_CLANG_TARGET-NEXT: "-target",
Expand Down
2 changes: 1 addition & 1 deletion test/CAS/module_deps_include_tree.swift
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ import SubE
// CHECK: ],
// CHECK-NEXT: "details": {

// CHECK: "contextHash": "{{.*}}",
// CHECK: "commandLine": [
// CHECK: "-compile-module-from-interface"
// CHECK: "-target"
Expand All @@ -138,6 +137,7 @@ import SubE
// CHECK: "-swift-version"
// CHECK: "5"
// CHECK: ],
// CHECK: "contextHash": "{{.*}}",
// CHECK_NO_CLANG_TARGET: "extraPcmArgs": [
// CHECK_NO_CLANG_TARGET-NEXT: "-Xcc",
// CHECK_NO_CLANG_TARGET-NEXT: "-target",
Expand Down
2 changes: 1 addition & 1 deletion test/CAS/plugin_cas.swift
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ import SubE
// CHECK: ],
// CHECK-NEXT: "details": {

// CHECK: "contextHash": "{{.*}}",
// CHECK: "commandLine": [
// CHECK: "-compile-module-from-interface"
// CHECK: "-target"
Expand All @@ -124,6 +123,7 @@ import SubE
// CHECK: "-swift-version"
// CHECK: "5"
// CHECK: ],
// CHECK: "contextHash": "{{.*}}",
// CHECK_NO_CLANG_TARGET: "extraPcmArgs": [
// CHECK_NO_CLANG_TARGET-NEXT: "-Xcc",
// CHECK_NO_CLANG_TARGET-NEXT: "-target",
Expand Down
1 change: 0 additions & 1 deletion test/ModuleInterface/clang-session-transitive.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import TestModule
// CHECK-NEXT: "details": {
// CHECK-NEXT: "swift": {
// CHECK-NEXT: "moduleInterfacePath":
// CHECK-NEXT: "contextHash":
// CHECK-NEXT: "compiledModuleCandidates": [
// CHECK-NEXT: TestModule.swiftmodule
// CHECK-NEXT: ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ func foo() {
// CHECK-NEXT: "details": {
// CHECK-NEXT: "swift": {
// CHECK-NEXT: "moduleInterfacePath":
// CHECK-NEXT: "contextHash":
// CHECK-NEXT: "compiledModuleCandidates": [
// CHECK-NEXT: ],
// CHECK-NEXT: "commandLine": [
Expand Down
1 change: 1 addition & 0 deletions test/ScanDependencies/module_deps.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import SubE
// CHECK-DAG: "swift": "_cross_import_E"
// CHECK: ],

// CHECK: "contextHash":
// CHECK: "extraPcmArgs": [
// CHECK-NEXT: "-Xcc",
// CHECK-NEXT: "-target",
Expand Down
3 changes: 2 additions & 1 deletion test/ScanDependencies/module_deps_cache_reuse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import SubE
// CHECK-DAG: "clang": "_SwiftConcurrencyShims"
// CHECK: ],

// CHECK: "contextHash":
// CHECK: "extraPcmArgs": [
// CHECK-NEXT: "-Xcc",
// CHECK-NEXT: "-target",
Expand Down Expand Up @@ -95,7 +96,6 @@ import SubE
// CHECK: ],
// CHECK-NEXT: "details": {

// CHECK: "contextHash": "{{.*}}",
// CHECK: "commandLine": [
// CHECK: "-compile-module-from-interface"
// CHECK: "-target"
Expand All @@ -104,6 +104,7 @@ import SubE
// CHECK: "-swift-version"
// CHECK: "5"
// CHECK: ],
// CHECK: "contextHash": "{{.*}}",
// CHECK" "extraPcmArgs": [
// CHECK" "-target",
// CHECK" "-fapinotes-swift-version=5"
Expand Down