mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 09:00:33 +03:00
Merge pull request #3832 from kinke/fix_compilability
Fix little compilability regression
This commit is contained in:
parent
88d8a2f856
commit
406e469e99
2 changed files with 22 additions and 34 deletions
|
@ -29,26 +29,14 @@ IrFunction::IrFunction(FuncDeclaration *fd)
|
|||
}
|
||||
|
||||
void IrFunction::setNeverInline() {
|
||||
assert(!func->getAttributes()
|
||||
#if LDC_LLVM_VER < 1400
|
||||
.hasAttribute(LLAttributeList::FunctionIndex,
|
||||
#else
|
||||
.hasFnAttr(
|
||||
#endif
|
||||
llvm::Attribute::AlwaysInline) &&
|
||||
"function can't be never- and always-inline at the same time");
|
||||
assert(!func->hasFnAttribute(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()
|
||||
#if LDC_LLVM_VER < 1400
|
||||
.hasAttribute(LLAttributeList::FunctionIndex,
|
||||
#else
|
||||
.hasFnAttr(
|
||||
#endif
|
||||
llvm::Attribute::NoInline) &&
|
||||
"function can't be never- and always-inline at the same time");
|
||||
assert(!func->hasFnAttribute(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