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 | 4cf6e73f51b33e252cdad17bc03f487f17418941 (patch) | |
| tree | 2cbc8f9a8ce3171d4432fc6c7f4bd686aef3b49b /lib/Support/Regex.cpp | |
| parent | 55d2455541f6c65373ce4f0db48539737bd221c9 (diff) | |
| download | external_llvm-4cf6e73f51b33e252cdad17bc03f487f17418941.zip external_llvm-4cf6e73f51b33e252cdad17bc03f487f17418941.tar.gz external_llvm-4cf6e73f51b33e252cdad17bc03f487f17418941.tar.bz2 | |
Don't pass StringRef by reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108366 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Regex.cpp')
| -rw-r--r-- | lib/Support/Regex.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Support/Regex.cpp b/lib/Support/Regex.cpp index a7631de..309ffb0 100644 --- a/lib/Support/Regex.cpp +++ b/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. |
