Mercurial > projects > ldc
changeset 446:7a67dedbf933
Fixed param attrs for return values (not really broken, but would be if more return attrs were added)
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Fri, 01 Aug 2008 18:07:33 +0200 |
parents | cc40db549aea |
children | f7259fa1349c |
files | gen/functions.cpp |
diffstat | 1 files changed, 3 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/gen/functions.cpp Fri Aug 01 17:59:58 2008 +0200 +++ b/gen/functions.cpp Fri Aug 01 18:07:33 2008 +0200 @@ -320,14 +320,11 @@ llvm::ParamAttrsWithIndex PAWI; - // set zext/sext attr on return value if necessary - if (f->next->isintegral() && f->next->size() < PTRSIZE) + // set return value attrs if any + if (f->llvmRetAttrs) { PAWI.Index = 0; - if (f->next->isunsigned()) - PAWI.Attrs = llvm::ParamAttr::ZExt; - else - PAWI.Attrs = llvm::ParamAttr::SExt; + PAWI.Attrs = f->llvmRetAttrs; attrs.push_back(PAWI); }