summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-09-27 06:44:54 +0000
committerChris Lattner <sabre@nondot.org>2010-09-27 06:44:54 +0000
commit9f06f911d197577b80d208a167980833b4fb9ad5 (patch)
tree6e92a19eb1ef843d25b82d377dd2ee9ff5283801 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent4362a1c9871e87c283a9c2d475ff3ca6ec32febe (diff)
downloadbcm5719-llvm-9f06f911d197577b80d208a167980833b4fb9ad5.tar.gz
bcm5719-llvm-9f06f911d197577b80d208a167980833b4fb9ad5.zip
the latest assembler that runs on powerpc 10.4 machines doesn't
support aligned comm. Detect when compiling for 10.4 and don't emit an alignment for comm. THis will hopefully fix PR8198. llvm-svn: 114817
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index f1e10eec724..4afdc3ddef5 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -33,6 +33,7 @@
#include "llvm/Support/raw_ostream.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
+#include "llvm/ADT/Triple.h"
using namespace llvm;
using namespace dwarf;
@@ -450,6 +451,19 @@ void TargetLoweringObjectFileMachO::Initialize(MCContext &Ctx,
IsFunctionEHSymbolGlobal = true;
IsFunctionEHFrameSymbolPrivate = false;
SupportsWeakOmittedEHFrame = false;
+
+ 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;
+ }
+ }
TargetLoweringObjectFile::Initialize(Ctx, TM);
OpenPOWER on IntegriCloud