mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This allows making global addressors fragile (They use globalinit_{token,func} for initialization of globals).
It has no noticable performance impact on our benchmarks, but it removes an ugly hack which explicitly
prevented addressors from being fragile.
Swift SVN r22812
12 lines
151 B
Swift
12 lines
151 B
Swift
|
|
private var gg = nonTrivialInit()
|
|
|
|
public func get_gg_a() -> Int {
|
|
return gg
|
|
}
|
|
|
|
@inline(never)
|
|
private func nonTrivialInit() -> Int {
|
|
return 27
|
|
}
|