aboutsummaryrefslogtreecommitdiff
path: root/lib/MC/SubtargetFeature.cpp
diff options
context:
space:
mode:
authorFrancois Pichet <pichet2000@gmail.com>2011-07-01 09:23:41 +0000
committerFrancois Pichet <pichet2000@gmail.com>2011-07-01 09:23:41 +0000
commit24e11afad266498ca447649b8522e01ac2073798 (patch)
treebbd32edd5cd407299aac10db3fa431e77a9c788f /lib/MC/SubtargetFeature.cpp
parent394d1f1948c1b5c9e902059104b08a4837dfbbee (diff)
Another misuse of StringRef. MSVC is very sensitive to that kind of error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134236 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/SubtargetFeature.cpp')
-rw-r--r--lib/MC/SubtargetFeature.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/MC/SubtargetFeature.cpp b/lib/MC/SubtargetFeature.cpp
index c930baf1ba..d72c346eea 100644
--- a/lib/MC/SubtargetFeature.cpp
+++ b/lib/MC/SubtargetFeature.cpp
@@ -53,14 +53,14 @@ static inline bool isEnabled(const StringRef Feature) {
/// PrependFlag - Return a string with a prepended flag; '+' or '-'.
///
-static inline StringRef PrependFlag(const StringRef Feature,
+static inline std::string PrependFlag(const StringRef Feature,
bool IsEnabled) {
assert(!Feature.empty() && "Empty string");
if (hasFlag(Feature))
return Feature;
std::string Prefix = IsEnabled ? "+" : "-";
Prefix += Feature;
- return StringRef(Prefix);
+ return Prefix;
}
/// Split - Splits a string of comma separated items in to a vector of strings.