swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.37k stars 10.34k forks source link

[SR-3114] Overridden "initialize" method of NSObject-Subclass is not called in Release Mode with "Whole Module Optimization" #45702

Open swift-ci opened 7 years ago

swift-ci commented 7 years ago
Previous ID SR-3114
Radar rdar://problem/28954946
Original Reporter Gereon (JIRA User)
Type Bug

Attachment: Download

Environment Xcode 8.1 GM
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug, OptimizedOnly | |Assignee | None | |Priority | Medium | md5: 65dccff72c161b2e0a1279d16443afc9

Issue Description:

A subclass of NSObject overrides the static "initialize" method. This method isn't called when compiling in Release mode with "whole module optimization" turned on. Compiling in Debug mode, or switching to "Fast, Single-file optimization" enables the call.

belkadan commented 7 years ago

cc @eeckstein

swift-ci commented 7 years ago

Comment by Gereon Steffens (JIRA)

This bug is still present in Xcode 8.2