diff options
author | Bill Wendling <isanbard@gmail.com> | 2010-09-28 22:36:56 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2010-09-28 22:36:56 +0000 |
commit | d848beb1e5d2c9a56aa9018a5a448618a201b72b (patch) | |
tree | 68c00e91936168f4454d6aa8e3a4d71e44dc7a0d /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | 25a7bc90814527f9351dfcc4cec96f2a57f7c8ec (diff) | |
download | bcm5719-llvm-d848beb1e5d2c9a56aa9018a5a448618a201b72b.tar.gz bcm5719-llvm-d848beb1e5d2c9a56aa9018a5a448618a201b72b.zip |
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.
llvm-svn: 114997
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 4afdc3ddef5..0f36d4296f6 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/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 |