mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Compute the hash of all interface tokens when parsing; write the interface hash to the swiftdeps file, or if the -dump-interface-hash option is passed to the frontend. This hash will be used in incremental mode to determine whether a file's interface has changed, and therefore whether dependent files need to be rebuilt in response to the change. Committed on ChrisW's behalf while he gets his setup unborked. rdar://problem/15352929 Swift SVN r30477
20 lines
386 B
Swift
20 lines
386 B
Swift
// RUN: mkdir -p %t
|
|
// RUN: %S/../../utils/split_file.py -o %t %s
|
|
// RUN: %target-swift-frontend -dump-interface-hash %t/a.swift 2> %t/a.hash
|
|
// RUN: %target-swift-frontend -dump-interface-hash %t/b.swift 2> %t/b.hash
|
|
// RUN: cmp %t/a.hash %t/b.hash
|
|
|
|
// BEGIN a.swift
|
|
class C {
|
|
func f2() -> Int {
|
|
return 0
|
|
}
|
|
}
|
|
|
|
// BEGIN b.swift
|
|
class C {
|
|
func f2() -> Int {
|
|
return 1
|
|
}
|
|
}
|