summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-08-24 12:15:54 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-08-24 12:15:54 +0000
commit4321d4e4a9b5786e990a9e731165f3ee3df6fa01 (patch)
tree7f46d0f46b4fe0fac08d663655b357e325dbb9d6
parent6bee6319c64d2c5dae98491f8a6ab65981708109 (diff)
downloadllvm-4321d4e4a9b5786e990a9e731165f3ee3df6fa01.tar.gz
llvm-4321d4e4a9b5786e990a9e731165f3ee3df6fa01.tar.bz2
llvm-4321d4e4a9b5786e990a9e731165f3ee3df6fa01.tar.xz
Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189168 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index f625afe71e..4265d5a53b 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -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,