mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-26 17:43:14 +01:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user