LLVM 19.0.0git
Public Member Functions | List of all members
llvm::DbgRecordParamRef< T > Class Template Reference

A typed tracking MDNode reference that does not require a definition for its parameter type. More...

#include "llvm/IR/DebugProgramInstruction.h"

Inheritance diagram for llvm::DbgRecordParamRef< T >:
Inheritance graph
[legend]

Public Member Functions

 DbgRecordParamRef ()=default
 
 DbgRecordParamRef (const T *Param)
 Construct from the templated type.
 
 DbgRecordParamRef (const MDNode *Param)
 Construct from an MDNode.
 
 operator bool () const
 Check for null.
 
MDNodegetAsMDNode () const
 Return this as a MDNode.
 
bool operator== (const DbgRecordParamRef &Other) const
 
bool operator!= (const DbgRecordParamRef &Other) const
 
Tget () const
 Get the underlying type.
 
 operator T* () const
 
Toperator-> () const
 
Toperator* () const
 

Detailed Description

template<typename T>
class llvm::DbgRecordParamRef< T >

A typed tracking MDNode reference that does not require a definition for its parameter type.

Necessary to avoid including DebugInfoMetadata.h, which has a significant impact on compile times if included in this file.

Definition at line 76 of file DebugProgramInstruction.h.

Constructor & Destructor Documentation

◆ DbgRecordParamRef() [1/3]

template<typename T >
llvm::DbgRecordParamRef< T >::DbgRecordParamRef ( )
default

◆ DbgRecordParamRef() [2/3]

template<typename T >
llvm::DbgRecordParamRef< T >::DbgRecordParamRef ( const T Param)

Construct from the templated type.

Definition at line 17 of file DebugProgramInstruction.cpp.

◆ DbgRecordParamRef() [3/3]

template<typename T >
llvm::DbgRecordParamRef< T >::DbgRecordParamRef ( const MDNode Param)
explicit

Construct from an MDNode.

Note: if Param does not have the template type, a verifier check will fail, and accessors will crash. However, construction from other nodes is supported in order to handle forward references when reading textual IR.

Definition at line 20 of file DebugProgramInstruction.cpp.

Member Function Documentation

◆ get()

template<typename T >
T * llvm::DbgRecordParamRef< T >::get

Get the underlying type.

Precondition
!*this or isa<T>(getAsMDNode()).

Definition at line 23 of file DebugProgramInstruction.cpp.

References llvm::Ref.

Referenced by llvm::DbgRecordParamRef< llvm::DIExpression >::operator llvm::DIExpression *(), llvm::DbgRecordParamRef< T >::operator*(), and llvm::DbgRecordParamRef< T >::operator->().

◆ getAsMDNode()

template<typename T >
MDNode * llvm::DbgRecordParamRef< T >::getAsMDNode ( ) const
inline

Return this as a MDNode.

Definition at line 110 of file DebugProgramInstruction.h.

◆ operator bool()

template<typename T >
llvm::DbgRecordParamRef< T >::operator bool ( ) const
inlineexplicit

Check for null.

Check for null in a way that is safe with broken debug info.

Definition at line 107 of file DebugProgramInstruction.h.

◆ operator T*()

template<typename T >
llvm::DbgRecordParamRef< T >::operator T* ( ) const
inline

Definition at line 99 of file DebugProgramInstruction.h.

◆ operator!=()

template<typename T >
bool llvm::DbgRecordParamRef< T >::operator!= ( const DbgRecordParamRef< T > &  Other) const
inline

Definition at line 115 of file DebugProgramInstruction.h.

References llvm::Other.

◆ operator*()

template<typename T >
T & llvm::DbgRecordParamRef< T >::operator* ( ) const
inline

Definition at line 101 of file DebugProgramInstruction.h.

References llvm::DbgRecordParamRef< T >::get().

◆ operator->()

template<typename T >
T * llvm::DbgRecordParamRef< T >::operator-> ( ) const
inline

Definition at line 100 of file DebugProgramInstruction.h.

References llvm::DbgRecordParamRef< T >::get().

◆ operator==()

template<typename T >
bool llvm::DbgRecordParamRef< T >::operator== ( const DbgRecordParamRef< T > &  Other) const
inline

Definition at line 112 of file DebugProgramInstruction.h.

References llvm::Other.


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