16 #ifndef LLVM_IR_METADATA_H
17 #define LLVM_IR_METADATA_H
27 template<
typename ValueSubClass,
typename ItemParentClass>
28 class SymbolTableListTraits;
36 virtual void anchor();
43 return get(Context, Str ?
StringRef(Str) : StringRef());
88 FunctionLocalBit = 1 << 0,
92 NotUniquedBit = 1 << 1,
100 enum FunctionLocalness {
113 static MDNode *getMDNode(LLVMContext &
C, ArrayRef<Value*> Vals,
114 FunctionLocalness FL,
bool Insert =
true);
117 static MDNode *
get(LLVMContext &Context, ArrayRef<Value*> Vals);
121 ArrayRef<Value*> Vals,
124 static MDNode *
getIfExists(LLVMContext &Context, ArrayRef<Value*> Vals);
129 static MDNode *
getTemporary(LLVMContext &Context, ArrayRef<Value*> Vals);
175 bool isNotUniqued()
const {
178 void setIsNotUniqued();
182 void setValueSubclassData(
unsigned short D) {
202 void setParent(
Module *M) { Parent = M; }
StringRef getName() const
getName - Return a constant reference to this named metadata's name.
void replaceOperandWith(unsigned i, Value *NewVal)
replaceOperandWith - Replace a specific operand.
static void deleteTemporary(MDNode *N)
unsigned getLength() const
StringRef getString() const
static MDNode * getTemporary(LLVMContext &Context, ArrayRef< Value * > Vals)
const Module * getParent() const
size_t size() const
size - Get the string size.
The main container class for the LLVM Intermediate Representation.
unsigned getNumOperands() const
getNumOperands - Return number of MDNode operands.
void addOperand(MDNode *M)
addOperand - Add metadata operand.
MDNode - a tuple of other values.
StringRef getName() const
Value * getOperand(unsigned i) const LLVM_READONLY
getOperand - Return specified operand.
iterator end() const
end() - Pointer to one byte past the end of the string.
ID
LLVM Calling Convention Representation.
bool isTBAAVtableAccess() const
Check whether MDNode is a vtable access.
StringRef::iterator iterator
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
static MDNode * getMostGenericRange(MDNode *A, MDNode *B)
void Profile(FoldingSetNodeID &ID) const
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
MDNode * getOperand(unsigned i) const
getOperand - Return specified operand.
unsigned getValueID() const
static MDNode * getMostGenericTBAA(MDNode *A, MDNode *B)
Methods for metadata merging.
static MDNode * getWhenValsUnresolved(LLVMContext &Context, ArrayRef< Value * > Vals, bool isFunctionLocal)
void print(raw_ostream &ROS, AssemblyAnnotationWriter *AAW=0) const
print - Implement operator<< on NamedMDNode.
static MDNode * getIfExists(LLVMContext &Context, ArrayRef< Value * > Vals)
void setValueSubclassData(unsigned short D)
#define LLVM_DELETED_FUNCTION
friend class MDNodeOperand
bool isFunctionLocal() const
isFunctionLocal - Return whether MDNode is local to a function.
unsigned short getSubclassDataFromValue() const
iterator begin() const
begin() - Pointer to the first byte of the string.
~NamedMDNode()
~NamedMDNode - Destroy NamedMDNode.
LLVM Value Representation.
unsigned getNumOperands() const
getNumOperands - Return the number of NamedMDNode operands.
void dropAllReferences()
dropAllReferences - Remove all uses and clear node vector.
static MDNode * getMostGenericFPMath(MDNode *A, MDNode *B)
void dump() const
dump() - Allow printing of NamedMDNodes from the debugger.
const Function * getFunction() const
Module * getParent()
getParent - Get the module that holds this named metadata collection.