mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This prevents the linker from trying to emit relative relocations to locally-defined public symbols into dynamic libraries, which gives ld.so heartache.
41 lines
1.4 KiB
Plaintext
41 lines
1.4 KiB
Plaintext
// RUN: %target-swift-frontend %s -module-name main -emit-ir -o - | FileCheck -check-prefix=%target-ptrsize %s
|
|
|
|
import Builtin
|
|
import Swift
|
|
|
|
// 64: %V4main14Rdar15410780_A = type <{ i2048, %Vs4Int8 }>
|
|
// 64: %V4main14Rdar15410780_B = type <{ %Sq[[B:(\.[0-9]+)?]] }>
|
|
// 64: %Sq[[B]] = type <{ [257 x i8], [1 x i8] }>
|
|
// 64: %V4main14Rdar15410780_C = type <{ %Sq[[C:(\.[0-9]+)?]] }>
|
|
// 64: %Sq[[C]] = type <{ [24 x i8], [1 x i8] }>
|
|
|
|
// 64: @_TWVV4main14Rdar15410780_A = {{(protected )?}}constant {{.*}} (i64 257
|
|
// 64: @_TWVV4main14Rdar15410780_B = {{(protected )?}}constant {{.*}} (i64 258
|
|
// 64: @_TWVV4main14Rdar15410780_C = {{(protected )?}}constant {{.*}} (i64 25
|
|
|
|
|
|
// 32: %V4main14Rdar15410780_A = type <{ i2048, %Vs4Int8 }>
|
|
// 32: %V4main14Rdar15410780_B = type <{ %Sq[[B:(\.[0-9]+)?]] }>
|
|
// 32: %Sq[[B]] = type <{ [257 x i8], [1 x i8] }>
|
|
// 32: %V4main14Rdar15410780_C = type <{ %Sq[[C:(\.[0-9]+)?]] }>
|
|
// 32: %Sq[[C]] = type <{ [12 x i8], [1 x i8] }>
|
|
|
|
// 32: @_TWVV4main14Rdar15410780_A = {{(protected )?}}constant {{.*}} (i32 257
|
|
// 32: @_TWVV4main14Rdar15410780_B = {{(protected )?}}constant {{.*}} (i32 258
|
|
// 32: @_TWVV4main14Rdar15410780_C = {{(protected )?}}constant {{.*}} (i32 13
|
|
|
|
|
|
// <rdar://problem/15410780>
|
|
struct Rdar15410780_A {
|
|
var a: Builtin.Int2048
|
|
var b: Int8
|
|
}
|
|
|
|
struct Rdar15410780_B {
|
|
var c: Rdar15410780_A?
|
|
}
|
|
|
|
struct Rdar15410780_C {
|
|
var d: String?
|
|
}
|