X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FIR%2FAttributes.cpp;fp=lib%2FIR%2FAttributes.cpp;h=bdefe5917feffbb467011247076122e72901a407;hp=fe09c47fb48a63a1e383aa9e70fe875326620a5d;hb=6d024c616a2a4959f8dfe5c64d27f89b394cf042;hpb=0ab4d52b0ad3b1d16238aed4c3f8d50fa8bf8b40 diff --git a/lib/IR/Attributes.cpp b/lib/IR/Attributes.cpp index fe09c47fb48..bdefe5917fe 100644 --- a/lib/IR/Attributes.cpp +++ b/lib/IR/Attributes.cpp @@ -830,6 +830,11 @@ AttributeSet AttributeSet::removeAttributes(LLVMContext &C, unsigned Index, if (!pImpl) return AttributeSet(); if (!Attrs.pImpl) return *this; + // FIXME it is not obvious how this should work for alignment. + // For now, say we can't pass in alignment, which no current use does. + assert(!Attrs.hasAttribute(Index, Attribute::Alignment) && + "Attempt to change alignment!"); + // Add the attribute slots before the one we're trying to add. SmallVector AttrSet; uint64_t NumAttrs = pImpl->getNumAttributes();