Mercurial > projects > ldc
diff ir/irfunction.cpp @ 632:df196c8dea26
Updated to latest LLVM trunk, function notes have been removed and merged with parameter attributes, which have been renamed to just attributes. Nothing seems to have broke!
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Wed, 01 Oct 2008 23:17:14 +0200 |
parents | c7d7e2282ba3 |
children | 2ebac4750adb |
line wrap: on
line diff
--- a/ir/irfunction.cpp Wed Oct 01 20:55:13 2008 +0200 +++ b/ir/irfunction.cpp Wed Oct 01 23:17:14 2008 +0200 @@ -66,14 +66,12 @@ void IrFunction::setNeverInline() { - llvm::FunctionNotes cur = func->getNotes(); - assert(!(cur & llvm::FN_NOTE_AlwaysInline) && "function can't be never- and always-inline at the same time"); - func->setNotes(cur | llvm::FN_NOTE_NoInline); + assert(!func->hasFnAttr(llvm::Attribute::AlwaysInline) && "function can't be never- and always-inline at the same time"); + func->addFnAttr(llvm::Attribute::NoInline); } void IrFunction::setAlwaysInline() { - llvm::FunctionNotes cur = func->getNotes(); - assert(!(cur & llvm::FN_NOTE_NoInline) && "function can't be never- and always-inline at the same time"); - func->setNotes(cur | llvm::FN_NOTE_AlwaysInline); + assert(!func->hasFnAttr(llvm::Attribute::NoInline) && "function can't be never- and always-inline at the same time"); + func->addFnAttr(llvm::Attribute::AlwaysInline); }