Finally implement rewriting global initializers which use external functions
authorMisha Brukman <brukman+llvm@gmail.com>
Mon, 19 Apr 2004 01:12:01 +0000 (01:12 +0000)
committerMisha Brukman <brukman+llvm@gmail.com>
Mon, 19 Apr 2004 01:12:01 +0000 (01:12 +0000)
commitdc7fef83dcab053f86119d00478e6b008166fcf5
tree627786042021b1bd9cd372eb9eb2b3f08fc360e3
parent4e77cc46ac688e7bee98747049f90e19e2902227
Finally implement rewriting global initializers which use external functions
by creating an internal wrapper function with same signature as the external
function, and use it instead of the "real" function.

The wrapper then calls the external function using the same JIT function
resolution API that has been used before for rewriting instructions, since the
wrapper has an explicit call instruction which we can rewrite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13054 91177308-0d34-0410-b5e6-96231b3b80d8
tools/bugpoint/Miscompilation.cpp