Don't pass in an Attributes object to something that expects an integral value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165887 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling 2012-10-14 03:27:15 +00:00
parent eb7ff05848
commit 9209805690

View File

@ -509,9 +509,7 @@ void CppWriter::printAttributes(const AttrListPtr &PAL,
HANDLE_ATTR(NonLazyBind);
#undef HANDLE_ATTR
if (attrs.hasAttribute(Attributes::StackAlignment))
Out << "B.addStackAlignmentAttr(Attribute::constructStackAlignmentFromInt("
<< attrs.getStackAlignment()
<< "))";
Out << "B.addStackAlignmentAttr(" << attrs.getStackAlignment() << ")";
nl(Out);
attrs.removeAttribute(Attributes::StackAlignment);
assert(!attrs.hasAttributes() && "Unhandled attribute!");