mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-30 23:20:40 +03:00
Support generic ldc.attributes.llvmAttr UDAs for function parameters
This commit is contained in:
parent
1fdf330346
commit
cc336d6df1
5 changed files with 96 additions and 51 deletions
|
@ -603,6 +603,11 @@ void DtoDeclareFunction(FuncDeclaration *fdecl) {
|
|||
// add func to IRFunc
|
||||
irFunc->setLLVMFunc(func);
|
||||
|
||||
// First apply the TargetMachine attributes, such that they can be overridden
|
||||
// by UDAs.
|
||||
applyTargetMachineAttributes(*func, *gTargetMachine);
|
||||
applyFuncDeclUDAs(fdecl, irFunc);
|
||||
|
||||
// parameter attributes
|
||||
if (!DtoIsIntrinsic(fdecl)) {
|
||||
applyParamAttrsToLLFunc(f, getIrFunc(fdecl)->irFty, func);
|
||||
|
@ -611,11 +616,6 @@ void DtoDeclareFunction(FuncDeclaration *fdecl) {
|
|||
}
|
||||
}
|
||||
|
||||
// First apply the TargetMachine attributes, such that they can be overridden
|
||||
// by UDAs.
|
||||
applyTargetMachineAttributes(*func, *gTargetMachine);
|
||||
applyFuncDeclUDAs(fdecl, irFunc);
|
||||
|
||||
if(irFunc->isDynamicCompiled()) {
|
||||
declareDynamicCompiledFunction(gIR, irFunc);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue