mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
update swift-ide-test.cpp and sourceinfo.swift
Fix sourceinfo.swift
This commit is contained in:
@@ -6,5 +6,5 @@ import MyModule
|
||||
// RUN: %target-swiftc_driver -emit-module -module-name MyModule -o %t/Modules/MyModule.swiftmodule %S/Inputs/SourceInfo/File1.swift %S/Inputs/SourceInfo/File2.swift
|
||||
// RUN: %target-swift-ide-test -print-module-metadata -module-to-print MyModule -enable-swiftsourceinfo -I %t/Modules -source-filename %s | %FileCheck %s
|
||||
|
||||
// CHECK: filepath=SOURCE_DIR{{[/\\]}}test{{[/\\]}}Serialization{{[/\\]}}Inputs{{[/\\]}}SourceInfo{{[/\\]}}File1.swift; hash=9da710e9b2de1fff2915639236b8929c; mtime={{[0-9]{4}-[0-9]{2}-[0-9]{2} .*}}; size=35
|
||||
// CHECK: filepath=SOURCE_DIR{{[/\\]}}test{{[/\\]}}Serialization{{[/\\]}}Inputs{{[/\\]}}SourceInfo{{[/\\]}}File2.swift; hash=22b75a7717318d48f7a979906f35195e; mtime={{[0-9]{4}-[0-9]{2}-[0-9]{2} .*}}; size=57
|
||||
// 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
|
||||
// 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
|
||||
|
||||
@@ -2519,6 +2519,8 @@ static void printModuleMetadata(ModuleDecl *MD) {
|
||||
MD->collectBasicSourceFileInfo([&](const BasicSourceFileInfo &info) {
|
||||
OS << "filepath=" << info.getFilePath() << "; ";
|
||||
OS << "hash=" << info.getInterfaceHashIncludingTypeMembers().getRawValue() << "; ";
|
||||
OS << "hashExcludingTypeMembers="
|
||||
<< info.getInterfaceHashExcludingTypeMembers().getRawValue() << "; ";
|
||||
OS << "mtime=" << info.getLastModified() << "; ";
|
||||
OS << "size=" << info.getFileSize();
|
||||
OS << "\n";
|
||||
|
||||
Reference in New Issue
Block a user