mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Applied the upgrade script from r236120 (LLVM) and r236121 (CFE). This is the final step of rdar://problem/20434113. Swift SVN r27925
19 lines
401 B
Swift
19 lines
401 B
Swift
// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | FileCheck %s
|
|
|
|
// Verify that we generate appropriate names for accessors.
|
|
// CHECK: !DISubprogram(name: "x.get"
|
|
// CHECK: !DISubprogram(name: "x.set"
|
|
|
|
// Variable getter/setter
|
|
var _x : Int = 0
|
|
var x_modify_count : Int = 0
|
|
var x: Int {
|
|
get {
|
|
return _x
|
|
}
|
|
set {
|
|
x_modify_count = x_modify_count + 1
|
|
_x = newValue
|
|
}
|
|
}
|