(resending with correct list)

Chandler Carruth <chandlerc@gmail.com> writes:
> Author: chandlerc
> Date: Wed Nov 20 20:11:31 2013
> New Revision: 195304
>
> URL: http://llvm.org/viewvc/llvm-project?rev=195304&view=rev
> Log:
> [PM] Add a module analysis pass proxy for the function analysis manager.
>
> This proxy will fill the role of proxying invalidation events down IR
> unit layers so that when a module changes we correctly invalidate
> function analyses. Currently this is a very coarse solution -- any
> change blows away the entire thing -- but the next step is to make
> invalidation handling more nuanced so that we can propagate specific
> amounts of invalidation from one layer to the next.
>
 ...
>
> +FunctionAnalysisModuleProxy::Result
> +FunctionAnalysisModuleProxy::run(Module *M) {
> +  assert(FAM.empty() && "Function analyses ran prior to the module proxy!");
> +  return Result(FAM);
> +}

So here's some commit necromancy, but how's this supposed to work if we
run the ModulePassManager on more than one module? `FAM` will have been
populated with the functions from the previous module, and since we
haven't really worked out how we're going to invalidate caches we'll
often have results from the previous module's functions at this point.

Test case that hits the assert and patch to awkwardly comment out the
problematic assert attached.

