// RUN: %target-build-swift %s -g -emit-ir -o - | FileCheck %s
class X {
  init (i : Int) { x = i }
  var x : Int
}

// CHECK: define {{.*}}ifelseexpr
func ifelseexpr() -> Int {
  var x = X(i:0); 
  if true {
    // CHECK:  @swift_release
    x.x++; 
  } else {
    x.x--;
  }
  // CHECK:  @swift_release {{.*}}1X{{.*}}, !dbg ![[CLEANUP:.*]]
  // CHECK:  ret{{.*}}, !dbg ![[RET:.*]]
  // CHECK: ![[CLEANUP]] = metadata !{i32 [[@LINE+1]],
  return x.x; // CHECK: ![[RET]] = metadata !{i32 [[@LINE]],
}

Add a testcase for <rdar://problem/18444716> Return locations may have smaller line numbers than cleanup locations
Add a testcase for <rdar://problem/18444716>
Return locations may have smaller line numbers than cleanup locations

Swift SVN r22741
