Implement same-module pragma(inline, {true|false}).

This commit is contained in:
Johan Engelen 2016-06-15 23:56:54 +02:00
parent b12854df57
commit b8048be6e4
2 changed files with 74 additions and 0 deletions

View file

@ -527,8 +527,15 @@ void DtoDeclareFunction(FuncDeclaration *fdecl) {
gIR->mainFunc = func;
}
// Set inlining attribute
if (fdecl->neverInline) {
irFunc->setNeverInline();
} else {
if (fdecl->inlining == PINLINEalways) {
irFunc->setAlwaysInline();
} else if (fdecl->inlining == PINLINEnever) {
irFunc->setNeverInline();
}
}
if (fdecl->llvmInternal == LLVMglobal_crt_ctor ||