diff options
author | Devang Patel <dpatel@apple.com> | 2009-09-28 21:14:55 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-09-28 21:14:55 +0000 |
commit | b5896160216cae66e3a06cb58c3c38ba09f6969e (patch) | |
tree | 1c281d051ac85c8b27367dd80c08acd0d250f404 /include/llvm | |
parent | cb8bbe7d7b17bf387769d86e614034a36adc159e (diff) | |
download | external_llvm-b5896160216cae66e3a06cb58c3c38ba09f6969e.zip external_llvm-b5896160216cae66e3a06cb58c3c38ba09f6969e.tar.gz external_llvm-b5896160216cae66e3a06cb58c3c38ba09f6969e.tar.bz2 |
Do not use global typedef for MDKindID.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83016 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/Metadata.h | 14 | ||||
-rw-r--r-- | include/llvm/Support/IRBuilder.h | 2 |
2 files changed, 6 insertions, 10 deletions
diff --git a/include/llvm/Metadata.h b/include/llvm/Metadata.h index aef40bf..d799ea4 100644 --- a/include/llvm/Metadata.h +++ b/include/llvm/Metadata.h @@ -307,13 +307,9 @@ public: /// Metadata - /// Metadata manages metadata used in a context. -/// 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 std::pair<unsigned, WeakVH> MDPairTy; typedef SmallVector<MDPairTy, 2> MDMapTy; typedef DenseMap<const Instruction *, MDMapTy> MDStoreTy; friend class BitcodeReader; @@ -328,21 +324,21 @@ private: public: /// RegisterMDKind - Register a new metadata kind and return its ID. /// A metadata kind can be registered only once. - MDKindID RegisterMDKind(const char *Name); + unsigned RegisterMDKind(const char *Name); /// getMDKind - Return metadata kind. If the requested metadata kind /// is not registered then return 0. - MDKindID getMDKind(const char *Name); + unsigned getMDKind(const char *Name); /// getMD - Get the metadata of given kind attached with an Instruction. /// If the metadata is not found then return 0. - MDNode *getMD(MDKindID Kind, const Instruction *Inst); + MDNode *getMD(unsigned Kind, const Instruction *Inst); /// getMDs - Get the metadata attached with an Instruction. const MDMapTy *getMDs(const Instruction *Inst); /// setMD - Attach the metadata of given kind with an Instruction. - void setMD(MDKindID Kind, MDNode *Node, Instruction *Inst); + void setMD(unsigned Kind, MDNode *Node, Instruction *Inst); /// getHandlerNames - Get handler names. This is used by bitcode /// writer. diff --git a/include/llvm/Support/IRBuilder.h b/include/llvm/Support/IRBuilder.h index 00347ba..b5e1787 100644 --- a/include/llvm/Support/IRBuilder.h +++ b/include/llvm/Support/IRBuilder.h @@ -61,7 +61,7 @@ template<bool preserveNames = true, typename T = ConstantFolder, class IRBuilder : public Inserter { BasicBlock *BB; BasicBlock::iterator InsertPt; - MDKindID MDKind; + unsigned MDKind; MDNode *CurDbgLocation; LLVMContext &Context; T Folder; |