aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-09-28 21:14:55 +0000
committerDevang Patel <dpatel@apple.com>2009-09-28 21:14:55 +0000
commitb5896160216cae66e3a06cb58c3c38ba09f6969e (patch)
tree1c281d051ac85c8b27367dd80c08acd0d250f404 /lib/VMCore
parentcb8bbe7d7b17bf387769d86e614034a36adc159e (diff)
downloadexternal_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 'lib/VMCore')
-rw-r--r--lib/VMCore/Metadata.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/VMCore/Metadata.cpp b/lib/VMCore/Metadata.cpp
index 67bb66f..3daae13 100644
--- a/lib/VMCore/Metadata.cpp
+++ b/lib/VMCore/Metadata.cpp
@@ -259,8 +259,8 @@ NamedMDNode::~NamedMDNode() {
/// RegisterMDKind - Register a new metadata kind and return its ID.
/// A metadata kind can be registered only once.
-MDKindID Metadata::RegisterMDKind(const char *Name) {
- MDKindID Count = MDHandlerNames.size();
+unsigned Metadata::RegisterMDKind(const char *Name) {
+ unsigned Count = MDHandlerNames.size();
StringMap<unsigned>::iterator I = MDHandlerNames.find(Name);
assert(I == MDHandlerNames.end() && "Already registered MDKind!");
MDHandlerNames[Name] = Count + 1;
@@ -269,7 +269,7 @@ MDKindID Metadata::RegisterMDKind(const char *Name) {
/// getMDKind - Return metadata kind. If the requested metadata kind
/// is not registered then return 0.
-MDKindID Metadata::getMDKind(const char *Name) {
+unsigned Metadata::getMDKind(const char *Name) {
StringMap<unsigned>::iterator I = MDHandlerNames.find(Name);
if (I == MDHandlerNames.end())
return 0;
@@ -278,7 +278,7 @@ MDKindID Metadata::getMDKind(const char *Name) {
}
/// setMD - Attach the metadata of given kind with an Instruction.
-void Metadata::setMD(MDKindID MDKind, MDNode *Node, Instruction *Inst) {
+void Metadata::setMD(unsigned MDKind, MDNode *Node, Instruction *Inst) {
MDStoreTy::iterator I = MetadataStore.find(Inst);
Inst->HasMetadata = true;
if (I == MetadataStore.end()) {
@@ -295,7 +295,7 @@ void Metadata::setMD(MDKindID MDKind, MDNode *Node, Instruction *Inst) {
/// getMD - Get the metadata of given kind attached with an Instruction.
/// If the metadata is not found then return 0.
-MDNode *Metadata::getMD(MDKindID MDKind, const Instruction *Inst) {
+MDNode *Metadata::getMD(unsigned MDKind, const Instruction *Inst) {
MDNode *Node = NULL;
MDStoreTy::iterator I = MetadataStore.find(Inst);
if (I == MetadataStore.end())