aboutsummaryrefslogtreecommitdiff
path: root/lib/Bitcode/Reader/BitcodeReader.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-31 22:11:05 +0000
committerChris Lattner <sabre@nondot.org>2009-03-31 22:11:05 +0000
commit722272df41d8de9c7683811b7bd8e901ee2f2785 (patch)
tree1ef9fbc2d123af5224e5b2f5b2fb63b12b51c9dc /lib/Bitcode/Reader/BitcodeReader.h
parentf385167b85abf9cb63a0bec94732d7185ee74e36 (diff)
Add two new classes: WeakVH and AssertingVH. These are both "ValueHandles",
which are effectively smart pointers to Value*'s. They are both very light weight and simple, and react to values being destroyed or being RAUW'd. WeakVN does a best effort to follow a value around, including through RAUW operations and will get nulled out of the value is destroyed. This is useful for the eventual "metadata that references a value" work, because it is a reference to a value that does not show up on its use_* list. AssertingVH is a pointer that compiles down to a dumb raw pointer when assertions are disabled. When enabled, it emits an assertion if the pointed-to value is destroyed while it is still being referenced. This is very useful for Maps and other things, and should have caught the recent bugs in CallGraph and Reassociate, for example. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68149 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Reader/BitcodeReader.h')
0 files changed, 0 insertions, 0 deletions