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!

This commit is contained in:
Tomas Lindquist Olsen
2008-10-01 23:17:14 +02:00
parent e7ad7296d0
commit bce9368514
12 changed files with 119 additions and 134 deletions

View File

@@ -66,14 +66,12 @@ void IrFunction::popLabelScope()
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);
}