summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/StringRef.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/ADT/StringRef.h')
-rw-r--r--include/llvm/ADT/StringRef.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/StringRef.h b/include/llvm/ADT/StringRef.h
index 5433056039..acfc335b80 100644
--- a/include/llvm/ADT/StringRef.h
+++ b/include/llvm/ADT/StringRef.h
@@ -177,7 +177,7 @@ namespace llvm {
size_t Count = 0;
for (size_t i = 0, e = Length; i != e; ++i)
if (Data[i] == C)
- return i;
+ ++Count;
return Count;
}