Print debug info attached with an instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82075 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel
2009-09-16 20:21:17 +00:00
parent 0696fdf322
commit 43215788d5
3 changed files with 32 additions and 3 deletions

View File

@@ -308,6 +308,15 @@ MDNode *Metadata::getMD(MDKindID MDKind, const Instruction *Inst) {
return Node;
}
/// getMDs - Get the metadata attached with an Instruction.
const Metadata::MDMapTy *Metadata::getMDs(const Instruction *Inst) {
MDStoreTy::iterator I = MetadataStore.find(Inst);
if (I == MetadataStore.end())
return NULL;
return &(I->second);
}
/// ValueIsDeleted - This handler is used to update metadata store
/// when a value is deleted.
void Metadata::ValueIsDeleted(const Instruction *Inst) {