#include "swr_state.h"
#include "swr_screen.h"
+#if HAVE_LLVM < 0x0500
+namespace llvm {
+typedef AttributeSet AttributeList;
+}
+#endif
+
using namespace SwrJit;
using namespace llvm;
AttrBuilder attrBuilder;
attrBuilder.addStackAlignmentAttr(JM()->mVWidth * sizeof(float));
- AttributeSet attrSet = AttributeSet::get(
- JM()->mContext, AttributeSet::FunctionIndex, attrBuilder);
+ AttributeList attrSet = AttributeList::get(
+ JM()->mContext, AttributeList::FunctionIndex, attrBuilder);
std::vector<Type *> gsArgs{PointerType::get(Gen_swr_draw_context(JM()), 0),
PointerType::get(Gen_SWR_GS_CONTEXT(JM()), 0)};
GlobalValue::ExternalLinkage,
"GS",
JM()->mpCurrentModule);
- pFunction->addAttributes(AttributeSet::FunctionIndex, attrSet);
+ pFunction->addAttributes(AttributeList::FunctionIndex, attrSet);
BasicBlock *block = BasicBlock::Create(JM()->mContext, "entry", pFunction);
IRB()->SetInsertPoint(block);
AttrBuilder attrBuilder;
attrBuilder.addStackAlignmentAttr(JM()->mVWidth * sizeof(float));
- AttributeSet attrSet = AttributeSet::get(
- JM()->mContext, AttributeSet::FunctionIndex, attrBuilder);
+ AttributeList attrSet = AttributeList::get(
+ JM()->mContext, AttributeList::FunctionIndex, attrBuilder);
std::vector<Type *> vsArgs{PointerType::get(Gen_swr_draw_context(JM()), 0),
PointerType::get(Gen_SWR_VS_CONTEXT(JM()), 0)};
GlobalValue::ExternalLinkage,
"VS",
JM()->mpCurrentModule);
- pFunction->addAttributes(AttributeSet::FunctionIndex, attrSet);
+ pFunction->addAttributes(AttributeList::FunctionIndex, attrSet);
BasicBlock *block = BasicBlock::Create(JM()->mContext, "entry", pFunction);
IRB()->SetInsertPoint(block);
AttrBuilder attrBuilder;
attrBuilder.addStackAlignmentAttr(JM()->mVWidth * sizeof(float));
- AttributeSet attrSet = AttributeSet::get(
- JM()->mContext, AttributeSet::FunctionIndex, attrBuilder);
+ AttributeList attrSet = AttributeList::get(
+ JM()->mContext, AttributeList::FunctionIndex, attrBuilder);
std::vector<Type *> fsArgs{PointerType::get(Gen_swr_draw_context(JM()), 0),
PointerType::get(Gen_SWR_PS_CONTEXT(JM()), 0)};
GlobalValue::ExternalLinkage,
"FS",
JM()->mpCurrentModule);
- pFunction->addAttributes(AttributeSet::FunctionIndex, attrSet);
+ pFunction->addAttributes(AttributeList::FunctionIndex, attrSet);
BasicBlock *block = BasicBlock::Create(JM()->mContext, "entry", pFunction);
IRB()->SetInsertPoint(block);