summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Regex.cpp
diff options
context:
space:
mode:
authorYaron Keren <yaron.keren@gmail.com>2015-03-30 15:42:36 +0000
committerYaron Keren <yaron.keren@gmail.com>2015-03-30 15:42:36 +0000
commit075759aaddb1daf9aa801fc75a0909c510081f6d (patch)
tree88e604bd3bfca09b26acf2438fff4a82a41b4de6 /llvm/lib/Support/Regex.cpp
parentbbe1756a8c55bb0195bcbe257cfff4b73d94c8ac (diff)
downloadbcm5719-llvm-075759aaddb1daf9aa801fc75a0909c510081f6d.tar.gz
bcm5719-llvm-075759aaddb1daf9aa801fc75a0909c510081f6d.zip
Remove more superfluous .str() and replace std::string concatenation with Twine.
Following r233392, http://llvm.org/viewvc/llvm-project?rev=233392&view=rev. llvm-svn: 233555
Diffstat (limited to 'llvm/lib/Support/Regex.cpp')
-rw-r--r--llvm/lib/Support/Regex.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Support/Regex.cpp b/llvm/lib/Support/Regex.cpp
index d3e29ac9dcc..e8344ef74d9 100644
--- a/llvm/lib/Support/Regex.cpp
+++ b/llvm/lib/Support/Regex.cpp
@@ -15,6 +15,7 @@
#include "regex_impl.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
+#include "llvm/ADT/Twine.h"
#include <string>
using namespace llvm;
@@ -158,7 +159,7 @@ std::string Regex::sub(StringRef Repl, StringRef String,
RefValue < Matches.size())
Res += Matches[RefValue];
else if (Error && Error->empty())
- *Error = "invalid backreference string '" + Ref.str() + "'";
+ *Error = ("invalid backreference string '" + Twine(Ref) + "'").str();
break;
}
}
OpenPOWER on IntegriCloud