diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-07-30 20:21:55 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-07-30 20:21:55 +0000 |
commit | 972a3680bdd95f2e9d6316b391f1c47513dc78cc (patch) | |
tree | 141d4b2c17286c82fcd174cbbaf4451006f2da5d /lib/CodeGen/CGVTables.cpp | |
parent | e5db09cf6772332c14dc7dc541de53f918f89125 (diff) |
[analyzer] Introduce a CallEventManager to keep a pool of CallEvents.
This allows us to get around the C++ "virtual constructor" problem
when we'd like to create a CallEvent from an ExplodedNode, an inlined
StackFrameContext, or another CallEvent. The solution has three parts:
- CallEventManager uses a BumpPtrAllocator to allocate CallEvent-sized
memory blocks. It also keeps a cache of freed CallEvents for reuse.
- CallEvents all have protected copy constructors, along with cloneTo()
methods that use placement new to copy into CallEventManager-managed
memory, vtables intact.
- CallEvents owned by CallEventManager are now wrapped in an
IntrusiveRefCntPtr. Going forwards, it's probably a good idea to create
ALL CallEvents through the CallEventManager, so that we don't accidentally
try to reclaim a stack-allocated CallEvent.
All of this machinery is currently unused but will be put into use shortly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160983 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVTables.cpp')
0 files changed, 0 insertions, 0 deletions