[llvm-commits] [llvm] r80677 - in /llvm/trunk/lib/CodeGen/AsmPrinter: DwarfException.cpp DwarfPrinter.cpp DwarfPrinter.h

Jim Grosbach grosbach at apple.com
Tue Sep 1 09:43:36 PDT 2009


Author: grosbach
Date: Tue Sep  1 11:43:35 2009
New Revision: 80677

URL: http://llvm.org/viewvc/llvm-project?rev=80677&view=rev
Log:
Simply LSDA lable emission to use a direct special-case output instead of
EmitLabel()

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.h

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp?rev=80677&r1=80676&r2=80677&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp Tue Sep  1 11:43:35 2009
@@ -459,9 +459,8 @@
           FirstActions[P.PadIndex]
         };
 
-        // Try to merge with the previous call-site. SJLJ doesn't do this
-        if (PreviousIsInvoke &&
-          MAI->getExceptionHandlingType() == ExceptionHandling::Dwarf) {
+        // Try to merge with the previous call-site.
+        if (PreviousIsInvoke) {
           CallSiteEntry &Prev = CallSites.back();
           if (Site.PadLabel == Prev.PadLabel && Site.Action == Prev.Action) {
             // Extend the range of the previous entry.
@@ -606,7 +605,7 @@
     std::string LSDAName =
       Asm->Mang->makeNameProper(std::string("LSDA_") + out.str(),
                                 Mangler::Private);
-    EmitLabel(LSDAName.c_str(), 0, false);
+    O << LSDAName << ":\n";
   }
 
   // Emit the header.

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp?rev=80677&r1=80676&r2=80677&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp Tue Sep  1 11:43:35 2009
@@ -43,27 +43,21 @@
 
 /// PrintLabelName - Print label name in form used by Dwarf writer.
 ///
-void Dwarf::PrintLabelName(const char *Tag, unsigned Number,
-                           bool ForcePrivate) const {
-  if (ForcePrivate)
-    O << MAI->getPrivateGlobalPrefix();
-  O << Tag;
+void Dwarf::PrintLabelName(const char *Tag, unsigned Number) const {
+  O << MAI->getPrivateGlobalPrefix() << Tag;
   if (Number) O << Number;
 }
 void Dwarf::PrintLabelName(const char *Tag, unsigned Number,
-                           const char *Suffix, bool ForcePrivate) const {
-  if (ForcePrivate)
-    O << MAI->getPrivateGlobalPrefix();
-  O << Tag;
+                           const char *Suffix) const {
+  O << MAI->getPrivateGlobalPrefix() << Tag;
   if (Number) O << Number;
   O << Suffix;
 }
 
 /// EmitLabel - Emit location label for internal use by Dwarf.
 ///
-void Dwarf::EmitLabel(const char *Tag, unsigned Number,
-                      bool ForcePrivate) const {
-  PrintLabelName(Tag, Number, ForcePrivate);
+void Dwarf::EmitLabel(const char *Tag, unsigned Number) const {
+  PrintLabelName(Tag, Number);
   O << ":\n";
 }
 

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.h?rev=80677&r1=80676&r2=80677&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.h Tue Sep  1 11:43:35 2009
@@ -100,18 +100,16 @@
     void PrintLabelName(const DWLabel &Label) const {
       PrintLabelName(Label.getTag(), Label.getNumber());
     }
+    void PrintLabelName(const char *Tag, unsigned Number) const;
     void PrintLabelName(const char *Tag, unsigned Number,
-                        bool ForcePrivate = true) const;
-    void PrintLabelName(const char *Tag, unsigned Number,
-                        const char *Suffix, bool ForcePrivate = true) const;
+                        const char *Suffix) const;
 
     /// EmitLabel - Emit location label for internal use by Dwarf.
     ///
     void EmitLabel(const DWLabel &Label) const {
       EmitLabel(Label.getTag(), Label.getNumber());
     }
-    void EmitLabel(const char *Tag, unsigned Number,
-                   bool ForcePrivate = true) const;
+    void EmitLabel(const char *Tag, unsigned Number) const;
 
     /// EmitReference - Emit a reference to a label.
     ///





More information about the llvm-commits mailing list