aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Metadata.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Metadata.h')
-rw-r--r--include/llvm/Metadata.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/llvm/Metadata.h b/include/llvm/Metadata.h
index a2394beb40..21f907a371 100644
--- a/include/llvm/Metadata.h
+++ b/include/llvm/Metadata.h
@@ -311,13 +311,14 @@ public:
/// MDKindID - This id identifies metadata kind the metadata store. Valid
/// ID values are 1 or higher. This ID is set by RegisterMDKind.
typedef unsigned MDKindID;
+
class Metadata {
public:
typedef std::pair<MDKindID, WeakVH> MDPairTy;
typedef SmallVector<MDPairTy, 2> MDMapTy;
-
-private:
typedef DenseMap<const Instruction *, MDMapTy> MDStoreTy;
+ friend class BitcodeReader;
+private:
/// MetadataStore - Collection of metadata used in this context.
MDStoreTy MetadataStore;
@@ -344,6 +345,10 @@ public:
/// setMD - Attach the metadata of given kind with an Instruction.
void setMD(MDKindID Kind, MDNode *Node, Instruction *Inst);
+ /// getHandlerNames - Get handler names. This is used by bitcode
+ /// writer.
+ const StringMap<unsigned> *getHandlerNames();
+
/// ValueIsDeleted - This handler is used to update metadata store
/// when a value is deleted.
void ValueIsDeleted(Value *V) {}