forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
access_control.sil
31 lines (25 loc) · 1.45 KB
/
access_control.sil
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// RUN: %target-swift-frontend -emit-ir %s | FileCheck %s
import Builtin
import Swift
public struct PublicStruct { var x: Int }
// CHECK: @_TWVV14access_control12PublicStruct = constant
// CHECK: @_TMnV14access_control12PublicStruct = constant
// CHECK: @_TMfV14access_control12PublicStruct = internal constant
internal struct InternalStruct { var x: Int }
// CHECK: @_TWVV14access_control14InternalStruct = constant
// CHECK: @_TMnV14access_control14InternalStruct = constant
// CHECK: @_TMfV14access_control14InternalStruct = internal constant
private struct PrivateStruct { var x: Int }
// CHECK: @_TWVV14access_controlP33_8F630B0A1EEF3ED34B761E3ED76C95A813PrivateStruct = hidden constant
// CHECK: @_TMnV14access_controlP33_8F630B0A1EEF3ED34B761E3ED76C95A813PrivateStruct = hidden constant
// CHECK: @_TMfV14access_controlP33_8F630B0A1EEF3ED34B761E3ED76C95A813PrivateStruct = internal constant
func local() {
struct LocalStruct { var x: Int }
// CHECK: @_TWVVF14access_control5localFT_T_L_11LocalStruct = hidden constant
// CHECK: @_TMnVF14access_control5localFT_T_L_11LocalStruct = hidden constant
// CHECK: @_TMfVF14access_control5localFT_T_L_11LocalStruct = internal constant
}
// CHECK: @_TMV14access_control12PublicStruct = alias
// CHECK: @_TMV14access_control14InternalStruct = alias
// CHECK: @_TMV14access_controlP33_8F630B0A1EEF3ED34B761E3ED76C95A813PrivateStruct = hidden alias
// CHECK: @_TMVF14access_control5localFT_T_L_11LocalStruct = hidden alias