Emulate TrackingVH using WeakVH
authorSanjoy Das <sanjoy@playingwithpointers.com>
Mon, 1 May 2017 16:28:58 +0000 (16:28 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Mon, 1 May 2017 16:28:58 +0000 (16:28 +0000)
commit8a6238201f015729a47691c62808a23ec8525096
tree30dfa24b8fe0ed4207dd914c1be9e83c14747300
parent99dce428bca45663ee9c4a52fbfe6a0c3c1963a7
Emulate TrackingVH using WeakVH

Summary:
This frees up one slot in the HandleBaseKind enum, which I will use
later to add a new kind of value handle.  The size of the
HandleBaseKind enum is important because we store a HandleBaseKind in
the low two bits of a (in the worst case) 4 byte aligned pointer.

Reviewers: davide, chandlerc

Subscribers: mcrosier, llvm-commits

Differential Revision: https://reviews.llvm.org/D32634

llvm-svn: 301809
llvm/include/llvm/IR/ValueHandle.h
llvm/lib/IR/Value.cpp
llvm/unittests/IR/ValueHandleTest.cpp