LLVM API Documentation

Public Member Functions
llvm::DebugRecVH Class Reference

#include <LLVMContextImpl.h>

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

List of all members.

Public Member Functions

 DebugRecVH (MDNode *n, LLVMContextImpl *ctx, int idx)
MDNodeget () const
void deleted () override
void allUsesReplacedWith (Value *VNew) override

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 215 of file LLVMContextImpl.h.


Constructor & Destructor Documentation

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

Definition at line 225 of file LLVMContextImpl.h.


Member Function Documentation

void DebugRecVH::allUsesReplacedWith ( Value ) [override, 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 299 of file DebugLoc.cpp.

References deleted(), llvm::dyn_cast(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::erase(), 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 ( ) [override, 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 256 of file DebugLoc.cpp.

References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::erase(), 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 228 of file LLVMContextImpl.h.

References llvm::ValueHandleBase::getValPtr().


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