LLVM API Documentation
#include <Metadata.h>


Public Types | |
| typedef StringRef::iterator | iterator |
Public Types inherited from llvm::Value | |
| enum | ValueTy { ArgumentVal, BasicBlockVal, FunctionVal, GlobalAliasVal, GlobalVariableVal, UndefValueVal, BlockAddressVal, ConstantExprVal, ConstantAggregateZeroVal, ConstantDataArrayVal, ConstantDataVectorVal, ConstantIntVal, ConstantFPVal, ConstantArrayVal, ConstantStructVal, ConstantVectorVal, ConstantPointerNullVal, MDNodeVal, MDStringVal, InlineAsmVal, PseudoSourceValueVal, FixedStackPseudoSourceValueVal, InstructionVal, ConstantFirstVal = FunctionVal, ConstantLastVal = ConstantPointerNullVal } |
| typedef value_use_iterator< User > | use_iterator |
| typedef value_use_iterator < const User > | const_use_iterator |
Public Member Functions | |
| StringRef | getString () const |
| unsigned | getLength () const |
| iterator | begin () const |
| begin() - Pointer to the first byte of the string. More... | |
| iterator | end () const |
| end() - Pointer to one byte past the end of the string. More... | |
Public Member Functions inherited from llvm::Value | |
| virtual | ~Value () |
| void | dump () const |
| dump - Support for debugging, callable in GDB: V->dump() More... | |
| void | print (raw_ostream &O, AssemblyAnnotationWriter *AAW=0) const |
| Type * | getType () const |
| LLVMContext & | getContext () const |
| All values hold a context through their type. More... | |
| bool | hasName () const |
| ValueName * | getValueName () const |
| void | setValueName (ValueName *VN) |
| StringRef | getName () const |
| void | setName (const Twine &Name) |
| void | takeName (Value *V) |
| void | replaceAllUsesWith (Value *V) |
| bool | use_empty () const |
| use_iterator | use_begin () |
| const_use_iterator | use_begin () const |
| use_iterator | use_end () |
| const_use_iterator | use_end () const |
| User * | use_back () |
| const User * | use_back () const |
| bool | hasOneUse () const |
| bool | hasNUses (unsigned N) const |
| bool | hasNUsesOrMore (unsigned N) const |
| bool | isUsedInBasicBlock (const BasicBlock *BB) const |
| unsigned | getNumUses () const |
| void | addUse (Use &U) |
| unsigned | getValueID () const |
| unsigned | getRawSubclassOptionalData () const |
| void | clearSubclassOptionalData () |
| bool | hasSameSubclassOptionalData (const Value *V) const |
| void | intersectOptionalDataWith (const Value *V) |
| bool | hasValueHandle () const |
| Value * | stripPointerCasts () |
| Strips off any unneeded pointer casts, all-zero GEPs and aliases from the specified value, returning the original uncasted value. More... | |
| const Value * | stripPointerCasts () const |
| Value * | stripPointerCastsNoFollowAliases () |
| Strips off any unneeded pointer casts and all-zero GEPs from the specified value, returning the original uncasted value. More... | |
| const Value * | stripPointerCastsNoFollowAliases () const |
| Value * | stripInBoundsConstantOffsets () |
| Strips off unneeded pointer casts and all-constant GEPs from the specified value, returning the original pointer value. More... | |
| const Value * | stripInBoundsConstantOffsets () const |
| Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) |
Strips like stripInBoundsConstantOffsets but also accumulates the constant offset stripped. More... | |
| const Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) const |
| Value * | stripInBoundsOffsets () |
| Strips off unneeded pointer casts and any in-bounds offsets from the specified value, returning the original pointer value. More... | |
| const Value * | stripInBoundsOffsets () const |
| bool | isDereferenceablePointer () const |
| Value * | DoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) |
| const Value * | DoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) const |
| void | mutateType (Type *Ty) |
Static Public Member Functions | |
| static MDString * | get (LLVMContext &Context, StringRef Str) |
| static MDString * | get (LLVMContext &Context, const char *Str) |
| static bool | classof (const Value *V) |
| Methods for support type inquiry through isa, cast, and dyn_cast: More... | |
Additional Inherited Members | |
Static Public Attributes inherited from llvm::Value | |
| static const unsigned | MaximumAlignment = 1u << 29 |
Protected Member Functions inherited from llvm::Value | |
| virtual void | printCustom (raw_ostream &O) const |
| Value (Type *Ty, unsigned scid) | |
| unsigned short | getSubclassDataFromValue () const |
| void | setValueSubclassData (unsigned short D) |
Protected Attributes inherited from llvm::Value | |
| unsigned char | SubclassOptionalData: 7 |
MDString - a single uniqued string. These are used to efficiently contain a byte sequence for metadata. MDString is always unnamed.
Definition at line 35 of file Metadata.h.
Definition at line 50 of file Metadata.h.
|
inline |
begin() - Pointer to the first byte of the string.
Definition at line 53 of file Metadata.h.
References llvm::StringRef::begin(), and llvm::Value::getName().
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition at line 59 of file Metadata.h.
References llvm::Value::getValueID(), and llvm::Value::MDStringVal.
|
inline |
end() - Pointer to one byte past the end of the string.
Definition at line 56 of file Metadata.h.
References llvm::StringRef::end(), and llvm::Value::getName().
|
static |
Definition at line 38 of file Metadata.cpp.
References llvm::StringMap< ValueTy, AllocatorTy >::GetOrCreateValue(), llvm::StringMapEntry< ValueTy >::getValue(), llvm::LLVMContextImpl::MDStringCache, llvm::LLVMContext::pImpl, and llvm::Value::setValueName().
Referenced by llvm::Module::addModuleFlag(), AppendMDNodeToSourcePtr(), llvm::DIBuilder::createArrayType(), llvm::DIBuilder::createBasicType(), llvm::DIBuilder::createClassType(), llvm::DIBuilder::createCompileUnit(), llvm::DIBuilder::createComplexVariable(), llvm::DIBuilder::createEnumerationType(), llvm::DIBuilder::createEnumerator(), createFilePathPair(), llvm::DIBuilder::createForwardDecl(), llvm::DIBuilder::createFunction(), llvm::DIBuilder::createGlobalVariable(), createImportedModule(), llvm::DIBuilder::createLocalVariable(), llvm::DIBuilder::createMemberType(), llvm::DIBuilder::createMethod(), llvm::DIBuilder::createNameSpace(), llvm::DIBuilder::createObjCIVar(), llvm::DIBuilder::createObjCProperty(), llvm::DIBuilder::createPointerType(), llvm::DIBuilder::createQualifiedType(), llvm::DIBuilder::createStaticMemberType(), llvm::DIBuilder::createStaticVariable(), llvm::MDBuilder::createString(), llvm::DIBuilder::createStructType(), llvm::DIBuilder::createSubroutineType(), llvm::DIBuilder::createTemplateTemplateParameter(), llvm::DIBuilder::createTemplateTypeParameter(), llvm::DIBuilder::createTypedef(), llvm::DIBuilder::createUnionType(), llvm::DIBuilder::createUnspecifiedType(), llvm::DIBuilder::createVectorType(), LLVMMDStringInContext(), and SequenceToMDString().
|
inlinestatic |
Definition at line 42 of file Metadata.h.
|
inline |
Definition at line 48 of file Metadata.h.
References llvm::Value::getName(), and llvm::StringRef::size().
|
inline |
Definition at line 46 of file Metadata.h.
References llvm::Value::getName().
Referenced by cacheAnnotationFromMD(), llvm::TargetLoweringObjectFileMachO::emitModuleFlags(), llvm::TargetLoweringObjectFileCOFF::emitModuleFlags(), llvm::Module::getModuleFlag(), and llvm::DIRef< T >::getName().