/// getMDs - Get the metadata attached to an Instruction.
void getMDs(const Instruction *Inst,
- SmallVectorImpl<std::pair<unsigned, TrackingVH<MDNode> > > &MDs) const;
+ 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);
// Write metadata attachments
// METADATA_ATTACHMENT - [m x [value, [n x [id, mdnode]]]
MetadataContext &TheMetadata = F.getContext().getMetadata();
- typedef SmallVector<std::pair<unsigned, TrackingVH<MDNode> >, 2> MDMapTy;
+ typedef SmallVector<std::pair<unsigned, MDNode*>, 2> MDMapTy;
MDMapTy MDs;
for (Function::const_iterator BB = F.begin(), E = F.end(); BB != E; ++BB)
for (BasicBlock::const_iterator I = BB->begin(), E = BB->end();
EnumerateType(I->getType());
MetadataContext &TheMetadata = F->getContext().getMetadata();
- typedef SmallVector<std::pair<unsigned, TrackingVH<MDNode> >, 2> MDMapTy;
+ typedef SmallVector<std::pair<unsigned, MDNode*>, 2> MDMapTy;
MDMapTy MDs;
for (Function::const_iterator BB = F->begin(), E = F->end(); BB != E; ++BB)
for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); I!=E;++I){
ST_DEBUG("Inserting Instructions:\n");
MetadataContext &TheMetadata = TheFunction->getContext().getMetadata();
- typedef SmallVector<std::pair<unsigned, TrackingVH<MDNode> >, 2> MDMapTy;
+ typedef SmallVector<std::pair<unsigned, MDNode*>, 2> MDMapTy;
MDMapTy MDs;
// Add all of the basic blocks and instructions with no names.
// Print Metadata info
if (!MDNames.empty()) {
MetadataContext &TheMetadata = I.getContext().getMetadata();
- typedef SmallVector<std::pair<unsigned, TrackingVH<MDNode> >, 2> MDMapTy;
+ typedef SmallVector<std::pair<unsigned, MDNode*>, 2> MDMapTy;
MDMapTy MDs;
TheMetadata.getMDs(&I, MDs);
for (MDMapTy::const_iterator MI = MDs.begin(), ME = MDs.end(); MI != ME;
MDNode *getMD(unsigned Kind, const Instruction *Inst);
/// getMDs - Get the metadata attached to an Instruction.
- void getMDs(const Instruction *Inst, SmallVectorImpl<MDPairTy> &MDs) const;
+ 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);
/// getMDs - Get the metadata attached to an Instruction.
void MetadataContextImpl::
-getMDs(const Instruction *Inst, SmallVectorImpl<MDPairTy> &MDs) const {
+getMDs(const Instruction *Inst,
+ SmallVectorImpl<std::pair<unsigned, MDNode*> > &MDs) const {
MDStoreTy::const_iterator I = MetadataStore.find(Inst);
if (I == MetadataStore.end())
return;
/// getMDs - Get the metadata attached to an Instruction.
void MetadataContext::
getMDs(const Instruction *Inst,
- SmallVectorImpl<std::pair<unsigned, TrackingVH<MDNode> > > &MDs) const {
+ SmallVectorImpl<std::pair<unsigned, MDNode*> > &MDs) const {
return pImpl->getMDs(Inst, MDs);
}