@@ -209,6 +209,7 @@ std::pair<bool, bool> LangOptions::setTarget(llvm::Triple triple) {
209
209
210
210
// Set the "os" platform condition.
211
211
switch (Target.getOS ()) {
212
+ case llvm::Triple::Darwin:
212
213
case llvm::Triple::MacOSX:
213
214
addPlatformConditionValue (PlatformConditionKind::OS, " OSX" );
214
215
break ;
@@ -285,30 +286,19 @@ std::pair<bool, bool> LangOptions::setTarget(llvm::Triple triple) {
285
286
286
287
// Set the "_endian" platform condition.
287
288
switch (Target.getArch ()) {
289
+ default : llvm_unreachable (" undefined architecture endianness" );
288
290
case llvm::Triple::ArchType::arm:
289
291
case llvm::Triple::ArchType::thumb:
290
- addPlatformConditionValue (PlatformConditionKind::Endianness, " little" );
291
- break ;
292
292
case llvm::Triple::ArchType::aarch64:
293
- addPlatformConditionValue (PlatformConditionKind::Endianness, " little" );
294
- break ;
295
- case llvm::Triple::ArchType::ppc64:
296
- addPlatformConditionValue (PlatformConditionKind::Endianness, " big" );
297
- break ;
298
293
case llvm::Triple::ArchType::ppc64le:
299
- addPlatformConditionValue (PlatformConditionKind::Endianness, " little" );
300
- break ;
301
294
case llvm::Triple::ArchType::x86:
302
- addPlatformConditionValue (PlatformConditionKind::Endianness, " little" );
303
- break ;
304
295
case llvm::Triple::ArchType::x86_64:
305
296
addPlatformConditionValue (PlatformConditionKind::Endianness, " little" );
306
297
break ;
298
+ case llvm::Triple::ArchType::ppc64:
307
299
case llvm::Triple::ArchType::systemz:
308
300
addPlatformConditionValue (PlatformConditionKind::Endianness, " big" );
309
301
break ;
310
- default :
311
- llvm_unreachable (" undefined architecture endianness" );
312
302
}
313
303
314
304
// Set the "runtime" platform condition.
0 commit comments