LLVM 20.0.0git
|
A single uniqued string. More...
#include "llvm/IR/Metadata.h"
Public Types | |
using | iterator = StringRef::iterator |
Public Types inherited from llvm::Metadata | |
enum | MetadataKind |
Public Member Functions | |
MDString (const MDString &)=delete | |
MDString & | operator= (MDString &&)=delete |
MDString & | operator= (const MDString &)=delete |
StringRef | getString () const |
unsigned | getLength () const |
iterator | begin () const |
Pointer to the first byte of the string. | |
iterator | end () const |
Pointer to one byte past the end of the string. | |
const unsigned char * | bytes_begin () const |
const unsigned char * | bytes_end () const |
Public Member Functions inherited from llvm::Metadata | |
unsigned | getMetadataID () const |
void | dump () const |
User-friendly dump. | |
void | dump (const Module *M) const |
void | print (raw_ostream &OS, const Module *M=nullptr, bool IsForDebug=false) const |
Print. | |
void | print (raw_ostream &OS, ModuleSlotTracker &MST, const Module *M=nullptr, bool IsForDebug=false) const |
void | printAsOperand (raw_ostream &OS, const Module *M=nullptr) const |
Print as operand. | |
void | printAsOperand (raw_ostream &OS, ModuleSlotTracker &MST, const Module *M=nullptr) const |
Static Public Member Functions | |
static MDString * | get (LLVMContext &Context, StringRef Str) |
static MDString * | get (LLVMContext &Context, const char *Str) |
static bool | classof (const Metadata *MD) |
Methods for support type inquiry through isa, cast, and dyn_cast. | |
Friends | |
class | StringMapEntryStorage< MDString > |
Additional Inherited Members | |
Protected Types inherited from llvm::Metadata | |
enum | StorageType { Uniqued , Distinct , Temporary } |
Active type of storage. More... | |
Protected Member Functions inherited from llvm::Metadata | |
Metadata (unsigned ID, StorageType Storage) | |
~Metadata ()=default | |
void | handleChangedOperand (void *, Metadata *) |
Default handling of a changed operand, which asserts. | |
Protected Attributes inherited from llvm::Metadata | |
unsigned char | Storage: 7 |
Storage flag for non-uniqued, otherwise unowned, metadata. | |
unsigned char | SubclassData1: 1 |
unsigned short | SubclassData16 = 0 |
unsigned | SubclassData32 = 0 |
A single uniqued string.
These are used to efficiently contain a byte sequence for metadata. MDString is always unnamed.
Definition at line 720 of file Metadata.h.
Definition at line 741 of file Metadata.h.
|
inline |
Pointer to the first byte of the string.
Definition at line 744 of file Metadata.h.
References llvm::StringRef::begin(), and getString().
Definition at line 749 of file Metadata.h.
References llvm::StringRef::bytes_begin(), and getString().
Definition at line 750 of file Metadata.h.
References llvm::StringRef::bytes_end(), and getString().
Methods for support type inquiry through isa, cast, and dyn_cast.
Definition at line 753 of file Metadata.h.
References llvm::Metadata::getMetadataID().
|
inline |
Pointer to one byte past the end of the string.
Definition at line 747 of file Metadata.h.
References llvm::StringRef::end(), and getString().
|
inlinestatic |
Definition at line 733 of file Metadata.h.
References get().
|
static |
Definition at line 606 of file Metadata.cpp.
Referenced by llvm::Module::addModuleFlag(), AddRuntimeUnrollDisableMetaData(), llvm::OpenMPIRBuilder::applySimd(), convertToLocalCopy(), createMIBNode(), llvm::OpenMPIRBuilder::createOffloadEntriesAndInfoMetadata(), llvm::OpenMPIRBuilder::createOffloadEntry(), llvm::createPGONameMetadata(), llvm::dxil::createShaderModelMD(), llvm::MDBuilder::createString(), createStringMetadata(), llvm::DIBuilder::createTemplateTemplateParameter(), DisableAllLoopOptsOnLoop(), llvm::embedBufferInModule(), llvm::emitAMDGPUPrintfCall(), get(), llvm::dxil::ResourceInfo::getAsMetadata(), llvm::DINode::getCanonicalMDString(), llvm::DIMacroNode::getCanonicalMDString(), getKeyFPValMD(), getKeyValMD(), llvm::MMRAMetadata::getTagMD(), llvm::GCNTTIImpl::instCombineIntrinsic(), LLVMMDStringInContext(), LLVMMDStringInContext2(), lowerPtrAnnotation(), parseAnnotation(), llvm::LLParser::parseMDField(), postUnswitch(), runImpl(), llvm::LoopVectorizeHints::setAlreadyVectorized(), llvm::Module::setDarwinTargetVariantTriple(), llvm::Loop::setLoopAlreadyUnrolled(), llvm::Loop::setLoopMustProgress(), llvm::Module::setStackProtectorGuard(), llvm::Module::setStackProtectorGuardReg(), llvm::Module::setStackProtectorGuardSymbol(), solveTypeName(), llvm::OpenMPIRBuilder::unrollLoopFull(), llvm::OpenMPIRBuilder::unrollLoopHeuristic(), llvm::OpenMPIRBuilder::unrollLoopPartial(), updateNVPTXMetadata(), upgradeLoopTag(), llvm::UpgradeModuleFlags(), upgradeRetainReleaseMarker(), and llvm::dxil::ResourceBase::write().
|
inline |
Definition at line 739 of file Metadata.h.
References getString(), and llvm::StringRef::size().
StringRef MDString::getString | ( | ) | const |
Definition at line 616 of file Metadata.cpp.
References assert().
Referenced by llvm::addStringMetadataToLoop(), begin(), bytes_begin(), bytes_end(), llvm::cacheAnnotationFromMD(), createProfileFileNameVar(), llvm::WebAssemblyAsmPrinter::emitEndOfAsmFile(), end(), llvm::findOptionMDForLoopID(), getArgAccessQual(), llvm::omp::getDeviceKernels(), GetFunctionFromMDNode(), getHiPELiteral(), llvm::BasicBlock::getIrrLoopHeaderWeight(), getKernelArgTypeQual(), getLength(), getSummaryFromMD(), llvm::GetUnrollMetadata(), getValMD(), hasAnyUnrollPragma(), isCanonical(), isKeyValuePair(), llvm::LegalizerHelper::lowerReadWriteRegister(), and llvm::makePostTransformationMetadata().
|
friend |
Definition at line 637 of file Metadata.h.