Files
swift-mirror/test/IRGen/generic_ternary.swift
Arnold Schwaighofer 5a6de1ba77 IRGen: Use opaque storage types for non-fixed indirect result types
LLVM does type based analysis on sret storage types. This is a problem
with non-fixed types whose storage type does not contain the non-fixed
part.

rdar://73778591
2021-02-10 16:19:12 -08:00

14 lines
579 B
Swift

// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s
// REQUIRES: CPU=i386 || CPU=x86_64
// <rdar://problem/13793646>
struct OptionalStreamAdaptor<T : IteratorProtocol> {
// CHECK: define hidden swiftcc void @"$s15generic_ternary21OptionalStreamAdaptorV4next{{[_0-9a-zA-Z]*}}F"(%swift.opaque* noalias nocapture sret({{.*}}) %0, %swift.type* %"OptionalStreamAdaptor<T>", %T15generic_ternary21OptionalStreamAdaptorV* nocapture swiftself dereferenceable({{.*}}) %1)
mutating
func next() -> Optional<T.Element> {
return x[0].next()
}
var x: [T]
}