LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
llvm::DebugRecVH Class Reference

#include <LLVMContextImpl.h>

Inheritance diagram for llvm::DebugRecVH:
Inheritance graph
[legend]
Collaboration diagram for llvm::DebugRecVH:
Collaboration graph
[legend]

Public Member Functions

 DebugRecVH (MDNode *n, LLVMContextImpl *ctx, int idx)
 
MDNodeget () const
 
virtual void deleted ()
 
virtual void allUsesReplacedWith (Value *VNew)
 
- Public Member Functions inherited from llvm::CallbackVH
 CallbackVH ()
 
 CallbackVH (Value *P)
 
 operator Value * () const
 
- Public Member Functions inherited from llvm::ValueHandleBase
 ValueHandleBase (HandleBaseKind Kind)
 
 ValueHandleBase (HandleBaseKind Kind, Value *V)
 
 ValueHandleBase (HandleBaseKind Kind, const ValueHandleBase &RHS)
 
 ~ValueHandleBase ()
 
Valueoperator= (Value *RHS)
 
Valueoperator= (const ValueHandleBase &RHS)
 
Valueoperator-> () const
 
Valueoperator* () const
 

Additional Inherited Members

- Static Public Member Functions inherited from llvm::ValueHandleBase
static void ValueIsDeleted (Value *V)
 
static void ValueIsRAUWd (Value *Old, Value *New)
 
- Protected Types inherited from llvm::ValueHandleBase
enum  HandleBaseKind { Assert, Callback, Tracking, Weak }
 
- Protected Member Functions inherited from llvm::CallbackVH
 CallbackVH (const CallbackVH &RHS)
 
virtual ~CallbackVH ()
 
void setValPtr (Value *P)
 
- Protected Member Functions inherited from llvm::ValueHandleBase
ValuegetValPtr () const
 
void setValPtrInt (unsigned K)
 
unsigned getValPtrInt () const
 
- Static Protected Member Functions inherited from llvm::ValueHandleBase
static bool isValid (Value *V)
 

Detailed Description

DebugRecVH - This is a CallbackVH used to keep the Scope -> index maps up to date as MDNodes mutate. This class is implemented in DebugLoc.cpp.

Definition at line 212 of file LLVMContextImpl.h.

Constructor & Destructor Documentation

llvm::DebugRecVH::DebugRecVH ( MDNode n,
LLVMContextImpl ctx,
int  idx 
)
inline

Definition at line 222 of file LLVMContextImpl.h.

Member Function Documentation

void DebugRecVH::allUsesReplacedWith ( Value )
virtual

Called when this->getValPtr()->replaceAllUsesWith(new_value) is called, before any of the uses have actually been replaced. If WeakVH were implemented as a CallbackVH, it would use this method to call setValPtr(new_value). AssertingVH would do nothing in this method.

Reimplemented from llvm::CallbackVH.

Definition at line 256 of file DebugLoc.cpp.

References deleted(), llvm::dyn_cast(), llvm::MDNode::get(), llvm::LLVMContextImpl::getOrAddScopeInlinedAtIdxEntry(), llvm::LLVMContextImpl::getOrAddScopeRecordIdxEntry(), llvm::LLVMContextImpl::ScopeInlinedAtIdx, llvm::LLVMContextImpl::ScopeInlinedAtRecords, llvm::LLVMContextImpl::ScopeRecordIdx, and llvm::CallbackVH::setValPtr().

void DebugRecVH::deleted ( )
virtual

deleted - The MDNode this is pointing to got deleted, so this pointer needs to drop to null and we need remove our entry from the DenseMap.

Reimplemented from llvm::CallbackVH.

Definition at line 213 of file DebugLoc.cpp.

References llvm::MDNode::get(), llvm::LLVMContextImpl::ScopeInlinedAtIdx, llvm::LLVMContextImpl::ScopeInlinedAtRecords, llvm::LLVMContextImpl::ScopeRecordIdx, and llvm::CallbackVH::setValPtr().

Referenced by allUsesReplacedWith().

MDNode* llvm::DebugRecVH::get ( ) const
inline

Definition at line 225 of file LLVMContextImpl.h.

References llvm::ValueHandleBase::getValPtr().


The documentation for this class was generated from the following files: