mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 17:11:44 +03:00
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:
parent
9d9f827efb
commit
5f37ae30cf
11 changed files with 170 additions and 38 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue