Remove a flag that would set the ".eh" symbol as .globl. MachO was the only one
authorBill Wendling <isanbard@gmail.com>
Thu, 5 May 2011 06:49:15 +0000 (06:49 +0000)
committerBill Wendling <isanbard@gmail.com>
Thu, 5 May 2011 06:49:15 +0000 (06:49 +0000)
who used this flag, and it now emits CFI and doesn't emit this anymore. All
other targets left this flag "false".
<rdar://problem/8486371>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130918 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetLoweringObjectFile.h
lib/CodeGen/AsmPrinter/DwarfTableException.cpp
lib/CodeGen/TargetLoweringObjectFileImpl.cpp
lib/Target/TargetLoweringObjectFile.cpp

index 7402ed697232f542689e73ffa8c4a433f6e67b86..ec814ff04482eb25c975f86e7a4e890593686559 100644 (file)
@@ -97,10 +97,6 @@ protected:
   /// weak_definition of constant 0 for an omitted EH frame.
   bool SupportsWeakOmittedEHFrame;
   
-  /// IsFunctionEHSymbolGlobal - This flag is set to true if the ".eh" symbol
-  /// for a function should be marked .globl.
-  bool IsFunctionEHSymbolGlobal;
-  
   /// IsFunctionEHFrameSymbolPrivate - This flag is set to true if the
   /// "EH_frame" symbol for EH information should be an assembler temporary (aka
   /// private linkage, aka an L or .L label) or false if it should be a normal
@@ -119,9 +115,6 @@ public:
     Ctx = &ctx;
   }
   
-  bool isFunctionEHSymbolGlobal() const {
-    return IsFunctionEHSymbolGlobal;
-  }
   bool isFunctionEHFrameSymbolPrivate() const {
     return IsFunctionEHFrameSymbolPrivate;
   }
index b50d8bd3cecc57a1b98cc8170b47d40f56b3e5aa..8f5ab3abf7f99e047990954b36d285ceea8ac186 100644 (file)
@@ -172,11 +172,6 @@ void DwarfTableException::EmitFDE(const FunctionEHFrameInfo &EHFrameInfo) {
 
   Asm->OutStreamer.SwitchSection(TLOF.getEHFrameSection());
 
-  // Externally visible entry into the functions eh frame info. If the
-  // corresponding function is static, this should not be externally visible.
-  if (!TheFunc->hasLocalLinkage() && TLOF.isFunctionEHSymbolGlobal())
-    Asm->OutStreamer.EmitSymbolAttribute(EHFrameInfo.FunctionEHSym,MCSA_Global);
-
   // If corresponding function is weak definition, this should be too.
   if (TheFunc->isWeakForLinker() && Asm->MAI->getWeakDefDirective())
     Asm->OutStreamer.EmitSymbolAttribute(EHFrameInfo.FunctionEHSym,
index 6ed91b09966ea86f60806adec5c5b1f8cff05930..c1e1b76c56381db2594be46ef89122b6e56af45d 100644 (file)
@@ -484,11 +484,6 @@ 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;
 
index 717ad4122013d75461a0bce437c1ad56a63b403a..3343384791fbfba7b5c39507f3d8a53811d411f5 100644 (file)
@@ -58,7 +58,6 @@ TargetLoweringObjectFile::TargetLoweringObjectFile() : Ctx(0) {
   DwarfRangesSection = 0;
   DwarfMacroInfoSection = 0;
   
-  IsFunctionEHSymbolGlobal = false;
   IsFunctionEHFrameSymbolPrivate = true;
   SupportsWeakOmittedEHFrame = true;
 }