1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

Minor cosmetic cleanups in the calculation of alignments for

StringMapEntry objects.  No functionality change.

llvm-svn: 43097
This commit is contained in:
Ted Kremenek 2007-10-17 22:09:45 +00:00
parent a9c650d43e
commit 24219dc48a

View File

@ -140,10 +140,12 @@ public:
// Okay, the item doesn't already exist, and 'Bucket' is the bucket to fill
// in. Allocate a new item with space for the string at the end and a null
// terminator.
unsigned AllocSize = sizeof(StringMapEntry)+KeyLength+1;
StringMapEntry *NewItem = static_cast<StringMapEntry*>(
Allocator.Allocate(AllocSize, AlignOf<StringMapEntry>::Alignment));
unsigned Alignment = alignof<StringMapEntry>();
StringMapEntry *NewItem =
static_cast<StringMapEntry*>(Allocator.Allocate(AllocSize,Alignment));
// Default construct the value.
new (NewItem) StringMapEntry(KeyLength);