Fix LLVM 5.0 build. (#2050)

llvm::AttributeSet was renamed to llvm::AttributeList
This commit is contained in:
Johan Engelen 2017-03-29 22:26:17 +02:00 committed by kinke
parent 9bb7ada8e0
commit 9e394e4f99
8 changed files with 33 additions and 27 deletions

View file

@ -25,14 +25,14 @@ IrFunction::IrFunction(FuncDeclaration *fd) : FMF(opts::defaultFMF) {
}
void IrFunction::setNeverInline() {
assert(!func->getAttributes().hasAttribute(llvm::AttributeSet::FunctionIndex,
assert(!func->getAttributes().hasAttribute(LLAttributeSet::FunctionIndex,
llvm::Attribute::AlwaysInline) &&
"function can't be never- and always-inline at the same time");
func->addFnAttr(llvm::Attribute::NoInline);
}
void IrFunction::setAlwaysInline() {
assert(!func->getAttributes().hasAttribute(llvm::AttributeSet::FunctionIndex,
assert(!func->getAttributes().hasAttribute(LLAttributeSet::FunctionIndex,
llvm::Attribute::NoInline) &&
"function can't be never- and always-inline at the same time");
func->addFnAttr(llvm::Attribute::AlwaysInline);