# HG changeset patch # User Frits van Bommel # Date 1239821961 -7200 # Node ID 00a84912c689919ee7a4dd21f64d07aac58bf854 # Parent 033f18ec137190765ed8d252f34a867c839e17fe Remove 'noalias' and 'nocapture' from %.nest_arg. They no longer apply now that it may point to a struct containing variables from outer functions. diff -r 033f18ec1371 -r 00a84912c689 gen/functions.cpp --- 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++; } diff -r 033f18ec1371 -r 00a84912c689 gen/tocall.cpp --- 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); } }