LLVM 23.0.0git
llvm::instrumentor::IRTArg Struct Reference

} More...

#include "llvm/Transforms/IPO/Instrumentor.h"

Public Types

enum  IRArgFlagTy {
  NONE = 0 , STRING = 1 << 0 , REPLACABLE = 1 << 1 , REPLACABLE_CUSTOM = 1 << 2 ,
  POTENTIALLY_INDIRECT = 1 << 3 , INDIRECT_HAS_SIZE = 1 << 4 , LAST
}
 Flags describing the possible properties of an argument. More...

Public Member Functions

 IRTArg (Type *Ty, StringRef Name, StringRef Description, unsigned Flags, GetterCallbackTy GetterCB, SetterCallbackTy SetterCB=nullptr, bool Enabled=true, bool NoCache=false)
 Construct an argument.

Public Attributes

bool Enabled
 Whether the argument is enabled and should be passed to the function call.
TypeTy
 The type of the argument.
StringRef Name
 A string with the name of the argument.
StringRef Description
 A string with the description of the argument.
unsigned Flags
 The flags that describe the properties of the argument.
GetterCallbackTy GetterCB
 The callback for getting the value of the argument.
SetterCallbackTy SetterCB
 The callback for consuming the output value of the argument.
bool NoCache
 Whether the argument value can be cached between the PRE and POST calls.

Detailed Description

}

Helper to represent an argument to an instrumentation runtime function.

Definition at line 55 of file Instrumentor.h.

Member Enumeration Documentation

◆ IRArgFlagTy

Flags describing the possible properties of an argument.

Enumerator
NONE 
STRING 
REPLACABLE 
REPLACABLE_CUSTOM 
POTENTIALLY_INDIRECT 
INDIRECT_HAS_SIZE 
LAST 

Definition at line 57 of file Instrumentor.h.

Constructor & Destructor Documentation

◆ IRTArg()

llvm::instrumentor::IRTArg::IRTArg ( Type * Ty,
StringRef Name,
StringRef Description,
unsigned Flags,
GetterCallbackTy GetterCB,
SetterCallbackTy SetterCB = nullptr,
bool Enabled = true,
bool NoCache = false )
inline

Construct an argument.

Definition at line 68 of file Instrumentor.h.

References Description, Enabled, Flags, GetterCB, llvm::move(), Name, NoCache, SetterCB, and Ty.

Member Data Documentation

◆ Description

StringRef llvm::instrumentor::IRTArg::Description

A string with the description of the argument.

Definition at line 85 of file Instrumentor.h.

Referenced by IRTArg().

◆ Enabled

bool llvm::instrumentor::IRTArg::Enabled

Whether the argument is enabled and should be passed to the function call.

Definition at line 76 of file Instrumentor.h.

Referenced by IRTArg().

◆ Flags

unsigned llvm::instrumentor::IRTArg::Flags

The flags that describe the properties of the argument.

Multiple flags may be specified.

Definition at line 89 of file Instrumentor.h.

Referenced by IRTArg(), llvm::instrumentor::IRTCallDescription::isPotentiallyIndirect(), llvm::instrumentor::IRTCallDescription::isReplacable(), and llvm::instrumentor::readConfigFromJSON().

◆ GetterCB

GetterCallbackTy llvm::instrumentor::IRTArg::GetterCB

The callback for getting the value of the argument.

Definition at line 92 of file Instrumentor.h.

Referenced by IRTArg().

◆ Name

StringRef llvm::instrumentor::IRTArg::Name

A string with the name of the argument.

Definition at line 82 of file Instrumentor.h.

Referenced by IRTArg().

◆ NoCache

bool llvm::instrumentor::IRTArg::NoCache

Whether the argument value can be cached between the PRE and POST calls.

Definition at line 98 of file Instrumentor.h.

Referenced by IRTArg().

◆ SetterCB

SetterCallbackTy llvm::instrumentor::IRTArg::SetterCB

The callback for consuming the output value of the argument.

Definition at line 95 of file Instrumentor.h.

Referenced by IRTArg().

◆ Ty

Type* llvm::instrumentor::IRTArg::Ty

The type of the argument.

Definition at line 79 of file Instrumentor.h.

Referenced by IRTArg().


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