mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-01 07:30:43 +03:00
Implement same-module pragma(inline, {true|false}).
This commit is contained in:
parent
b12854df57
commit
b8048be6e4
2 changed files with 74 additions and 0 deletions
|
@ -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 ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue