diff options
| author | Devang Patel <dpatel@apple.com> | 2009-09-16 20:21:17 +0000 |
|---|---|---|
| committer | Devang Patel <dpatel@apple.com> | 2009-09-16 20:21:17 +0000 |
| commit | 43215788d5d79a0a336ca85442d7c8a45552dd7a (patch) | |
| tree | bd293b0c75df948988c4bc6cc49f9344adc31fb5 /lib/VMCore/Metadata.cpp | |
| parent | 0696fdf3220c4cdd7fc518274048a35091cc17b1 (diff) | |
Print debug info attached with an instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82075 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Metadata.cpp')
| -rw-r--r-- | lib/VMCore/Metadata.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/VMCore/Metadata.cpp b/lib/VMCore/Metadata.cpp index 062fb96e5b..2c80a60a8c 100644 --- a/lib/VMCore/Metadata.cpp +++ b/lib/VMCore/Metadata.cpp @@ -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) { |
