Simplify code. No functionality change.
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfDebug.cpp
index f625afe71e16c5d7867a32af5b4d9c87dc94fafe..4265d5a53b379cdef1739d5bd43e4970e6b7e931 100644 (file)
@@ -313,12 +313,7 @@ static bool isObjCClass(StringRef Name) {
 static bool hasObjCCategory(StringRef Name) {
   if (!isObjCClass(Name)) return false;
 
-  size_t pos = Name.find(')');
-  if (pos != std::string::npos) {
-    if (Name[pos+1] != ' ') return false;
-    return true;
-  }
-  return false;
+  return Name.find(") ") != StringRef::npos;
 }
 
 static void getObjCClassCategory(StringRef In, StringRef &Class,