mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-03 16:41:06 +03:00
Fix LLVM 5.0 build. (#2050)
llvm::AttributeSet was renamed to llvm::AttributeList
This commit is contained in:
parent
9bb7ada8e0
commit
9e394e4f99
8 changed files with 33 additions and 27 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue