Skip to content

Commit a4d32f9

Browse files
author
David Ungar
committed
update swift-ide-test.cpp and sourceinfo.swift
Fix sourceinfo.swift
1 parent 90ee114 commit a4d32f9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

test/Serialization/sourceinfo.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ import MyModule
66
// RUN: %target-swiftc_driver -emit-module -module-name MyModule -o %t/Modules/MyModule.swiftmodule %S/Inputs/SourceInfo/File1.swift %S/Inputs/SourceInfo/File2.swift
77
// RUN: %target-swift-ide-test -print-module-metadata -module-to-print MyModule -enable-swiftsourceinfo -I %t/Modules -source-filename %s | %FileCheck %s
88

9-
// CHECK: filepath=SOURCE_DIR{{[/\\]}}test{{[/\\]}}Serialization{{[/\\]}}Inputs{{[/\\]}}SourceInfo{{[/\\]}}File1.swift; hash=9da710e9b2de1fff2915639236b8929c; mtime={{[0-9]{4}-[0-9]{2}-[0-9]{2} .*}}; size=35
10-
// CHECK: filepath=SOURCE_DIR{{[/\\]}}test{{[/\\]}}Serialization{{[/\\]}}Inputs{{[/\\]}}SourceInfo{{[/\\]}}File2.swift; hash=22b75a7717318d48f7a979906f35195e; mtime={{[0-9]{4}-[0-9]{2}-[0-9]{2} .*}}; size=57
9+
// CHECK: filepath=SOURCE_DIR{{[/\\]}}test{{[/\\]}}Serialization{{[/\\]}}Inputs{{[/\\]}}SourceInfo{{[/\\]}}File1.swift; hash=9da710e9b2de1fff2915639236b8929c; hashExcludingTypeMembers=bef81a9bfc04156da679d8d579125d39; mtime={{[0-9]{4}-[0-9]{2}-[0-9]{2} .*}}; size=35
10+
// CHECK: filepath=SOURCE_DIR{{[/\\]}}test{{[/\\]}}Serialization{{[/\\]}}Inputs{{[/\\]}}SourceInfo{{[/\\]}}File2.swift; hash=22b75a7717318d48f7a979906f35195e; hashExcludingTypeMembers=7a22dbe5fc611122201f7d6b53094531; mtime={{[0-9]{4}-[0-9]{2}-[0-9]{2} .*}}; size=57

tools/swift-ide-test/swift-ide-test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2519,6 +2519,8 @@ static void printModuleMetadata(ModuleDecl *MD) {
25192519
MD->collectBasicSourceFileInfo([&](const BasicSourceFileInfo &info) {
25202520
OS << "filepath=" << info.getFilePath() << "; ";
25212521
OS << "hash=" << info.getInterfaceHashIncludingTypeMembers().getRawValue() << "; ";
2522+
OS << "hashExcludingTypeMembers="
2523+
<< info.getInterfaceHashExcludingTypeMembers().getRawValue() << "; ";
25222524
OS << "mtime=" << info.getLastModified() << "; ";
25232525
OS << "size=" << info.getFileSize();
25242526
OS << "\n";

0 commit comments

Comments
 (0)