summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Option/ArgList.cpp
diff options
context:
space:
mode:
authorYaron Keren <yaron.keren@gmail.com>2015-03-17 09:51:17 +0000
committerYaron Keren <yaron.keren@gmail.com>2015-03-17 09:51:17 +0000
commit1ee89fc432ded040593e59844efa621b4189a7c3 (patch)
tree14eac32a31a8d2e7c2180ff3ecaa3830aeb93c5d /llvm/lib/Option/ArgList.cpp
parente458ab45774966c263817fdd63613faf28cf843c (diff)
downloadbcm5719-llvm-1ee89fc432ded040593e59844efa621b4189a7c3.tar.gz
bcm5719-llvm-1ee89fc432ded040593e59844efa621b4189a7c3.zip
Teach Twine to support SmallString.
Enable removing .str() member calls for these frequent cases. http://reviews.llvm.org/D6372 llvm-svn: 232465
Diffstat (limited to 'llvm/lib/Option/ArgList.cpp')
-rw-r--r--llvm/lib/Option/ArgList.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/llvm/lib/Option/ArgList.cpp b/llvm/lib/Option/ArgList.cpp
index 2de55ce73dd..f2547d68842 100644
--- a/llvm/lib/Option/ArgList.cpp
+++ b/llvm/lib/Option/ArgList.cpp
@@ -285,11 +285,6 @@ void ArgList::ClaimAllArgs() const {
(*it)->claim();
}
-const char *ArgList::MakeArgString(const Twine &T) const {
- SmallString<256> Str;
- return MakeArgString(T.toStringRef(Str));
-}
-
const char *ArgList::GetOrMakeJoinedArgString(unsigned Index,
StringRef LHS,
StringRef RHS) const {
@@ -334,7 +329,7 @@ unsigned InputArgList::MakeIndex(StringRef String0,
return Index0;
}
-const char *InputArgList::MakeArgString(StringRef Str) const {
+const char *InputArgList::MakeArgStringRef(StringRef Str) const {
return getArgString(MakeIndex(Str));
}
@@ -345,7 +340,7 @@ DerivedArgList::DerivedArgList(const InputArgList &BaseArgs)
DerivedArgList::~DerivedArgList() {}
-const char *DerivedArgList::MakeArgString(StringRef Str) const {
+const char *DerivedArgList::MakeArgStringRef(StringRef Str) const {
return BaseArgs.MakeArgString(Str);
}
OpenPOWER on IntegriCloud