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
13 lines
152 B
Swift
13 lines
152 B
Swift
|
|
|
|
private var gg = nonTrivialInit()
|
|
|
|
public func get_gg_b() -> Int {
|
|
return gg
|
|
}
|
|
|
|
@inline(never)
|
|
private func nonTrivialInit() -> Int {
|
|
return 28
|
|
}
|