Mercurial > projects > ldc
changeset 1217:00a84912c689
Remove 'noalias' and 'nocapture' from %.nest_arg. They no longer apply now that
it may point to a struct containing variables from outer functions.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Wed, 15 Apr 2009 20:59:21 +0200 |
parents | 033f18ec1371 |
children | 7977096f0e49 |
files | gen/functions.cpp gen/tocall.cpp |
diffstat | 2 files changed, 2 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/gen/functions.cpp Wed Apr 15 20:59:19 2009 +0200 +++ b/gen/functions.cpp Wed Apr 15 20:59:21 2009 +0200 @@ -89,7 +89,7 @@ // and nested functions else if (nesttype) { - f->fty.arg_nest = new IrFuncTyArg(nesttype, false, NoAlias | NoCapture); + f->fty.arg_nest = new IrFuncTyArg(nesttype, false); lidx++; }
--- a/gen/tocall.cpp Wed Apr 15 20:59:19 2009 +0200 +++ b/gen/tocall.cpp Wed Apr 15 20:59:21 2009 +0200 @@ -358,16 +358,7 @@ { Attr.Index = retinptr ? 2 : 1; Attr.Attrs = tf->fty.arg_nest->attrs; - // For delegates, we can't assume 'nest' is noalias and nocapture - // (like we can with nested functions) since it might actually be - // a 'this', and thus neither attribute generally applies to it. - // TODO: don't remove nocapture if it's a "pure" delegate? - if (delegatecall) { - Attr.Attrs &= ~(llvm::Attribute::NoAlias | llvm::Attribute::NoCapture); - } - // LLVM doesn't like it when no bits are set... - if (Attr.Attrs) - attrs.push_back(Attr); + attrs.push_back(Attr); } }