mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 17:11:44 +03:00
Merge branch 'master' into merge-2.077
Conflicts: runtime/druntime
This commit is contained in:
commit
213de9b2f7
69 changed files with 3581 additions and 61 deletions
|
@ -39,6 +39,7 @@
|
|||
#include "gen/pgo.h"
|
||||
#include "gen/pragma.h"
|
||||
#include "gen/runtime.h"
|
||||
#include "gen/dynamiccompile.h"
|
||||
#include "gen/scope_exit.h"
|
||||
#include "gen/tollvm.h"
|
||||
#include "gen/uda.h"
|
||||
|
@ -566,6 +567,15 @@ void DtoDeclareFunction(FuncDeclaration *fdecl) {
|
|||
applyTargetMachineAttributes(*func, *gTargetMachine);
|
||||
applyFuncDeclUDAs(fdecl, irFunc);
|
||||
|
||||
if(irFunc->dynamicCompile) {
|
||||
declareDynamicCompiledFunction(gIR, irFunc);
|
||||
}
|
||||
|
||||
if (irFunc->targetCpuOverridden ||
|
||||
irFunc->targetFeaturesOverridden) {
|
||||
gIR->targetCpuOrFeaturesOverridden.push_back(irFunc);
|
||||
}
|
||||
|
||||
// main
|
||||
if (fdecl->isMain()) {
|
||||
// Detect multiple main functions, which is disallowed. DMD checks this
|
||||
|
@ -934,6 +944,12 @@ void DtoDefineFunction(FuncDeclaration *fd, bool linkageAvailableExternally) {
|
|||
return;
|
||||
}
|
||||
|
||||
SCOPE_EXIT {
|
||||
if (irFunc->dynamicCompile) {
|
||||
defineDynamicCompiledFunction(gIR, irFunc);
|
||||
}
|
||||
};
|
||||
|
||||
// debug info
|
||||
irFunc->diSubprogram = gIR->DBuilder.EmitSubProgram(fd);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue