|
LLVM
4.0.0
|
A single uniqued string. More...
#include <Metadata.h>
Public Types | |
| typedef StringRef::iterator | 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 |
| Storage flag for non-uniqued, otherwise unowned, metadata. More... | |
| unsigned short | SubclassData16 |
| unsigned | SubclassData32 |
A single uniqued string.
These are used to efficiently contain a byte sequence for metadata. MDString is always unnamed.
Definition at line 586 of file Metadata.h.
Definition at line 606 of file Metadata.h.
|
inline |
Pointer to the first byte of the string.
Definition at line 609 of file Metadata.h.
References llvm::StringRef::begin(), and getString().
Definition at line 614 of file Metadata.h.
References llvm::StringRef::bytes_begin(), and getString().
Definition at line 615 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 618 of file Metadata.h.
References llvm::Metadata::getMetadataID().
|
inline |
Pointer to one byte past the end of the string.
Definition at line 612 of file Metadata.h.
References llvm::StringRef::end(), and getString().
|
static |
Definition at line 414 of file Metadata.cpp.
References I, llvm::LLVMContextImpl::MDStringCache, llvm::LLVMContext::pImpl, and llvm::SPII::Store.
Referenced by llvm::Module::addModuleFlag(), AddRuntimeUnrollDisableMetaData(), CloneLoopBlocks(), llvm::createPGOFuncNameMetadata(), llvm::MDBuilder::createString(), createStringMetadata(), llvm::DIBuilder::createTemplateTemplateParameter(), DisableAllLoopOptsOnLoop(), llvm::DINode::getCanonicalMDString(), llvm::DIMacroNode::getCanonicalMDString(), getKeyValMD(), llvm::FunctionImporter::importFunctions(), LLVMMDStringInContext(), and SetLoopAlreadyUnrolled().
|
inlinestatic |
Definition at line 598 of file Metadata.h.
References Context.
|
inline |
Definition at line 604 of file Metadata.h.
References getString(), and llvm::StringRef::size().
| StringRef MDString::getString | ( | ) | const |
Definition at line 424 of file Metadata.cpp.
References assert().
Referenced by AddRuntimeUnrollDisableMetaData(), begin(), llvm::DICompositeType::buildODRType(), bytes_begin(), bytes_end(), llvm::cacheAnnotationFromMD(), CloneLoopBlocks(), end(), llvm::findStringMetadataForLoop(), llvm::DOTGraphTraits< const Function * >::getEdgeAttributes(), GetFunctionFromMDNode(), getHiPELiteral(), getLength(), llvm::DICompositeType::getODRTypeIfExists(), getSummaryFromMD(), llvm::GetUnrollMetadata(), getVal(), llvm::getValueProfDataFromInst(), isCanonical(), isKeyValuePair(), SetLoopAlreadyUnrolled(), llvm::Instruction::swapProfMetadata(), and llvm::UpgradeModuleFlags().
|
friend |
Definition at line 587 of file Metadata.h.
1.8.6