comparison gen/tocall.cpp @ 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 9430d4959ab4
children 459b6b6f9a8d
comparison
equal deleted inserted replaced
1216:033f18ec1371 1217:00a84912c689
356 } 356 }
357 else if (tf->fty.arg_nest && tf->fty.arg_nest->attrs) 357 else if (tf->fty.arg_nest && tf->fty.arg_nest->attrs)
358 { 358 {
359 Attr.Index = retinptr ? 2 : 1; 359 Attr.Index = retinptr ? 2 : 1;
360 Attr.Attrs = tf->fty.arg_nest->attrs; 360 Attr.Attrs = tf->fty.arg_nest->attrs;
361 // For delegates, we can't assume 'nest' is noalias and nocapture 361 attrs.push_back(Attr);
362 // (like we can with nested functions) since it might actually be
363 // a 'this', and thus neither attribute generally applies to it.
364 // TODO: don't remove nocapture if it's a "pure" delegate?
365 if (delegatecall) {
366 Attr.Attrs &= ~(llvm::Attribute::NoAlias | llvm::Attribute::NoCapture);
367 }
368 // LLVM doesn't like it when no bits are set...
369 if (Attr.Attrs)
370 attrs.push_back(Attr);
371 } 362 }
372 } 363 }
373 364
374 // handle the rest of the arguments based on param passing style 365 // handle the rest of the arguments based on param passing style
375 366