Don't pass StringRef by reference.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108366 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer
2010-07-14 22:38:02 +00:00
parent d26e89dfcb
commit 38e59891ee
37 changed files with 74 additions and 76 deletions

View File

@ -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.