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