From 92da450ae7ae52ada45af4c8003d60337df8c7cf Mon Sep 17 00:00:00 2001 From: Francois Pichet Date: Fri, 1 Jul 2011 09:23:41 +0000 Subject: Another misuse of StringRef. MSVC is very sensitive to that kind of error. llvm-svn: 134236 --- llvm/lib/MC/SubtargetFeature.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/MC/SubtargetFeature.cpp') diff --git a/llvm/lib/MC/SubtargetFeature.cpp b/llvm/lib/MC/SubtargetFeature.cpp index c930baf..d72c346 100644 --- a/llvm/lib/MC/SubtargetFeature.cpp +++ b/llvm/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. -- cgit v1.1