diff options
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r-- | llvm/lib/Support/CMakeLists.txt | 4 | ||||
-rw-r--r-- | llvm/lib/Support/StringMap.cpp | 12 |
2 files changed, 4 insertions, 12 deletions
diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt index a579eaf..10b6101 100644 --- a/llvm/lib/Support/CMakeLists.txt +++ b/llvm/lib/Support/CMakeLists.txt @@ -380,7 +380,7 @@ if(LLVM_WITH_Z3) ) endif() -target_include_directories(LLVMSupport SYSTEM +target_include_directories(LLVMSupport PRIVATE ${LLVM_THIRD_PARTY_DIR}/siphash/include - ) +) diff --git a/llvm/lib/Support/StringMap.cpp b/llvm/lib/Support/StringMap.cpp index 432e1fc..3432dc1 100644 --- a/llvm/lib/Support/StringMap.cpp +++ b/llvm/lib/Support/StringMap.cpp @@ -45,23 +45,15 @@ static inline unsigned *getHashTable(StringMapEntryBase **TheTable, uint32_t StringMapImpl::hash(StringRef Key) { return xxh3_64bits(Key); } -StringMapImpl::StringMapImpl(unsigned InitSize, unsigned itemSize) { - ItemSize = itemSize; - +StringMapImpl::StringMapImpl(unsigned InitSize, unsigned itemSize) + : ItemSize(itemSize) { // If a size is specified, initialize the table with that many buckets. if (InitSize) { // The table will grow when the number of entries reach 3/4 of the number of // buckets. To guarantee that "InitSize" number of entries can be inserted // in the table without growing, we allocate just what is needed here. init(getMinBucketToReserveForEntries(InitSize)); - return; } - - // Otherwise, initialize it with zero buckets to avoid the allocation. - TheTable = nullptr; - NumBuckets = 0; - NumItems = 0; - NumTombstones = 0; } void StringMapImpl::init(unsigned InitSize) { |