summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-04-19 20:32:39 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-04-19 20:32:39 +0000
commit4a7783b0c239d4c78e674416670bf4f43d4dbc7c (patch)
treed2595c327e93254ea93786f1faed635c639a2c96 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent0b654f4299e4460ee15511e0a1d8bcfeb4f67c63 (diff)
downloadbcm5719-llvm-4a7783b0c239d4c78e674416670bf4f43d4dbc7c.tar.gz
bcm5719-llvm-4a7783b0c239d4c78e674416670bf4f43d4dbc7c.zip
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. llvm-svn: 129802
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index 3e45cd8cbb0..82c186e1c3f 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud