File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -187,7 +187,11 @@ extern "C" char **_environ;
187
187
#endif
188
188
#endif
189
189
190
- #ifdef ENVIRON
190
+ #if !SWIFT_STDLIB_HAS_ENVIRON
191
+ void swift::runtime::environment::initialize (void *context) {
192
+ (void )context;
193
+ }
194
+ #elif defined(ENVIRON)
191
195
void swift::runtime::environment::initialize (void *context) {
192
196
// On platforms where we have an environment variable array available, scan it
193
197
// directly. This optimizes for the common case where no variables are set,
@@ -241,7 +245,7 @@ void swift::runtime::environment::initialize(void *context) {
241
245
if (SWIFT_DEBUG_HELP_variable)
242
246
printHelp (nullptr );
243
247
}
244
- #elif SWIFT_STDLIB_HAS_ENVIRON
248
+ #else
245
249
void swift::runtime::environment::initialize (void *context) {
246
250
// Emit a getenv call for each variable. This is less efficient but works
247
251
// everywhere.
@@ -259,10 +263,6 @@ void swift::runtime::environment::initialize(void *context) {
259
263
printHelp (" Using getenv to read variables. Unknown SWIFT_DEBUG_ variables "
260
264
" will not be flagged." );
261
265
}
262
- #else
263
- void swift::runtime::environment::initialize (void *context) {
264
- (void )context;
265
- }
266
266
#endif
267
267
268
268
SWIFT_RUNTIME_EXPORT
You can’t perform that action at this time.
0 commit comments