[PATCH] AsmPrinter: Get rid of llvm$workaround$fake$stub$

David Majnemer david.majnemer at gmail.com
Sun Aug 25 01:36:07 PDT 2013


Hi asl, pcc, rnk,

We currently emit symbols with the prefix llvm$workaround$fake$stub$ if
the target's MCAsmInfo has getLinkOnceDirective() mapped to something
interesting.  The original code dates back to r31033, a time before LLVM
lacked the smarts to do this sort of thing properly.  The intended use
for this seems to be targets that utilize COFF but they are equiped with
the smarts to put things in COMDAT today.

http://llvm-reviews.chandlerc.com/D1509

Files:
  lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Index: lib/CodeGen/AsmPrinter/AsmPrinter.cpp
===================================================================
--- lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -459,16 +459,6 @@
     OutStreamer.EmitLabel(DeadBlockSyms[i]);
   }
 
-  // Add some workaround for linkonce linkage on Cygwin\MinGW.
-  if (MAI->getLinkOnceDirective() != 0 &&
-      (F->hasLinkOnceLinkage() || F->hasWeakLinkage())) {
-    // FIXME: What is this?
-    MCSymbol *FakeStub =
-      OutContext.GetOrCreateSymbol(Twine("Lllvm$workaround$fake$stub$")+
-                                   CurrentFnSym->getName());
-    OutStreamer.EmitLabel(FakeStub);
-  }
-
   // Emit pre-function debug and/or EH information.
   if (DE) {
     NamedRegionTimer T(EHTimerName, DWARFGroupName, TimePassesIsEnabled);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1509.1.patch
Type: text/x-patch
Size: 814 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130825/c15c2aeb/attachment.bin>


More information about the llvm-commits mailing list