From 9bf0380a54f221de9c598c54d9a0554b893de64c Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Thu, 26 Aug 2010 15:25:35 +0000 Subject: StringRef::compare_numeric also differed from StringRef::compare for characters > 127. llvm-svn: 112189 --- llvm/lib/Support/StringRef.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Support/StringRef.cpp') diff --git a/llvm/lib/Support/StringRef.cpp b/llvm/lib/Support/StringRef.cpp index c33ca6a2ebf..46f26b242aa 100644 --- a/llvm/lib/Support/StringRef.cpp +++ b/llvm/lib/Support/StringRef.cpp @@ -59,7 +59,7 @@ int StringRef::compare_numeric(StringRef RHS) const { break; } } - return Data[I] < RHS.Data[I] ? -1 : 1; + return (unsigned char)Data[I] < (unsigned char)RHS.Data[I] ? -1 : 1; } if (Length == RHS.Length) return 0; -- cgit v1.2.3