comparison ir/irfunction.cpp @ 584:c7d7e2282ba3

Make sure functions containing inline asm are never inlined to avoid duplicated labels.
author Christian Kamm <kamm incasoftware de>
date Mon, 08 Sep 2008 20:38:55 +0200
parents a34078905d01
children df196c8dea26
comparison
equal deleted inserted replaced
583:12bda38ea366 584:c7d7e2282ba3
61 void IrFunction::popLabelScope() 61 void IrFunction::popLabelScope()
62 { 62 {
63 labelScopes.pop_back(); 63 labelScopes.pop_back();
64 nextUnique.pop(); 64 nextUnique.pop();
65 } 65 }
66
67 void IrFunction::setNeverInline()
68 {
69 llvm::FunctionNotes cur = func->getNotes();
70 assert(!(cur & llvm::FN_NOTE_AlwaysInline) && "function can't be never- and always-inline at the same time");
71 func->setNotes(cur | llvm::FN_NOTE_NoInline);
72 }
73
74 void IrFunction::setAlwaysInline()
75 {
76 llvm::FunctionNotes cur = func->getNotes();
77 assert(!(cur & llvm::FN_NOTE_NoInline) && "function can't be never- and always-inline at the same time");
78 func->setNotes(cur | llvm::FN_NOTE_AlwaysInline);
79 }