Added const qualifier to StringRef::edit_distance member function

Patch by Ismail Pazarbasi.

llvm-svn: 189162
This commit is contained in:
Dmitri Gribenko 2013-08-24 01:50:41 +00:00
parent e531cbaa86
commit 292c9200fc
2 changed files with 2 additions and 2 deletions

View File

@ -175,7 +175,7 @@ namespace llvm {
/// transform one of the given strings into the other. If zero,
/// the strings are identical.
unsigned edit_distance(StringRef Other, bool AllowReplacements = true,
unsigned MaxEditDistance = 0);
unsigned MaxEditDistance = 0) const;
/// str - Get the contents as an std::string.
std::string str() const {

View File

@ -85,7 +85,7 @@ int StringRef::compare_numeric(StringRef RHS) const {
// Compute the edit distance between the two given strings.
unsigned StringRef::edit_distance(llvm::StringRef Other,
bool AllowReplacements,
unsigned MaxEditDistance) {
unsigned MaxEditDistance) const {
return llvm::ComputeEditDistance(
llvm::ArrayRef<char>(data(), size()),
llvm::ArrayRef<char>(Other.data(), Other.size()),