mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Replace llvm::Function.getFnAttributes with llvm::Function.getAttributes.
This is a recent change in LLVM 3.3.
This commit is contained in:
@@ -73,7 +73,7 @@ IrFunction::IrFunction(FuncDeclaration* fd)
|
||||
void IrFunction::setNeverInline()
|
||||
{
|
||||
#if LDC_LLVM_VER >= 303
|
||||
assert(!func->getFnAttributes().hasAttribute(llvm::Attribute::AlwaysInline) && "function can't be never- and always-inline at the same time");
|
||||
assert(!func->getAttributes().hasAttribute(llvm::AttributeSet::FunctionIndex, llvm::Attribute::AlwaysInline) && "function can't be never- and always-inline at the same time");
|
||||
func->addFnAttr(llvm::Attribute::NoInline);
|
||||
#elif LDC_LLVM_VER == 302
|
||||
assert(!func->getFnAttributes().hasAttribute(llvm::Attributes::AlwaysInline) && "function can't be never- and always-inline at the same time");
|
||||
@@ -87,7 +87,7 @@ void IrFunction::setNeverInline()
|
||||
void IrFunction::setAlwaysInline()
|
||||
{
|
||||
#if LDC_LLVM_VER >= 303
|
||||
assert(!func->getFnAttributes().hasAttribute(llvm::Attribute::NoInline) && "function can't be never- and always-inline at the same time");
|
||||
assert(!func->getAttributes().hasAttribute(llvm::AttributeSet::FunctionIndex, llvm::Attribute::NoInline) && "function can't be never- and always-inline at the same time");
|
||||
func->addFnAttr(llvm::Attribute::AlwaysInline);
|
||||
#elif LDC_LLVM_VER == 302
|
||||
assert(!func->getFnAttributes().hasAttribute(llvm::Attributes::NoInline) && "function can't be never- and always-inline at the same time");
|
||||
|
||||
Reference in New Issue
Block a user