summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Regex.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-07-14 22:38:02 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-07-14 22:38:02 +0000
commit92d89983481749737fe496cc59674475643f20cd (patch)
tree7629b4120f4ebeb442f215c8e9bb1111cd9a001b /llvm/lib/Support/Regex.cpp
parente34b383e71b180b1c5e5ced1c32bca8d62254b8d (diff)
downloadbcm5719-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.cpp4
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 &regex, 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.
OpenPOWER on IntegriCloud