|
LLVM 22.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 |
Static Public Member Functions | |
| static LLVM_ABI 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 | |
| Static Public Attributes inherited from llvm::Metadata | |
| static constexpr const unsigned | PoisonGeneratingIDs [] |
| Metadata IDs that may generate poison. | |
| 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 721 of file Metadata.h.
Definition at line 742 of file Metadata.h.
|
inline |
Pointer to the first byte of the string.
Definition at line 745 of file Metadata.h.
References llvm::StringRef::begin(), and getString().
Definition at line 750 of file Metadata.h.
References llvm::StringRef::bytes_begin(), and getString().
Definition at line 751 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 754 of file Metadata.h.
References llvm::Metadata::getMetadataID(), and llvm::Metadata::Metadata().
|
inline |
Pointer to one byte past the end of the string.
Definition at line 748 of file Metadata.h.
References llvm::StringRef::end(), and getString().
|
inlinestatic |
Definition at line 734 of file Metadata.h.
References get().
|
static |
Definition at line 608 of file Metadata.cpp.
References I.
Referenced by addRuntimeUnrollDisableMetaData(), llvm::SPIRVGlobalRegistry::buildAssignType(), constructEntryMetadata(), convertToLocalCopy(), llvm::coro::BaseCloner::create(), createMIBNode(), llvm::createPGONameMetadata(), llvm::MDBuilder::createString(), createStringMetadata(), llvm::DIBuilder::createTemplateTemplateParameter(), DisableAllLoopOptsOnLoop(), llvm::embedBufferInModule(), llvm::emitAMDGPUPrintfCall(), emitAssignName(), emitShaderModelVersionMD(), llvm::MDNode::fromCaptureComponents(), get(), llvm::dxil::ResourceInfo::getAsMetadata(), llvm::DIMacroNode::getCanonicalMDString(), llvm::DINode::getCanonicalMDString(), getKeyFPValMD(), getKeyValMD(), getKeyValMD(), llvm::MMRAMetadata::getTagMD(), llvm::GCNTTIImpl::instCombineIntrinsic(), LLVMMDStringInContext(), LLVMMDStringInContext2(), lowerPtrAnnotation(), parseAnnotation(), llvm::LLParser::parseMDField(), postUnswitch(), llvm::sandboxir::Region::Region(), llvm::SimplifyTypeTestsPass::run(), runImpl(), llvm::LoopVectorizeHints::setAlreadyVectorized(), llvm::Loop::setLoopAlreadyUnrolled(), llvm::Loop::setLoopMustProgress(), solveTypeName(), updateSubprogramLinkageName(), upgradeLoopTag(), llvm::UpgradeModuleFlags(), and upgradeRetainReleaseMarker().
|
inline |
Definition at line 740 of file Metadata.h.
References getString(), and llvm::StringRef::size().
| StringRef MDString::getString | ( | ) | const |
Definition at line 618 of file Metadata.cpp.
Referenced by llvm::addStringMetadataToLoop(), begin(), bytes_begin(), bytes_end(), llvm::cacheAnnotationFromMD(), llvm::MachineFunction::CallSiteInfo::CallSiteInfo(), createProfileFileNameVar(), llvm::WebAssemblyAsmPrinter::emitEndOfAsmFile(), end(), llvm::hlsl::rootsig::extractMdStringValue(), extractNumericCGTypeId(), llvm::findOptionMDForLoopID(), getArgAccessQual(), GetFunctionFromMDNode(), getHiPELiteral(), getKernelArgTypeQual(), getLength(), getSummaryFromMD(), llvm::GetUnrollMetadata(), getValMD(), hasAnyUnrollPragma(), isCanonical(), isKeyValuePair(), llvm::LegalizerHelper::lowerReadWriteRegister(), and llvm::makePostTransformationMetadata().
|
friend |
Definition at line 638 of file Metadata.h.