comparison 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
comparison
equal deleted inserted replaced
629:607b6b5819a7 632:df196c8dea26
64 nextUnique.pop(); 64 nextUnique.pop();
65 } 65 }
66 66
67 void IrFunction::setNeverInline() 67 void IrFunction::setNeverInline()
68 { 68 {
69 llvm::FunctionNotes cur = func->getNotes(); 69 assert(!func->hasFnAttr(llvm::Attribute::AlwaysInline) && "function can't be never- and always-inline at the same time");
70 assert(!(cur & llvm::FN_NOTE_AlwaysInline) && "function can't be never- and always-inline at the same time"); 70 func->addFnAttr(llvm::Attribute::NoInline);
71 func->setNotes(cur | llvm::FN_NOTE_NoInline);
72 } 71 }
73 72
74 void IrFunction::setAlwaysInline() 73 void IrFunction::setAlwaysInline()
75 { 74 {
76 llvm::FunctionNotes cur = func->getNotes(); 75 assert(!func->hasFnAttr(llvm::Attribute::NoInline) && "function can't be never- and always-inline at the same time");
77 assert(!(cur & llvm::FN_NOTE_NoInline) && "function can't be never- and always-inline at the same time"); 76 func->addFnAttr(llvm::Attribute::AlwaysInline);
78 func->setNotes(cur | llvm::FN_NOTE_AlwaysInline);
79 } 77 }