Files
swift-mirror/test/SILOptimizer/swap_refcnt.swift
Bob Wilson 8c17fc5af4 Fix XFAIL/REQUIRES test lines to parse after llvm r293535.
These two tests were UNRESOLVED for master-next because the newer version
of LLVM does not like slashes and colons in the arguments.
2017-01-30 20:23:25 -08:00

16 lines
427 B
Swift

// RUN: %target-swift-frontend -O -emit-sil %s | %FileCheck %s
// SILOptimizer/swap_refcnt.swift fails on linux.
// REQUIRES: rdar30181104
// Make sure we can swap two values in an array without retaining anything.
// CHECK-LABEL: sil @_TF11swap_refcnt11swapByIndex
// CHECK-NOT: strong_retain
// CHECK-NOT: strong_release
// CHECK: return
public func swapByIndex(A: inout [Int8], x : Int, y : Int) {
swap(&A[x],&A[y])
}