summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2010-09-28 23:11:55 +0000
committerBill Wendling <isanbard@gmail.com>2010-09-28 23:11:55 +0000
commitb0b2c57149d61e9b5f2c542547c0dd8d65480ba5 (patch)
treeda60f1830133b7390a75ef749b9883e4ada45658 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parenta86a6d2fed960317191b245b0b2209f1adbee03e (diff)
downloadbcm5719-llvm-b0b2c57149d61e9b5f2c542547c0dd8d65480ba5.tar.gz
bcm5719-llvm-b0b2c57149d61e9b5f2c542547c0dd8d65480ba5.zip
Revert r114997. It was causing a failure on darwin10-selfhost.
llvm-svn: 115002
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index 0f36d4296f6..4afdc3ddef5 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -444,19 +444,27 @@ getExprForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
void TargetLoweringObjectFileMachO::Initialize(MCContext &Ctx,
const TargetMachine &TM) {
+ // _foo.eh symbols are currently always exported so that the linker knows
+ // about them. This is not necessary on 10.6 and later, but it
+ // doesn't hurt anything.
+ // FIXME: I need to get this from Triple.
IsFunctionEHSymbolGlobal = true;
IsFunctionEHFrameSymbolPrivate = false;
SupportsWeakOmittedEHFrame = false;
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);
TextSection // .text
OpenPOWER on IntegriCloud