Really we want those nullary functions be computed properties using enums.
var _assertConfiguration : _AssertConfiguration {
let assertConfig = Int32(Builtin.assert_configuration())
if assertConfig == 0 {
return .Debug
}
if assertConfig == 1 {
return .Release
}
return .Fast
}
if _assertConfiguration == .Debug {
_fatal_error_message("assertion failed", message, file, line)
}
In my tests the enums were not optimized away. So for the short term leave
these functions as nullary functions.
Swift SVN r18211