LLVM
8.0.1
|
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. More... | |
iterator | end () const |
Pointer to one byte past the end of the string. More... | |
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. More... | |
void | dump (const Module *M) const |
void | print (raw_ostream &OS, const Module *M=nullptr, bool IsForDebug=false) const |
Print. More... | |
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. More... | |
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. More... | |
Friends | |
class | StringMapEntry< 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. More... | |
Protected Attributes inherited from llvm::Metadata | |
unsigned char | Storage: 7 |
Storage flag for non-uniqued, otherwise unowned, metadata. More... | |
unsigned char | ImplicitCode: 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 604 of file Metadata.h.
Definition at line 625 of file Metadata.h.
|
inline |
Pointer to the first byte of the string.
Definition at line 628 of file Metadata.h.
References llvm::StringRef::begin().
Definition at line 633 of file Metadata.h.
References llvm::StringRef::bytes_begin().
Definition at line 634 of file Metadata.h.
References llvm::StringRef::bytes_end().
Methods for support type inquiry through isa, cast, and dyn_cast.
Definition at line 637 of file Metadata.h.
References llvm::Metadata::getMetadataID().
|
inline |
Pointer to one byte past the end of the string.
Definition at line 631 of file Metadata.h.
References llvm::StringRef::end().
|
static |
Definition at line 454 of file Metadata.cpp.
References I, llvm::LLVMContextImpl::MDStringCache, llvm::LLVMContext::pImpl, and llvm::SPII::Store.
Referenced by llvm::Module::addModuleFlag(), AddRuntimeUnrollDisableMetaData(), llvm::createPGOFuncNameMetadata(), llvm::MDBuilder::createString(), createStringMetadata(), llvm::DIBuilder::createTemplateTemplateParameter(), DisableAllLoopOptsOnLoop(), FunctionNumber(), llvm::DINode::getCanonicalMDString(), llvm::DIMacroNode::getCanonicalMDString(), getKeyValMD(), LLVMMDStringInContext(), PushArgMD(), llvm::Loop::setLoopAlreadyUnrolled(), upgradeLoopTag(), llvm::UpgradeModuleFlags(), llvm::UpgradeRetainReleaseMarker(), llvm::LoopVectorizeHints::vectorizeAnalysisPassName(), and llvm::InstCombiner::visitCallInst().
|
inlinestatic |
Definition at line 617 of file Metadata.h.
References Context.
|
inline |
Definition at line 623 of file Metadata.h.
References llvm::StringRef::size().
StringRef MDString::getString | ( | ) | const |
Definition at line 464 of file Metadata.cpp.
References assert().
Referenced by llvm::DICompositeType::buildODRType(), llvm::cacheAnnotationFromMD(), checkMDProf(), llvm::WebAssemblyAsmPrinter::EmitEndOfAsmFile(), llvm::findOptionMDForLoopID(), llvm::BasicBlock::getIrrLoopHeaderWeight(), llvm::DICompositeType::getODRTypeIfExists(), getSummaryFromMD(), llvm::GetUnrollMetadata(), getVal(), llvm::getValueProfDataFromInst(), HasAnyUnrollPragma(), isCanonical(), isFuncOrArgAttr(), isKeyValuePair(), llvm::LTOModule::makeBuffer(), llvm::Loop::setLoopAlreadyUnrolled(), llvm::Instruction::swapProfMetadata(), llvm::JumpThreadingPass::ThreadEdge(), llvm::UpgradeModuleFlags(), llvm::UpgradeRetainReleaseMarker(), and llvm::LoopVectorizeHints::vectorizeAnalysisPassName().
|
friend |
Definition at line 605 of file Metadata.h.