Add the base ObjC method name to the names lookup table as well.
authorEric Christopher <echristo@apple.com>
Tue, 8 Nov 2011 19:16:01 +0000 (19:16 +0000)
committerEric Christopher <echristo@apple.com>
Tue, 8 Nov 2011 19:16:01 +0000 (19:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144105 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index 64e0e92edb56a4ec410f4aa38c1d38352eafba77..286075fb025e4a4a50a953065fb288f0c6692fd4 100644 (file)
@@ -552,6 +552,10 @@ static void getObjCClassCategory(StringRef In, StringRef &Class,
   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 @@ void DwarfDebug::constructSubprogramDIE(CompileUnit *TheCU,
     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;