LLVM 22.0.0git
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 >:
[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 77 of file DebugProgramInstruction.h.

Constructor & Destructor Documentation

◆ DbgRecordParamRef() [1/3]

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

References T.

Referenced by operator!=(), and operator==().

◆ DbgRecordParamRef() [2/3]

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

Construct from the templated type.

Definition at line 18 of file DebugProgramInstruction.cpp.

References T.

◆ 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 21 of file DebugProgramInstruction.cpp.

Member Function Documentation

◆ get()

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

Get the underlying type.

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

Definition at line 24 of file DebugProgramInstruction.cpp.

References llvm::cast(), and T.

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

◆ getAsMDNode()

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

Return this as a MDNode.

Definition at line 111 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 108 of file DebugProgramInstruction.h.

◆ operator T*()

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

Definition at line 100 of file DebugProgramInstruction.h.

◆ operator!=()

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

Definition at line 116 of file DebugProgramInstruction.h.

References DbgRecordParamRef(), and llvm::Other.

◆ operator*()

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

Definition at line 102 of file DebugProgramInstruction.h.

References get(), and T.

◆ operator->()

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

Definition at line 101 of file DebugProgramInstruction.h.

References get(), and T.

◆ operator==()

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

Definition at line 113 of file DebugProgramInstruction.h.

References DbgRecordParamRef(), and llvm::Other.


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