Clean up the JITResolver stub/callsite<->function maps.
authorJeffrey Yasskin <jyasskin@google.com>
Mon, 19 Oct 2009 18:49:59 +0000 (18:49 +0000)
committerJeffrey Yasskin <jyasskin@google.com>
Mon, 19 Oct 2009 18:49:59 +0000 (18:49 +0000)
commitebbcef945d33af5252486c1655ec6afdba4f97a7
tree7769cd0350208bc64dad48756e5b6feddfe9bcd0
parentb8f64a72d83b26ca29612081f3906272368a3692
Clean up the JITResolver stub/callsite<->function maps.

The JITResolver maps Functions to their canonical stubs and all callsites for
lazily-compiled functions to their target Functions. To make Function
destruction work, I'm going to need to remove all callsites on destruction, so
this patch also adds the reverse mapping for that.

There was an incorrect assumption in here that the only stub for a function
would be the one caused by needing to lazily compile it, while x86-64 far calls
and dlsym-stubs could also cause such stubs, but I didn't look for a test case
that the assumption broke.

This also adds DenseMapInfo<AssertingVH> so I can use DenseMaps instead of
std::maps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84522 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/ValueHandle.h
lib/ExecutionEngine/JIT/JITEmitter.cpp