[llvm-commits] CVS: llvm/lib/Support/FoldingSet.cpp

Jim Laskey jlaskey at apple.com
Fri Oct 27 12:38:53 PDT 2006



Changes in directory llvm/lib/Support:

FoldingSet.cpp updated: 1.5 -> 1.6
---
Log message:

SmallVector append not insert.

---
Diffs of the changes:  (+1 -5)

 FoldingSet.cpp |    6 +-----
 1 files changed, 1 insertion(+), 5 deletions(-)


Index: llvm/lib/Support/FoldingSet.cpp
diff -u llvm/lib/Support/FoldingSet.cpp:1.5 llvm/lib/Support/FoldingSet.cpp:1.6
--- llvm/lib/Support/FoldingSet.cpp:1.5	Fri Oct 27 14:20:12 2006
+++ llvm/lib/Support/FoldingSet.cpp	Fri Oct 27 14:38:32 2006
@@ -56,14 +56,10 @@
   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) |






More information about the llvm-commits mailing list