[llvm] r215339 - SubTargetFeature.cpp: it seems the size of this SmallVector should be 3

Hans Wennborg hans at hanshq.net
Sun Aug 10 19:21:32 PDT 2014


Author: hans
Date: Sun Aug 10 21:21:32 2014
New Revision: 215339

URL: http://llvm.org/viewvc/llvm-project?rev=215339&view=rev
Log:
SubTargetFeature.cpp: it seems the size of this SmallVector should be 3

because some subtarget feature strings have three components.

Modified:
    llvm/trunk/lib/MC/SubtargetFeature.cpp

Modified: llvm/trunk/lib/MC/SubtargetFeature.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/SubtargetFeature.cpp?rev=215339&r1=215338&r2=215339&view=diff
==============================================================================
--- llvm/trunk/lib/MC/SubtargetFeature.cpp (original)
+++ llvm/trunk/lib/MC/SubtargetFeature.cpp Sun Aug 10 21:21:32 2014
@@ -54,7 +54,7 @@ static inline bool isEnabled(const Strin
 /// 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());
 }





More information about the llvm-commits mailing list