|
LLVM
3.7.0
|
A single uniqued string. More...
#include <Metadata.h>
Public Member Functions | |
| 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) const |
| Print. More... | |
| void | print (raw_ostream &OS, ModuleSlotTracker &MST, const Module *M=nullptr) 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 | Storage: 2 |
| 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 508 of file Metadata.h.
Definition at line 529 of file Metadata.h.
|
inline |
Pointer to the first byte of the string.
Definition at line 532 of file Metadata.h.
References llvm::StringRef::begin(), and getString().
Definition at line 537 of file Metadata.h.
References llvm::StringRef::bytes_begin(), and getString().
Referenced by WriteModuleMetadata().
Definition at line 538 of file Metadata.h.
References llvm::StringRef::bytes_end(), and getString().
Referenced by WriteModuleMetadata().
Methods for support type inquiry through isa, cast, and dyn_cast.
Definition at line 541 of file Metadata.h.
References llvm::Metadata::getMetadataID(), and llvm::Metadata::MDStringKind.
|
inline |
Pointer to one byte past the end of the string.
Definition at line 535 of file Metadata.h.
References llvm::StringRef::end(), and getString().
|
static |
Definition at line 360 of file Metadata.cpp.
References I, llvm::LLVMContextImpl::MDStringCache, llvm::LLVMContext::pImpl, and llvm::SPII::Store.
Referenced by llvm::Module::addModuleFlag(), CloneLoopBlocks(), llvm::MDBuilder::createString(), llvm::DIBuilder::createTemplateTemplateParameter(), llvm::DINode::getCanonicalMDString(), LLVMMDStringInContext(), and SetLoopAlreadyUnrolled().
|
inlinestatic |
Definition at line 521 of file Metadata.h.
|
inline |
Definition at line 527 of file Metadata.h.
References getString(), and llvm::StringRef::size().
| StringRef MDString::getString | ( | ) | const |
Definition at line 375 of file Metadata.cpp.
Referenced by begin(), bytes_begin(), bytes_end(), cacheAnnotationFromMD(), CloneLoopBlocks(), copyMetadata(), llvm::TargetLoweringObjectFileMachO::emitModuleFlags(), llvm::TargetLoweringObjectFileCOFF::emitModuleFlags(), end(), getLength(), getString(), llvm::GetUnrollMetadata(), isCanonical(), and SetLoopAlreadyUnrolled().
|
friend |
Definition at line 509 of file Metadata.h.
1.8.6