|
LLVM
3.7.0
|
Value wrapper in the Metadata hierarchy. More...
#include <Metadata.h>
Public Member Functions | |
| Value * | getValue () const |
| Type * | getType () const |
| LLVMContext & | getContext () 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 ValueAsMetadata * | get (Value *V) |
| static ConstantAsMetadata * | getConstant (Value *C) |
| static LocalAsMetadata * | getLocal (Value *Local) |
| static ValueAsMetadata * | getIfExists (Value *V) |
| static ConstantAsMetadata * | getConstantIfExists (Value *C) |
| static LocalAsMetadata * | getLocalIfExists (Value *Local) |
| static void | handleDeletion (Value *V) |
| static void | handleRAUW (Value *From, Value *To) |
| static bool | classof (const Metadata *MD) |
Protected Member Functions | |
| ValueAsMetadata (unsigned ID, Value *V) | |
| ~ValueAsMetadata ()=default | |
| void | replaceAllUsesWith (Metadata *MD) |
| Handle collisions after Value::replaceAllUsesWith(). 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... | |
Friends | |
| class | ReplaceableMetadataImpl |
| class | LLVMContextImpl |
Additional Inherited Members | |
Public Types inherited from llvm::Metadata | |
| enum | MetadataKind { MDTupleKind, DILocationKind, GenericDINodeKind, DISubrangeKind, DIEnumeratorKind, DIBasicTypeKind, DIDerivedTypeKind, DICompositeTypeKind, DISubroutineTypeKind, DIFileKind, DICompileUnitKind, DISubprogramKind, DILexicalBlockKind, DILexicalBlockFileKind, DINamespaceKind, DIModuleKind, DITemplateTypeParameterKind, DITemplateValueParameterKind, DIGlobalVariableKind, DILocalVariableKind, DIExpressionKind, DIObjCPropertyKind, DIImportedEntityKind, ConstantAsMetadataKind, LocalAsMetadataKind, MDStringKind } |
Protected Types inherited from llvm::Metadata | |
| enum | StorageType { Uniqued, Distinct, Temporary } |
| Active type of storage. More... | |
Protected Attributes inherited from llvm::Metadata | |
| unsigned | Storage: 2 |
| Storage flag for non-uniqued, otherwise unowned, metadata. More... | |
| unsigned short | SubclassData16 |
| unsigned | SubclassData32 |
Value wrapper in the Metadata hierarchy.
This is a custom value handle that allows other metadata to refer to classes in the Value hierarchy.
Because of full uniquing support, each value is only wrapped by a single ValueAsMetadata object, so the lookup maps are far more efficient than those using ValueHandleBase.
Definition at line 252 of file Metadata.h.
Definition at line 264 of file Metadata.h.
|
protecteddefault |
Definition at line 305 of file Metadata.h.
References llvm::Metadata::ConstantAsMetadataKind, llvm::Metadata::getMetadataID(), and llvm::Metadata::LocalAsMetadataKind.
|
static |
Definition at line 251 of file Metadata.cpp.
References llvm::C, llvm::Value::getContext(), llvm::Value::IsUsedByMD, llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::ValuesAsMetadata.
Referenced by getDbgIntrinsicValueImpl(), and MapMetadataImpl().
|
inlinestatic |
Definition at line 272 of file Metadata.h.
References llvm::C.
Referenced by llvm::ConstantAsMetadata::get().
|
inlinestatic |
Definition at line 280 of file Metadata.h.
References getIfExists().
Referenced by llvm::ConstantAsMetadata::getIfExists().
|
inline |
Definition at line 289 of file Metadata.h.
References llvm::Value::getContext().
|
static |
Definition at line 271 of file Metadata.cpp.
References llvm::Value::getContext(), llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::ValuesAsMetadata.
Referenced by getConstantIfExists(), and getLocalIfExists().
|
inlinestatic |
Definition at line 275 of file Metadata.h.
References llvm::Local.
Referenced by llvm::LocalAsMetadata::get().
|
inlinestatic |
Definition at line 283 of file Metadata.h.
References getIfExists().
Referenced by llvm::LocalAsMetadata::getIfExists().
|
inline |
Definition at line 288 of file Metadata.h.
References llvm::Value::getType().
|
inline |
Definition at line 287 of file Metadata.h.
Referenced by llvm::ConstantAsMetadata::getValue(), handleDeletion(), handleRAUW(), and WriteValueAsMetadata().
|
static |
Definition at line 276 of file Metadata.cpp.
References llvm::Type::getContext(), llvm::Value::getType(), getValue(), I, llvm::LLVMContext::pImpl, replaceAllUsesWith(), llvm::SPII::Store, and llvm::LLVMContextImpl::ValuesAsMetadata.
Referenced by llvm::Value::~Value().
Definition at line 295 of file Metadata.cpp.
References llvm::C, llvm::ConstantAsMetadata::get(), llvm::Type::getContext(), getLocalFunction(), llvm::Value::getType(), getValue(), I, llvm::Value::IsUsedByMD, replaceAllUsesWith(), and llvm::SPII::Store.
Referenced by llvm::Value::replaceAllUsesWith().
|
inlineprotected |
Handle collisions after Value::replaceAllUsesWith().
RAUW isn't supported directly for ValueAsMetadata, but if the wrapped Value gets RAUW'ed and the target already exists, this is used to merge the two metadata nodes.
Definition at line 300 of file Metadata.h.
References llvm::ReplaceableMetadataImpl::replaceAllUsesWith().
Referenced by handleDeletion(), and handleRAUW().
|
friend |
Definition at line 254 of file Metadata.h.
|
friend |
Definition at line 253 of file Metadata.h.
1.8.6