[llvm-commits] [llvm] r115002 - in /llvm/trunk: lib/CodeGen/TargetLoweringObjectFileImpl.cpp test/CodeGen/X86/non-globl-eh-frame.ll

Bill Wendling isanbard at gmail.com
Tue Sep 28 16:11:55 PDT 2010


Author: void
Date: Tue Sep 28 18:11:55 2010
New Revision: 115002

URL: http://llvm.org/viewvc/llvm-project?rev=115002&view=rev
Log:
Revert r114997. It was causing a failure on darwin10-selfhost.

Modified:
    llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
    llvm/trunk/test/CodeGen/X86/non-globl-eh-frame.ll

Modified: llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp?rev=115002&r1=115001&r2=115002&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp (original)
+++ llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Tue Sep 28 18:11:55 2010
@@ -444,19 +444,27 @@
 
 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

Modified: llvm/trunk/test/CodeGen/X86/non-globl-eh-frame.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/non-globl-eh-frame.ll?rev=115002&r1=115001&r2=115002&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/non-globl-eh-frame.ll (original)
+++ llvm/trunk/test/CodeGen/X86/non-globl-eh-frame.ll Tue Sep 28 18:11:55 2010
@@ -1,5 +1,7 @@
 ; RUN: llc < %s -mtriple x86_64-apple-darwin10 -march x86 | not grep {{.globl\[\[:space:\]\]*__Z4funcv.eh}}
 ; RUN: llc < %s -mtriple x86_64-apple-darwin9  -march x86 | FileCheck %s -check-prefix=DARWIN9
+; XFAIL: *
+; Fail this until I can fix the global EH failure.
 
 %struct.__pointer_type_info_pseudo = type { %struct.__type_info_pseudo, i32, %"struct.std::type_info"* }
 %struct.__type_info_pseudo = type { i8*, i8* }





More information about the llvm-commits mailing list