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

LLVM_ABI void print (raw_ostream &OS) const
 Implement operator<< on Argument.
LLVM_ABI std::optional< int > getValAsInt () const
 Return the value of argument as int.
LLVM_ABI bool isValInt () const
 Check if the argument value can be parsed as int.

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.

Member Function Documentation

◆ getValAsInt()

std::optional< int > Argument::getValAsInt ( ) const

Return the value of argument as int.

Returns the value of a specified key parsed from StringRef.

Definition at line 30 of file Remark.cpp.

References llvm::APInt::getSExtValue(), and Val.

Referenced by isValInt().

◆ isValInt()

bool Argument::isValInt ( ) const

Check if the argument value can be parsed as int.

Definition at line 37 of file Remark.cpp.

References getValAsInt().

◆ print()

void Argument::print ( raw_ostream & OS) const

Implement operator<< on Argument.

Definition at line 45 of file Remark.cpp.

References Key, and Val.

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

Member Data Documentation

◆ Key

◆ Loc

std::optional<RemarkLocation> llvm::remarks::Argument::Loc

◆ Val


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