Allow for the case where the name of the subprogram is "".
authorEric Christopher <echristo@apple.com>
Mon, 7 Nov 2011 18:10:17 +0000 (18:10 +0000)
committerEric Christopher <echristo@apple.com>
Mon, 7 Nov 2011 18:10:17 +0000 (18:10 +0000)
Fixes a self-host error.

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

lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index 633f216416e87287de54362341f3dbcd6e261ea7..d3414d7be55b4499b805c66efa823fe157975601 100644 (file)
@@ -525,6 +525,7 @@ CompileUnit *DwarfDebug::constructCompileUnit(const MDNode *N) {
 }
 
 static bool isObjCClass(StringRef Name) {
+  if (Name == "") return false;
   return Name[0] == '+' || Name[0] == '-';
 }