mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-11 05:16:19 +03:00
Change location of assign to irFty.
If the comment about this function is still right (can be called recursively) then the assignment to irFty should be done after all functions are called. Takes advantage of move assignment, too.
This commit is contained in:
parent
535221e16d
commit
551bce6d18
2 changed files with 8 additions and 4 deletions
|
@ -256,15 +256,15 @@ llvm::FunctionType* DtoFunctionType(Type* type, IrFuncTy &irFty, Type* thistype,
|
||||||
lidx++;
|
lidx++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now we can modify irFty safely.
|
|
||||||
irFty = newIrFty;
|
|
||||||
|
|
||||||
// let the abi rewrite the types as necesary
|
// let the abi rewrite the types as necesary
|
||||||
abi->rewriteFunctionType(f, irFty);
|
abi->rewriteFunctionType(f, newIrFty);
|
||||||
|
|
||||||
// Tell the ABI we're done with this function type
|
// Tell the ABI we're done with this function type
|
||||||
abi->doneWithFunctionType();
|
abi->doneWithFunctionType();
|
||||||
|
|
||||||
|
// Now we can modify irFty safely.
|
||||||
|
irFty = llvm_move(newIrFty);
|
||||||
|
|
||||||
// build the function type
|
// build the function type
|
||||||
std::vector<LLType*> argtypes;
|
std::vector<LLType*> argtypes;
|
||||||
argtypes.reserve(lidx);
|
argtypes.reserve(lidx);
|
||||||
|
|
|
@ -32,4 +32,8 @@
|
||||||
#define HAS_ATTRIBUTES(x) (x)
|
#define HAS_ATTRIBUTES(x) (x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if LDC_LLVM_VER < 302
|
||||||
|
#define llvm_move(value) (value)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue