LLVM 22.0.0git
llvm::remarks::Argument Struct Reference

A key-value pair with a debug location that is used to display the remarks at the right place in the source. More...

#include "llvm/Remarks/Remark.h"

Public Member Functions

 Argument ()=default
 Argument (StringRef Key, StringRef Val)
LLVM_ABI void print (raw_ostream &OS) const
 Implement operator<< on Argument.
template<typename T>
std::optional< TgetValAsInt (unsigned Radix=10) const
 Return the value of argument as an integer of type T.

Public Attributes

StringRef Key
StringRef Val
std::optional< RemarkLocationLoc

Detailed Description

A key-value pair with a debug location that is used to display the remarks at the right place in the source.

Definition at line 47 of file Remark.h.

Constructor & Destructor Documentation

◆ Argument() [1/2]

llvm::remarks::Argument::Argument ( )
default

◆ Argument() [2/2]

llvm::remarks::Argument::Argument ( StringRef Key,
StringRef Val )
inline

Definition at line 55 of file Remark.h.

References Key, and Val.

Member Function Documentation

◆ getValAsInt()

template<typename T>
std::optional< T > llvm::remarks::Argument::getValAsInt ( unsigned Radix = 10) const
inline

Return the value of argument as an integer of type T.

Definition at line 62 of file Remark.h.

References T, and Val.

◆ print()

void Argument::print ( raw_ostream & OS) const

Implement operator<< on Argument.

Definition at line 43 of file Remark.cpp.

References Key, and Val.

Referenced by llvm::remarks::operator<<().

Member Data Documentation

◆ Key

◆ Loc

◆ Val


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