LLVM 3.3: class Attributes is renamed to Attribute.

Some other renamings took place in "llvm/Attributes.h" but only this causes
compile errors in LDC.
Also uses new location of "llvm/IRBuilder.h".
This commit is contained in:
kai 2012-12-21 17:32:17 +01:00
parent 9d9f827efb
commit 5f37ae30cf
11 changed files with 170 additions and 38 deletions

View file

@ -72,7 +72,10 @@ IrFunction::IrFunction(FuncDeclaration* fd)
void IrFunction::setNeverInline()
{
#if LDC_LLVM_VER >= 302
#if LDC_LLVM_VER >= 303
assert(!func->getFnAttributes().hasAttribute(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");
func->addFnAttr(llvm::Attributes::NoInline);
#else
@ -83,7 +86,10 @@ void IrFunction::setNeverInline()
void IrFunction::setAlwaysInline()
{
#if LDC_LLVM_VER >= 302
#if LDC_LLVM_VER >= 303
assert(!func->getFnAttributes().hasAttribute(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");
func->addFnAttr(llvm::Attributes::AlwaysInline);
#else