Hitherto the IRForTarget infrastructure has mainly
authorSean Callanan <scallanan@apple.com>
Fri, 28 Jun 2013 21:44:15 +0000 (21:44 +0000)
committerSean Callanan <scallanan@apple.com>
Fri, 28 Jun 2013 21:44:15 +0000 (21:44 +0000)
commit1f9db3ebe36a2d187c33f61638c0d1f13425b307
tree224de5ae2d5e02225b4d304488b34c86ad6ed4a4
parente9672d0448384ecedac4e2fb98010ee182455084
Hitherto the IRForTarget infrastructure has mainly
been suitable for preparing a single IR function
for operation in the target.  However, using blocks
and lambdas creates other IR functions that also
need to be processed.

I have audited IRForTarget to make it process
multiple functions.  Where IRForTarget would add
new instructions at the beginning of the main
expression function, it now adds them on-demand
in the function where they are needed.  This is
enabled by a system of FunctionValueCaches, which
invoke a lambda to create or derive the values as
needed, or report the result of that lambda if it
has already been called for the given function.

<rdar://problem/14180236>

llvm-svn: 185224
lldb/include/lldb/Expression/IRForTarget.h
lldb/source/Expression/IRForTarget.cpp