Change from alignof to llvm::alignOf to appease Visual Studio

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239424 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Pete Cooper 2015-06-09 18:50:18 +00:00
parent 79e04c5844
commit 7178ff1974

View File

@ -25,9 +25,9 @@ void *MCSymbol::operator new(size_t s, NameEntryTy *Name, MCContext &Ctx) {
// For safety, ensure that the alignment of a pointer is enough for an
// MCSymbol. This also ensures we don't need padding between the name and
// symbol.
assert(alignOf<MCSymbol>() <= alignof(NameEntryTy *) &&
assert(alignOf<MCSymbol>() <= alignOf<NameEntryTy *>() &&
"Bad alignment of MCSymbol");
void *Storage = Ctx.allocate(Size, alignof(NameEntryTy *));
void *Storage = Ctx.allocate(Size, alignOf<NameEntryTy *>());
NameEntryTy **Start = static_cast<NameEntryTy**>(Storage);
NameEntryTy **End = Start + (Name ? 1 : 0);
return End;