diff --git a/lib/Target/CppBackend/CPPBackend.cpp b/lib/Target/CppBackend/CPPBackend.cpp index 969afe56e96..61fb4e98ecd 100644 --- a/lib/Target/CppBackend/CPPBackend.cpp +++ b/lib/Target/CppBackend/CPPBackend.cpp @@ -513,7 +513,7 @@ void CppWriter::printAttributes(const AttrListPtr &PAL, nl(Out); attrs.removeAttribute(Attributes::StackAlignment); assert(!attrs.hasAttributes() && "Unhandled attribute!"); - Out << "PAWI.Attrs = Attributes::get(B);"; + Out << "PAWI.Attrs = Attributes::get(mod->getContext(), B);"; nl(Out); Out << "Attrs.push_back(PAWI);"; nl(Out);