aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r--lib/CodeGen/TargetLoweringObjectFileImpl.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index 3b01bfdd69..e4d9ee02e7 100644
--- a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -441,11 +441,15 @@ void TargetLoweringObjectFileMachO::Initialize(MCContext &Ctx,
Triple T(((LLVMTargetMachine&)TM).getTargetTriple());
if (T.getOS() == Triple::Darwin) {
- unsigned MajNum = T.getDarwinMajorNumber();
- if (MajNum == 7 || MajNum == 8) // 10.3 Panther, 10.4 Tiger
+ switch (T.getDarwinMajorNumber()) {
+ case 7: // 10.3 Panther.
+ case 8: // 10.4 Tiger.
CommDirectiveSupportsAlignment = false;
- if (MajNum > 9) // 10.6 SnowLeopard
- IsFunctionEHSymbolGlobal = false;
+ break;
+ case 9: // 10.5 Leopard.
+ case 10: // 10.6 SnowLeopard.
+ break;
+ }
}
TargetLoweringObjectFile::Initialize(Ctx, TM);