diff options
author | Bill Wendling <isanbard@gmail.com> | 2010-09-28 23:11:55 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2010-09-28 23:11:55 +0000 |
commit | 2ff6e1e62cf73c83379e660baa570c786ba92f12 (patch) | |
tree | 9a4030b7f1d68da921db8b6e892b1195511f764e /lib/CodeGen | |
parent | 744c7c8e1b9bf166ded2b4e0b57638a004a44f8d (diff) | |
download | external_llvm-2ff6e1e62cf73c83379e660baa570c786ba92f12.zip external_llvm-2ff6e1e62cf73c83379e660baa570c786ba92f12.tar.gz external_llvm-2ff6e1e62cf73c83379e660baa570c786ba92f12.tar.bz2 |
Revert r114997. It was causing a failure on darwin10-selfhost.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115002 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 0f36d42..4afdc3d 100644 --- a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/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 |