SmallVector append not insert.
authorJim Laskey <jlaskey@mac.com>
Fri, 27 Oct 2006 19:38:32 +0000 (19:38 +0000)
committerJim Laskey <jlaskey@mac.com>
Fri, 27 Oct 2006 19:38:32 +0000 (19:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31224 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/FoldingSet.cpp

index 1f22a1f5e24cf86987b537598baae1ed9aefaf14..2ae987605871ca350078181b3435c5cf090d2037 100644 (file)
@@ -56,14 +56,10 @@ void FoldingSetImpl::NodeID::AddString(const std::string &String) {
   const unsigned *Base = (const unsigned *)String.data();
   
   // If the string is aligned do a bulk transfer.
-#if 0  // FIXME - Add insert to SmallVector (tested with vector)
   if (!((intptr_t)Base & 3)) {
-    Bits.insert(Bits.end(), Base, Base + Units);
+    Bits.append(Base, Base + Units);
     Pos = Units * sizeof(unsigned);
   } else {
-#else
-  {
-#endif
     // Otherwise do it the hard way.
     for ( Pos += 4; Pos < Size; Pos += 4) {
       unsigned V = ((unsigned char)String[Pos - 4] << 24) |