Convert feature strings to lowercase even if they have a '+'/'-' in front of them.
[oota-llvm.git] / lib / MC / SubtargetFeature.cpp
index f893104736af37d548ec9933aa66c10f686c058b..fcb43d63cb9bc375039953c52dcd6c09abfb2af4 100644 (file)
@@ -85,7 +85,7 @@ void SubtargetFeatures::AddFeature(StringRef String) {
   // Don't add empty features.
   if (!String.empty())
     // Convert to lowercase, prepend flag if we don't already have a flag.
-    Features.push_back(hasFlag(String) ? String.str() : "+" + String.lower());
+    Features.push_back(hasFlag(String) ? String.lower() : "+" + String.lower());
 }
 
 /// Find KV in array using binary search.