This commit is contained in:
Nekotekina 2018-01-30 22:49:36 +03:00 committed by Zangetsu38
parent b89c8ec660
commit 89f5292057

View file

@ -15,7 +15,7 @@ class PPUTranslator final : public cpu_translator
std::map<u64, const ppu_reloc*> m_relocs;
// Attributes for function calls which are "pure" and may be optimized away if their results are unused
const llvm::AttributeList m_pure_attr;
const llvm::AttributeSet m_pure_attr;
// LLVM function
llvm::Function* m_function;
@ -297,7 +297,7 @@ public:
// Call a function with attribute list
template<typename... Args>
llvm::CallInst* Call(llvm::Type* ret, llvm::AttributeList attr, llvm::StringRef name, Args... args)
llvm::CallInst* Call(llvm::Type* ret, llvm::AttributeSet attr, llvm::StringRef name, Args... args)
{
// Call the function
return m_ir->CreateCall(m_module->getOrInsertFunction(name, llvm::FunctionType::get(ret, {args->getType()...}, false), attr), {args...});
@ -307,7 +307,7 @@ public:
template<typename... Args>
llvm::CallInst* Call(llvm::Type* ret, llvm::StringRef name, Args... args)
{
return Call(ret, llvm::AttributeList{}, name, args...);
return Call(ret, llvm::AttributeSet{}, name, args...);
}
// Handle compilation errors