aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 5f3e5fb..0b1bfb2 100644
--- a/include/llvm/ADT/StringRef.h
+++ b/include/llvm/ADT/StringRef.h
@@ -81,7 +81,7 @@ namespace llvm {
/// compare() in when the relative ordering of inequal strings isn't needed.
bool equals(const StringRef &RHS) const {
return (Length == RHS.Length &&
- memcmp(Data, RHS.Data, Length) == 0);
+ memcmp(Data, RHS.Data, RHS.Length) == 0);
}
/// compare - Compare two strings; the result is -1, 0, or 1 if this string