From 4edab1a9e8fd28a60b2d09cc38333652155c0a20 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 28 Sep 2010 22:36:56 +0000 Subject: Fix a FIXME. _foo.eh symbols are currently always exported so that the linker knows about them. This is not necessary on 10.6 and later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114997 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'lib/CodeGen/TargetLoweringObjectFileImpl.cpp') diff --git a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 4afdc3ddef..0f36d4296f 100644 --- a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -444,27 +444,19 @@ 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) { - switch (T.getDarwinMajorNumber()) { - case 7: // 10.3 Panther. - case 8: // 10.4 Tiger. + unsigned MajNum = T.getDarwinMajorNumber(); + if (MajNum == 7 || MajNum == 8) // 10.3 Panther, 10.4 Tiger CommDirectiveSupportsAlignment = false; - break; - case 9: // 10.5 Leopard. - case 10: // 10.6 SnowLeopard. - break; - } + if (MajNum > 9) // 10.6 SnowLeopard + IsFunctionEHSymbolGlobal = false; } - + TargetLoweringObjectFile::Initialize(Ctx, TM); TextSection // .text -- cgit v1.2.3-18-g5258