SubTargetFeature.cpp: it seems the size of this SmallVector should be 3
authorHans Wennborg <hans@hanshq.net>
Mon, 11 Aug 2014 02:21:32 +0000 (02:21 +0000)
committerHans Wennborg <hans@hanshq.net>
Mon, 11 Aug 2014 02:21:32 +0000 (02:21 +0000)
because some subtarget feature strings have three components.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215339 91177308-0d34-0410-b5e6-96231b3b80d8

lib/MC/SubtargetFeature.cpp

index 27525c7f1295e169cc85e17ba501e8186ffc06f7..e8ed28e6277b6187e4fa4c8fe2d8c13dcd2baf30 100644 (file)
@@ -54,7 +54,7 @@ static inline bool isEnabled(const StringRef Feature) {
 /// Split - Splits a string of comma separated items in to a vector of strings.
 ///
 static void Split(std::vector<std::string> &V, const StringRef S) {
 /// Split - Splits a string of comma separated items in to a vector of strings.
 ///
 static void Split(std::vector<std::string> &V, const StringRef S) {
-  SmallVector<StringRef, 2> Tmp;
+  SmallVector<StringRef, 3> Tmp;
   S.split(Tmp, ",", -1, false /* KeepEmpty */);
   V.assign(Tmp.begin(), Tmp.end());
 }
   S.split(Tmp, ",", -1, false /* KeepEmpty */);
   V.assign(Tmp.begin(), Tmp.end());
 }