diff options
author | Francois Pichet <pichet2000@gmail.com> | 2011-07-01 09:23:41 +0000 |
---|---|---|
committer | Francois Pichet <pichet2000@gmail.com> | 2011-07-01 09:23:41 +0000 |
commit | 24e11afad266498ca447649b8522e01ac2073798 (patch) | |
tree | bbd32edd5cd407299aac10db3fa431e77a9c788f /lib/MC/SubtargetFeature.cpp | |
parent | 394d1f1948c1b5c9e902059104b08a4837dfbbee (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.cpp | 4 |
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. |