diff --git a/lib/MC/MCSymbol.cpp b/lib/MC/MCSymbol.cpp index f0f35f7b29e..836d28294f5 100644 --- a/lib/MC/MCSymbol.cpp +++ b/lib/MC/MCSymbol.cpp @@ -28,9 +28,9 @@ void *MCSymbol::operator new(size_t s, const StringMapEntry *Name, // 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. - // FIXME: Use static_assert when constexpr is supported. - assert(alignOf() <= alignOf() && - "Bad alignment of MCSymbol"); + static_assert(AlignOf::Alignment <= + AlignOf::Alignment, + "Bad alignment of MCSymbol"); void *Storage = Ctx.allocate(Size, alignOf()); NameEntryStorageTy *Start = static_cast(Storage); NameEntryStorageTy *End = Start + (Name ? 1 : 0);