Changes in directory llvm/lib/Support:
StringMap.cpp updated: 1.4 -> 1.5 CStringMap.cpp (r1.4) removed --- Log message: Rename CStringMap -> StringMap, since it now supports nul characters in the strings. --- Diffs of the changes: (+8 -8) StringMap.cpp | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) Index: llvm/lib/Support/StringMap.cpp diff -u llvm/lib/Support/StringMap.cpp:1.4 llvm/lib/Support/StringMap.cpp:1.5 --- llvm/lib/Support/StringMap.cpp:1.4 Thu Feb 8 13:08:37 2007 +++ llvm/lib/Support/StringMap.cpp Thu Feb 8 13:20:57 2007 @@ -1,4 +1,4 @@ -//===--- CStringMap.cpp - CString Hash table map implementation -----------===// +//===--- StringMap.cpp - String Hash table map implementation -------------===// // // The LLVM Compiler Infrastructure // @@ -7,18 +7,18 @@ // //===----------------------------------------------------------------------===// // -// This file implements the CStringMap class. +// This file implements the StringMap class. // //===----------------------------------------------------------------------===// -#include "llvm/ADT/CStringMap.h" +#include "llvm/ADT/StringMap.h" #include <cassert> using namespace llvm; -CStringMapVisitor::~CStringMapVisitor() { +StringMapVisitor::~StringMapVisitor() { } -CStringMapImpl::CStringMapImpl(unsigned InitSize, unsigned itemSize) { +StringMapImpl::StringMapImpl(unsigned InitSize, unsigned itemSize) { assert((InitSize & (InitSize-1)) == 0 && "Init Size must be a power of 2 or zero!"); NumBuckets = InitSize ? InitSize : 512; @@ -49,7 +49,7 @@ /// specified bucket will be non-null. Otherwise, it will be null. In either /// case, the FullHashValue field of the bucket will be set to the hash value /// of the string. -unsigned CStringMapImpl::LookupBucketFor(const char *NameStart, +unsigned StringMapImpl::LookupBucketFor(const char *NameStart, const char *NameEnd) { unsigned HTSize = NumBuckets; unsigned FullHashValue = HashString(NameStart, NameEnd); @@ -92,7 +92,7 @@ /// RehashTable - Grow the table, redistributing values into the buckets with /// the appropriate mod-of-hashtable-size. -void CStringMapImpl::RehashTable() { +void StringMapImpl::RehashTable() { unsigned NewSize = NumBuckets*2; ItemBucket *NewTableArray = new ItemBucket[NewSize](); memset(NewTableArray, 0, NewSize*sizeof(ItemBucket)); @@ -130,7 +130,7 @@ /// VisitEntries - This method walks through all of the items, /// invoking Visitor.Visit for each of them. -void CStringMapImpl::VisitEntries(const CStringMapVisitor &Visitor) const { +void StringMapImpl::VisitEntries(const StringMapVisitor &Visitor) const { for (ItemBucket *IB = TheTable, *E = TheTable+NumBuckets; IB != E; ++IB) { if (StringMapEntryBase *Id = IB->Item) Visitor.Visit((char*)Id + ItemSize, Id); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits