[llvm-commits] [llvm] r144105 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Eric Christopher echristo at apple.com
Tue Nov 8 11:16:01 PST 2011


Author: echristo
Date: Tue Nov  8 13:16:01 2011
New Revision: 144105

URL: http://llvm.org/viewvc/llvm-project?rev=144105&view=rev
Log:
Add the base ObjC method name to the names lookup table as well.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=144105&r1=144104&r2=144105&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Tue Nov  8 13:16:01 2011
@@ -552,6 +552,10 @@
   return;
 }
 
+static StringRef getObjCMethodName(StringRef In) {
+  return In.slice(In.find(' ') + 1, In.find(']'));
+}
+
 /// construct SubprogramDIE - Construct subprogram DIE.
 void DwarfDebug::constructSubprogramDIE(CompileUnit *TheCU, 
                                         const MDNode *N) {
@@ -599,6 +603,8 @@
     TheCU->addAccelObjC(Class, SubprogramDie);
     if (Category != "")
       TheCU->addAccelObjC(Category, SubprogramDie);
+    // Also add the base method name to the name table.
+    TheCU->addAccelName(getObjCMethodName(SP.getName()), SubprogramDie);
   }
   
   return;





More information about the llvm-commits mailing list