Don't pass in an Attributes object to something that expects an integral value.
authorBill Wendling <isanbard@gmail.com>
Sun, 14 Oct 2012 03:27:15 +0000 (03:27 +0000)
committerBill Wendling <isanbard@gmail.com>
Sun, 14 Oct 2012 03:27:15 +0000 (03:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165887 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CppBackend/CPPBackend.cpp

index 096e2bc13b09cf31a29b3bb6e330b098c07e801e..5b17a0f927bce29b3ca829bab06585fee9045cbc 100644 (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!");