llvm.org GIT mirror llvm / ebc5066
CodeGen: Eliminate a use of getDarwinMajorNumber(). - There is a minor semantic change here (evidenced by the test change) for Darwin triples that have no version component. I debated changing the default behavior of isOSVersionLT, but decided it made more sense for triples to be explicit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129802 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 9 years ago
2 changed file(s) with 4 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
478478 IsFunctionEHFrameSymbolPrivate = false;
479479 SupportsWeakOmittedEHFrame = false;
480480
481 // .comm doesn't support alignment before Leopard.
481482 Triple T(((LLVMTargetMachine&)TM).getTargetTriple());
482 if (T.getOS() == Triple::Darwin) {
483 switch (T.getDarwinMajorNumber()) {
484 case 7: // 10.3 Panther.
485 case 8: // 10.4 Tiger.
486 CommDirectiveSupportsAlignment = false;
487 break;
488 case 9: // 10.5 Leopard.
489 case 10: // 10.6 SnowLeopard.
490 break;
491 }
492 }
483 if (T.isOSX() && T.isOSXVersionLT(10, 5))
484 CommDirectiveSupportsAlignment = false;
493485
494486 TargetLoweringObjectFile::Initialize(Ctx, TM);
495487
0 ; RUN: llc < %s -mtriple=arm-linux-gnueabi | FileCheck %s -check-prefix=ELF
1 ; RUN: llc < %s -mtriple=arm-apple-darwin | FileCheck %s -check-prefix=DARWIN
1 ; RUN: llc < %s -mtriple=arm-apple-darwin10 | FileCheck %s -check-prefix=DARWIN
22
33 @a = global i1 true
44 ; no alignment