mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-07-21 06:35:21 +02:00
Fixed param attrs for return values (not really broken, but would be if more return attrs were added)
This commit is contained in:
@@ -320,14 +320,11 @@ static void set_param_attrs(TypeFunction* f, llvm::Function* func, FuncDeclarati
|
|||||||
|
|
||||||
llvm::ParamAttrsWithIndex PAWI;
|
llvm::ParamAttrsWithIndex PAWI;
|
||||||
|
|
||||||
// set zext/sext attr on return value if necessary
|
// set return value attrs if any
|
||||||
if (f->next->isintegral() && f->next->size() < PTRSIZE)
|
if (f->llvmRetAttrs)
|
||||||
{
|
{
|
||||||
PAWI.Index = 0;
|
PAWI.Index = 0;
|
||||||
if (f->next->isunsigned())
|
PAWI.Attrs = f->llvmRetAttrs;
|
||||||
PAWI.Attrs = llvm::ParamAttr::ZExt;
|
|
||||||
else
|
|
||||||
PAWI.Attrs = llvm::ParamAttr::SExt;
|
|
||||||
attrs.push_back(PAWI);
|
attrs.push_back(PAWI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user