From a3975b7f47e4841fab3b2114d5a3475e03d6b671 Mon Sep 17 00:00:00 2001 From: kai Date: Sun, 30 Dec 2012 14:27:51 +0100 Subject: [PATCH] Replace llvm::Function.getFnAttributes with llvm::Function.getAttributes. This is a recent change in LLVM 3.3. --- ir/irfunction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ir/irfunction.cpp b/ir/irfunction.cpp index 93f37654..2f825850 100644 --- a/ir/irfunction.cpp +++ b/ir/irfunction.cpp @@ -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");