diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2010-07-14 22:38:02 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2010-07-14 22:38:02 +0000 |
commit | 92d89983481749737fe496cc59674475643f20cd (patch) | |
tree | 7629b4120f4ebeb442f215c8e9bb1111cd9a001b /llvm/lib/Support/Regex.cpp | |
parent | e34b383e71b180b1c5e5ced1c32bca8d62254b8d (diff) | |
download | bcm5719-llvm-92d89983481749737fe496cc59674475643f20cd.tar.gz bcm5719-llvm-92d89983481749737fe496cc59674475643f20cd.zip |
Don't pass StringRef by reference.
llvm-svn: 108366
Diffstat (limited to 'llvm/lib/Support/Regex.cpp')
-rw-r--r-- | llvm/lib/Support/Regex.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/Regex.cpp b/llvm/lib/Support/Regex.cpp index a7631de9d8c..309ffb02dec 100644 --- a/llvm/lib/Support/Regex.cpp +++ b/llvm/lib/Support/Regex.cpp @@ -19,7 +19,7 @@ #include <string> using namespace llvm; -Regex::Regex(const StringRef ®ex, unsigned Flags) { +Regex::Regex(StringRef regex, unsigned Flags) { unsigned flags = 0; preg = new llvm_regex(); preg->re_endp = regex.end(); @@ -52,7 +52,7 @@ unsigned Regex::getNumMatches() const { return preg->re_nsub; } -bool Regex::match(const StringRef &String, SmallVectorImpl<StringRef> *Matches){ +bool Regex::match(StringRef String, SmallVectorImpl<StringRef> *Matches){ unsigned nmatch = Matches ? preg->re_nsub+1 : 0; // pmatch needs to have at least one element. |