LLVM 24.0.0git
ValueHandle.h
Go to the documentation of this file.
1//===- ValueHandle.h - Value Smart Pointer classes --------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file declares the ValueHandle class and its sub-classes.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_IR_VALUEHANDLE_H
14#define LLVM_IR_VALUEHANDLE_H
15
18#include "llvm/IR/Value.h"
21#include <cassert>
22
23namespace llvm {
24
25/// This is the common base class of value handles.
26///
27/// ValueHandle's are smart pointers to Value's that have special behavior when
28/// the value is deleted or ReplaceAllUsesWith'd. See the specific handles
29/// below for details.
31 friend class Value;
32 friend class ValueHandleHead;
33 template <typename ValueTy> friend class PoisoningVH;
34
35protected:
36 /// This indicates what sub class the handle actually is.
37 ///
38 /// This is to avoid having a vtable for the light-weight handle pointers. The
39 /// fully general Callback version does have a vtable.
41
43 : ValueHandleBase(RHS.PrevPair.getInt(), RHS) {}
44
46 : PrevPair(nullptr, Kind), Val(RHS.getValPtr()) {
47 if (isValid(getValPtr()))
48 AddToExistingUseList(RHS.getPrevPtr());
49 }
50
52 : PrevPair(nullptr, Kind), Val(RHS.getValPtr()) {
53 if (isValid(getValPtr())) {
54 AddToExistingUseList(RHS.getPrevPtr());
55 RHS.RemoveFromUseList();
56 RHS.clearValPtr();
57 }
58 }
59
60private:
62 ValueHandleBase *Next = nullptr;
63 Value *Val = nullptr;
64
65 void setValPtr(Value *V) { Val = V; }
66
67public:
69 : PrevPair(nullptr, Kind) {}
71 : PrevPair(nullptr, Kind), Val(V) {
72 if (isValid(getValPtr()))
73 AddToUseList();
74 }
75
80
82 if (getValPtr() == RHS)
83 return RHS;
84 if (isValid(getValPtr()))
86 setValPtr(RHS);
87 if (isValid(getValPtr()))
88 AddToUseList();
89 return RHS;
90 }
91
93 if (getValPtr() == RHS.getValPtr())
94 return RHS.getValPtr();
95 if (isValid(getValPtr()))
97 setValPtr(RHS.getValPtr());
98 if (isValid(getValPtr()))
99 AddToExistingUseList(RHS.getPrevPtr());
100 return getValPtr();
101 }
102
104 if (getValPtr() == RHS.getValPtr()) {
105 if (this != &RHS) {
106 if (isValid(RHS.getValPtr()))
107 RHS.RemoveFromUseList();
108 RHS.clearValPtr();
109 }
110 return getValPtr();
111 }
112 if (isValid(getValPtr()))
114 setValPtr(RHS.getValPtr());
115 if (isValid(getValPtr())) {
116 AddToExistingUseList(RHS.getPrevPtr());
117 RHS.RemoveFromUseList();
118 RHS.clearValPtr();
119 }
120 return getValPtr();
121 }
122
123 Value *operator->() const { return getValPtr(); }
124 Value &operator*() const {
125 Value *V = getValPtr();
126 assert(V && "Dereferencing deleted ValueHandle");
127 return *V;
128 }
129
130protected:
131 Value *getValPtr() const { return Val; }
132
133 static bool isValid(Value *V) { return V; }
134
135 /// Remove this ValueHandle from its current use list.
137
138 /// Clear the underlying pointer without clearing the use list.
139 ///
140 /// This should only be used if a derived class has manually removed the
141 /// handle from the use list.
142 void clearValPtr() { setValPtr(nullptr); }
143
144public:
145 // Callbacks made from Value.
146 LLVM_ABI static void ValueIsDeleted(Value *V);
147 LLVM_ABI static void ValueIsRAUWd(Value *Old, Value *New);
148
149private:
150 // Internal implementation details.
151 ValueHandleBase **getPrevPtr() const { return PrevPair.getPointer(); }
152 HandleBaseKind getKind() const { return PrevPair.getInt(); }
153 void setPrevPtr(ValueHandleBase **Ptr) { PrevPair.setPointer(Ptr); }
154
155 /// Add this ValueHandle to the use list for V.
156 ///
157 /// List is the address of either the head of the list or a Next node within
158 /// the existing use list.
159 LLVM_ABI void AddToExistingUseList(ValueHandleBase **List);
160
161 /// Add this ValueHandle to the use list after Node.
162 void AddToExistingUseListAfter(ValueHandleBase *Node);
163
164 /// Add this ValueHandle to the use list for V.
165 LLVM_ABI void AddToUseList();
166};
167
168/// A nullable Value handle that is nullable.
169///
170/// This is a value handle that points to a value, and nulls itself
171/// out if that value is deleted.
172class WeakVH : public ValueHandleBase {
173public:
178
179 WeakVH &operator=(const WeakVH &RHS) = default;
180
187
188 operator Value*() const {
189 return getValPtr();
190 }
191};
192
193// Specialize simplify_type to allow WeakVH to participate in
194// dyn_cast, isa, etc.
195template <> struct simplify_type<WeakVH> {
196 using SimpleType = Value *;
197
198 static SimpleType getSimplifiedValue(WeakVH &WVH) { return WVH; }
199};
200template <> struct simplify_type<const WeakVH> {
201 using SimpleType = Value *;
202
203 static SimpleType getSimplifiedValue(const WeakVH &WVH) { return WVH; }
204};
205
206// Specialize DenseMapInfo to allow WeakVH to participate in DenseMap.
207template <> struct DenseMapInfo<WeakVH> {
208 static unsigned getHashValue(const WeakVH &Val) {
210 }
211
212 static bool isEqual(const WeakVH &LHS, const WeakVH &RHS) {
214 }
215};
216
217/// Value handle that is nullable, but tries to track the Value.
218///
219/// This is a value handle that tries hard to point to a Value, even across
220/// RAUW operations, but will null itself out if the value is destroyed. this
221/// is useful for advisory sorts of information, but should not be used as the
222/// key of a map (since the map would have to rearrange itself when the pointer
223/// changes).
248
249// Specialize simplify_type to allow WeakTrackingVH to participate in
250// dyn_cast, isa, etc.
251template <> struct simplify_type<WeakTrackingVH> {
252 using SimpleType = Value *;
253
254 static SimpleType getSimplifiedValue(WeakTrackingVH &WVH) { return WVH; }
255};
256template <> struct simplify_type<const WeakTrackingVH> {
257 using SimpleType = Value *;
258
260 return WVH;
261 }
262};
263
264/// Value handle that asserts if the Value is deleted.
265///
266/// This is a Value Handle that points to a value and asserts out if the value
267/// is destroyed while the handle is still live. This is very useful for
268/// catching dangling pointer bugs and other things which can be non-obvious.
269/// One particularly useful place to use this is as the Key of a map. Dangling
270/// pointer bugs often lead to really subtle bugs that only occur if another
271/// object happens to get allocated to the same address as the old one. Using
272/// an AssertingVH ensures that an assert is triggered as soon as the bad
273/// delete occurs.
274///
275/// Note that an AssertingVH handle does *not* follow values across RAUW
276/// operations. This means that RAUW's need to explicitly update the
277/// AssertingVH's as it moves. This is required because in non-assert mode this
278/// class turns into a trivial wrapper around a pointer.
279template <typename ValueTy>
281#if LLVM_ENABLE_ABI_BREAKING_CHECKS
282 : public ValueHandleBase
283#endif
284{
285 friend struct DenseMapInfo<AssertingVH<ValueTy>>;
286
287#if LLVM_ENABLE_ABI_BREAKING_CHECKS
288 Value *getRawValPtr() const { return ValueHandleBase::getValPtr(); }
289 void setRawValPtr(Value *P) { ValueHandleBase::operator=(P); }
290#else
291 Value *ThePtr;
292 Value *getRawValPtr() const { return ThePtr; }
293 void setRawValPtr(Value *P) { ThePtr = P; }
294#endif
295 // Convert a ValueTy*, which may be const, to the raw Value*.
296 static Value *GetAsValue(Value *V) { return V; }
297 static Value *GetAsValue(const Value *V) { return const_cast<Value*>(V); }
298
299 ValueTy *getValPtr() const { return static_cast<ValueTy *>(getRawValPtr()); }
300 void setValPtr(ValueTy *P) { setRawValPtr(GetAsValue(P)); }
301
302public:
303#if LLVM_ENABLE_ABI_BREAKING_CHECKS
304 AssertingVH() : ValueHandleBase(Assert) {}
305 AssertingVH(ValueTy *P) : ValueHandleBase(Assert, GetAsValue(P)) {}
306 AssertingVH(const AssertingVH &RHS) : ValueHandleBase(Assert, RHS) {}
307 AssertingVH(AssertingVH &&RHS) : ValueHandleBase(Assert, std::move(RHS)) {}
308#else
309 AssertingVH() : ThePtr(nullptr) {}
310 AssertingVH(ValueTy *P) : ThePtr(GetAsValue(P)) {}
311 AssertingVH(const AssertingVH &) = default;
312 AssertingVH(AssertingVH &&RHS) : ThePtr(std::exchange(RHS.ThePtr, nullptr)) {}
313#endif
314
315 operator ValueTy*() const {
316 return getValPtr();
317 }
318
319 ValueTy *operator=(ValueTy *RHS) {
320 setValPtr(RHS);
321 return getValPtr();
322 }
324 setValPtr(RHS.getValPtr());
325 return getValPtr();
326 }
327#if LLVM_ENABLE_ABI_BREAKING_CHECKS
330 return getValPtr();
331 }
332#else
334 ThePtr = std::exchange(RHS.ThePtr, nullptr);
335 return getValPtr();
336 }
337#endif
338
339 ValueTy *operator->() const { return getValPtr(); }
340 ValueTy &operator*() const { return *getValPtr(); }
341};
342
343// Treat AssertingVH<T> like T* inside maps. This also allows using find_as()
344// to look up a value without constructing a value handle.
345template<typename T>
347
348/// Value handle that tracks a Value across RAUW.
349///
350/// TrackingVH is designed for situations where a client needs to hold a handle
351/// to a Value (or subclass) across some operations which may move that value,
352/// but should never destroy it or replace it with some unacceptable type.
353///
354/// It is an error to attempt to replace a value with one of a type which is
355/// incompatible with any of its outstanding TrackingVHs.
356///
357/// It is an error to read from a TrackingVH that does not point to a valid
358/// value. A TrackingVH is said to not point to a valid value if either it
359/// hasn't yet been assigned a value yet or because the value it was tracking
360/// has since been deleted.
361///
362/// Assigning a value to a TrackingVH is always allowed, even if said TrackingVH
363/// no longer points to a valid value.
364template <typename ValueTy> class TrackingVH {
365 WeakTrackingVH InnerHandle;
366
367public:
368 ValueTy *getValPtr() const {
369 assert(InnerHandle.pointsToAliveValue() &&
370 "TrackingVH must be non-null and valid on dereference!");
371
372 // Check that the value is a member of the correct subclass. We would like
373 // to check this property on assignment for better debugging, but we don't
374 // want to require a virtual interface on this VH. Instead we allow RAUW to
375 // replace this value with a value of an invalid type, and check it here.
376 assert(isa<ValueTy>(InnerHandle) &&
377 "Tracked Value was replaced by one with an invalid type!");
378 return cast<ValueTy>(InnerHandle);
379 }
380
381 void setValPtr(ValueTy *P) {
382 // Assigning to non-valid TrackingVH's are fine so we just unconditionally
383 // assign here.
384 InnerHandle = GetAsValue(P);
385 }
386
387 // Convert a ValueTy*, which may be const, to the type the base
388 // class expects.
389 static Value *GetAsValue(Value *V) { return V; }
390 static Value *GetAsValue(const Value *V) { return const_cast<Value*>(V); }
391
392public:
393 TrackingVH() = default;
394 TrackingVH(ValueTy *P) { setValPtr(P); }
395
396 operator ValueTy*() const {
397 return getValPtr();
398 }
399
400 ValueTy *operator=(ValueTy *RHS) {
401 setValPtr(RHS);
402 return getValPtr();
403 }
404
405 ValueTy *operator->() const { return getValPtr(); }
406 ValueTy &operator*() const { return *getValPtr(); }
407};
408
409/// Value handle with callbacks on RAUW and destruction.
410///
411/// This is a value handle that allows subclasses to define callbacks that run
412/// when the underlying Value has RAUW called on it or is destroyed. This
413/// class can be used as the key of a map, as long as the user takes it out of
414/// the map before calling setValPtr() (since the map has to rearrange itself
415/// when the pointer changes). Unlike ValueHandleBase, this class has a vtable.
417 virtual void anchor();
418protected:
419 ~CallbackVH() = default;
420 CallbackVH(const CallbackVH &) = default;
421 CallbackVH &operator=(const CallbackVH &) = default;
422
426
427public:
430 CallbackVH(const Value *P) : CallbackVH(const_cast<Value *>(P)) {}
431
432 operator Value*() const {
433 return getValPtr();
434 }
435
436 /// Callback for Value destruction.
437 ///
438 /// Called when this->getValPtr() is destroyed, inside ~Value(), so you
439 /// may call any non-virtual Value method on getValPtr(), but no subclass
440 /// methods. If WeakTrackingVH were implemented as a CallbackVH, it would use
441 /// this
442 /// method to call setValPtr(NULL). AssertingVH would use this method to
443 /// cause an assertion failure.
444 ///
445 /// All implementations must remove the reference from this object to the
446 /// Value that's being destroyed.
447 virtual void deleted() { setValPtr(nullptr); }
448
449 /// Callback for Value RAUW.
450 ///
451 /// Called when this->getValPtr()->replaceAllUsesWith(new_value) is called,
452 /// _before_ any of the uses have actually been replaced. If WeakTrackingVH
453 /// were
454 /// implemented as a CallbackVH, it would use this method to call
455 /// setValPtr(new_value). AssertingVH would do nothing in this method.
456 virtual void allUsesReplacedWith(Value *) {}
457};
458
459/// Value handle that poisons itself if the Value is deleted.
460///
461/// This is a Value Handle that points to a value and poisons itself if the
462/// value is destroyed while the handle is still live. This is very useful for
463/// catching dangling pointer bugs where an \c AssertingVH cannot be used
464/// because the dangling handle needs to outlive the value without ever being
465/// used.
466///
467/// One particularly useful place to use this is as the Key of a map. Dangling
468/// pointer bugs often lead to really subtle bugs that only occur if another
469/// object happens to get allocated to the same address as the old one. Using
470/// a PoisoningVH ensures that an assert is triggered if looking up a new value
471/// in the map finds a handle from the old value.
472///
473/// Note that a PoisoningVH handle does *not* follow values across RAUW
474/// operations. This means that RAUW's need to explicitly update the
475/// PoisoningVH's as it moves. This is required because in non-assert mode this
476/// class turns into a trivial wrapper around a pointer.
477template <typename ValueTy>
478class PoisoningVH final
479#if LLVM_ENABLE_ABI_BREAKING_CHECKS
480 : public CallbackVH
481#endif
482{
483 friend struct DenseMapInfo<PoisoningVH<ValueTy>>;
484
485 // Convert a ValueTy*, which may be const, to the raw Value*.
486 static Value *GetAsValue(Value *V) { return V; }
487 static Value *GetAsValue(const Value *V) { return const_cast<Value *>(V); }
488
489#if LLVM_ENABLE_ABI_BREAKING_CHECKS
490 /// A flag tracking whether this value has been poisoned.
491 ///
492 /// On delete and RAUW, we leave the value pointer alone so that as a raw
493 /// pointer it produces the same value (and we fit into the same key of
494 /// a hash table, etc), but we poison the handle so that any top-level usage
495 /// will fail.
496 bool Poisoned = false;
497
498 Value *getRawValPtr() const { return ValueHandleBase::getValPtr(); }
499 void setRawValPtr(Value *P) { ValueHandleBase::operator=(P); }
500
501 /// Handle deletion by poisoning the handle.
502 void deleted() override {
503 assert(!Poisoned && "Tried to delete an already poisoned handle!");
504 Poisoned = true;
505 RemoveFromUseList();
506 }
507
508 /// Handle RAUW by poisoning the handle.
509 void allUsesReplacedWith(Value *) override {
510 assert(!Poisoned && "Tried to RAUW an already poisoned handle!");
511 Poisoned = true;
512 RemoveFromUseList();
513 }
514#else // LLVM_ENABLE_ABI_BREAKING_CHECKS
515 Value *ThePtr = nullptr;
516
517 Value *getRawValPtr() const { return ThePtr; }
518 void setRawValPtr(Value *P) { ThePtr = P; }
519#endif
520
521 ValueTy *getValPtr() const {
522#if LLVM_ENABLE_ABI_BREAKING_CHECKS
523 assert(!Poisoned && "Accessed a poisoned value handle!");
524#endif
525 return static_cast<ValueTy *>(getRawValPtr());
526 }
527 void setValPtr(ValueTy *P) { setRawValPtr(GetAsValue(P)); }
528
529public:
530 PoisoningVH() = default;
531#if LLVM_ENABLE_ABI_BREAKING_CHECKS
532 PoisoningVH(ValueTy *P) : CallbackVH(GetAsValue(P)) {}
533 // A poisoned handle is detached from its use list but keeps its raw value
534 // pointer, so its use-list pointers are stale; a copy must not relink through
535 // them.
536 PoisoningVH(const PoisoningVH &RHS) : CallbackVH(), Poisoned(RHS.Poisoned) {
537 if (Poisoned)
538 ValueHandleBase::setValPtr(RHS.getRawValPtr());
539 else
540 setRawValPtr(RHS.getRawValPtr());
541 }
542
543 ~PoisoningVH() {
544 if (Poisoned)
545 clearValPtr();
546 }
547
548 PoisoningVH &operator=(const PoisoningVH &RHS) {
549 if (Poisoned)
550 clearValPtr();
551 if (RHS.Poisoned) {
552 // Detach *this and copy only the raw pointer; see the copy constructor.
553 if (isValid(getRawValPtr()))
554 RemoveFromUseList();
555 ValueHandleBase::setValPtr(RHS.getRawValPtr());
556 } else {
558 }
559 Poisoned = RHS.Poisoned;
560 return *this;
561 }
562#else
563 PoisoningVH(ValueTy *P) : ThePtr(GetAsValue(P)) {}
564#endif
565
566 operator ValueTy *() const { return getValPtr(); }
567
568 ValueTy *operator->() const { return getValPtr(); }
569 ValueTy &operator*() const { return *getValPtr(); }
570};
571
572// Specialize DenseMapInfo to allow PoisoningVH to participate in DenseMap.
573template <typename T> struct DenseMapInfo<PoisoningVH<T>> {
574 static unsigned getHashValue(const PoisoningVH<T> &Val) {
575 return DenseMapInfo<Value *>::getHashValue(Val.getRawValPtr());
576 }
577
578 static bool isEqual(const PoisoningVH<T> &LHS, const PoisoningVH<T> &RHS) {
579 return DenseMapInfo<Value *>::isEqual(LHS.getRawValPtr(),
580 RHS.getRawValPtr());
581 }
582
583 // Allow lookup by T* via find_as(), without constructing a temporary
584 // value handle.
585
586 static unsigned getHashValue(const T *Val) {
588 }
589
590 static bool isEqual(const T *LHS, const PoisoningVH<T> &RHS) {
591 return DenseMapInfo<Value *>::isEqual(LHS, RHS.getRawValPtr());
592 }
593};
594
595} // end namespace llvm
596
597#endif // LLVM_IR_VALUEHANDLE_H
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
aarch64 promote const
#define LLVM_ABI
Definition Compiler.h:215
This file defines DenseMapInfo traits for DenseMap.
#define T
#define P(N)
if(PassOpts->AAPipeline)
This file defines the PointerIntPair class.
static bool isValid(const char C)
Returns true if C is a valid mangled character: <0-9a-zA-Z_>.
Value * RHS
Value * LHS
Value handle that asserts if the Value is deleted.
ValueTy * operator=(ValueTy *RHS)
ValueTy & operator*() const
ValueTy * operator=(const AssertingVH< ValueTy > &RHS)
ValueTy * operator->() const
AssertingVH(ValueTy *P)
AssertingVH(const AssertingVH &)=default
ValueTy * operator=(AssertingVH< ValueTy > &&RHS)
AssertingVH(AssertingVH &&RHS)
Value handle with callbacks on RAUW and destruction.
virtual void allUsesReplacedWith(Value *)
Callback for Value RAUW.
CallbackVH(const Value *P)
CallbackVH & operator=(const CallbackVH &)=default
CallbackVH(Value *P)
CallbackVH(const CallbackVH &)=default
virtual void deleted()
Callback for Value destruction.
void setValPtr(Value *P)
~CallbackVH()=default
PointerIntPair - This class implements a pair of a pointer and small integer.
IntType getInt() const
PointerTy getPointer() const
Value handle that poisons itself if the Value is deleted.
ValueTy & operator*() const
PoisoningVH()=default
ValueTy * operator->() const
PoisoningVH(ValueTy *P)
ValueTy * operator->() const
ValueTy * getValPtr() const
static Value * GetAsValue(const Value *V)
static Value * GetAsValue(Value *V)
ValueTy & operator*() const
void setValPtr(ValueTy *P)
ValueTy * operator=(ValueTy *RHS)
TrackingVH(ValueTy *P)
TrackingVH()=default
This is the common base class of value handles.
Definition ValueHandle.h:30
Value & operator*() const
ValueHandleBase(HandleBaseKind Kind, Value *V)
Definition ValueHandle.h:70
friend class ValueHandleHead
Definition ValueHandle.h:32
static bool isValid(Value *V)
LLVM_ABI void RemoveFromUseList()
Remove this ValueHandle from its current use list.
Definition Value.cpp:1217
ValueHandleBase(HandleBaseKind Kind, ValueHandleBase &&RHS)
Definition ValueHandle.h:51
Value * operator->() const
Value * operator=(Value *RHS)
Definition ValueHandle.h:81
Value * operator=(const ValueHandleBase &RHS)
Definition ValueHandle.h:92
Value * getValPtr() const
Value * operator=(ValueHandleBase &&RHS)
static LLVM_ABI void ValueIsDeleted(Value *V)
Definition Value.cpp:1241
void clearValPtr()
Clear the underlying pointer without clearing the use list.
friend class PoisoningVH
Definition ValueHandle.h:33
ValueHandleBase(HandleBaseKind Kind)
Definition ValueHandle.h:68
static LLVM_ABI void ValueIsRAUWd(Value *Old, Value *New)
Definition Value.cpp:1294
HandleBaseKind
This indicates what sub class the handle actually is.
Definition ValueHandle.h:40
ValueHandleBase(HandleBaseKind Kind, const ValueHandleBase &RHS)
Definition ValueHandle.h:45
ValueHandleBase(const ValueHandleBase &RHS)
Definition ValueHandle.h:42
LLVM Value Representation.
Definition Value.h:75
Value handle that is nullable, but tries to track the Value.
WeakTrackingVH(const WeakTrackingVH &RHS)
Value * operator=(const ValueHandleBase &RHS)
Value * operator=(Value *RHS)
WeakTrackingVH & operator=(const WeakTrackingVH &RHS)=default
bool pointsToAliveValue() const
A nullable Value handle that is nullable.
WeakVH(Value *P)
WeakVH(const WeakVH &RHS)
WeakVH & operator=(const WeakVH &RHS)=default
Value * operator=(const ValueHandleBase &RHS)
Value * operator=(Value *RHS)
This is an optimization pass for GlobalISel generic memory operations.
bool isa(const From &Val)
isa<X> - Return true if the parameter to the template is an instance of one of the template type argu...
Definition Casting.h:547
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.
Definition Casting.h:559
RelativeUniformCounterPtr ValuesPtrExpr VTableAddr Next
Definition InstrProf.h:147
Implement std::hash so that hash_code can be used in STL containers.
Definition BitVector.h:878
static bool isEqual(const T *LHS, const PoisoningVH< T > &RHS)
static unsigned getHashValue(const T *Val)
static unsigned getHashValue(const PoisoningVH< T > &Val)
static bool isEqual(const PoisoningVH< T > &LHS, const PoisoningVH< T > &RHS)
static bool isEqual(const WeakVH &LHS, const WeakVH &RHS)
static unsigned getHashValue(const WeakVH &Val)
An information struct used to provide DenseMap with the various necessary components for a given valu...
static SimpleType getSimplifiedValue(WeakTrackingVH &WVH)
static SimpleType getSimplifiedValue(WeakVH &WVH)
static SimpleType getSimplifiedValue(const WeakVH &WVH)
Define a template that can be specialized by smart pointers to reflect the fact that they are automat...
Definition Casting.h:34
static SimpleType & getSimplifiedValue(From &Val)
Definition Casting.h:38