- /// getMDKind - Return metadata kind. If the requested metadata kind
- /// is not registered then return 0.
- unsigned getMDKind(StringRef Name) const;
-
- /// isValidName - Return true if Name is a valid custom metadata handler name.
- static bool isValidName(StringRef Name);
-
- /// getMD - Get the metadata of given kind attached to an Instruction.
- /// If the metadata is not found then return 0.
- MDNode *getMD(unsigned Kind, const Instruction *Inst);
-
- /// getMDs - Get the metadata attached to an Instruction.
- void getMDs(const Instruction *Inst,
- SmallVectorImpl<std::pair<unsigned, MDNode*> > &MDs) const;
-
- /// addMD - Attach the metadata of given kind to an Instruction.
- void addMD(unsigned Kind, MDNode *Node, Instruction *Inst);
-
- /// removeMD - Remove metadata of given kind attached with an instuction.
- void removeMD(unsigned Kind, Instruction *Inst);
-
- /// removeAllMetadata - Remove all metadata attached with an instruction.
- void removeAllMetadata(Instruction *Inst);
-
- /// copyMD - If metadata is attached with Instruction In1 then attach
- /// the same metadata to In2.
- void copyMD(Instruction *In1, Instruction *In2);
-
- /// getMDKindNames - Populate client supplied SmallVector with the name for
- /// each custom metadata ID. ID #0 is not used, so it is filled in as empty.
- void getMDKindNames(SmallVectorImpl<StringRef> &) const;
-
- /// ValueIsDeleted - This handler is used to update metadata store
- /// when a value is deleted.
- void ValueIsDeleted(const Value *) {}
- void ValueIsDeleted(Instruction *Inst);
- void ValueIsRAUWd(Value *V1, Value *V2);
-
- /// ValueIsCloned - This handler is used to update metadata store
- /// when In1 is cloned to create In2.
- void ValueIsCloned(const Instruction *In1, Instruction *In2);