Files
swift-mirror/test/IRGen/tail_allocated_c_array.swift
Arnold Schwaighofer 7a54927b03 IRGen: Fix MemoryLayout::offset(of:) for tail allocated C arrays
There is no storage but an offset.

rdar://51194713
2019-10-15 14:04:31 -07:00

7 lines
343 B
Swift

// RUN: %target-swift-frontend -import-objc-header %S/Inputs/tail_allocated_c_array.h -primary-file %s -emit-ir -o - | %FileCheck %s
// 25165828 = 0x1800004 The bottom bits designate the offset = 4
// CHECK: @keypath = private global <{{.*}}i32 0, i32 -2147483644, i32 25165828 }>
_ = MemoryLayout<foo>.offset(of: \foo.tailallocatedarray)!