diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-04-19 20:32:39 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-04-19 20:32:39 +0000 |
commit | ebc5066b9bcf1a3ead167613bb496b24f8c67f8b (patch) | |
tree | a6247e1e5e6c21eabe7da3b20b8df48b0e99ad57 /lib | |
parent | 4860fe0ad0447f8545bdbc1b327e82cb1ba41a51 (diff) | |
download | external_llvm-ebc5066b9bcf1a3ead167613bb496b24f8c67f8b.zip external_llvm-ebc5066b9bcf1a3ead167613bb496b24f8c67f8b.tar.gz external_llvm-ebc5066b9bcf1a3ead167613bb496b24f8c67f8b.tar.bz2 |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 3e45cd8..82c186e 100644 --- a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -479,18 +479,10 @@ void TargetLoweringObjectFileMachO::Initialize(MCContext &Ctx, IsFunctionEHFrameSymbolPrivate = false; SupportsWeakOmittedEHFrame = false; + // .comm doesn't support alignment before Leopard. Triple T(((LLVMTargetMachine&)TM).getTargetTriple()); - if (T.getOS() == Triple::Darwin) { - switch (T.getDarwinMajorNumber()) { - case 7: // 10.3 Panther. - case 8: // 10.4 Tiger. - CommDirectiveSupportsAlignment = false; - break; - case 9: // 10.5 Leopard. - case 10: // 10.6 SnowLeopard. - break; - } - } + if (T.isOSX() && T.isOSXVersionLT(10, 5)) + CommDirectiveSupportsAlignment = false; TargetLoweringObjectFile::Initialize(Ctx, TM); |