diff options
| author | Devang Patel <dpatel@apple.com> | 2009-10-20 22:50:27 +0000 |
|---|---|---|
| committer | Devang Patel <dpatel@apple.com> | 2009-10-20 22:50:27 +0000 |
| commit | 0c35dbdf03209adef3c16aad8e3f191e1820dfec (patch) | |
| tree | 4ce1d0b510db0390dd0d34d46e941633d2a589fb /llvm/lib/VMCore/Metadata.cpp | |
| parent | a470eac6a12c84ef3086a187d0d9e58f57d8528b (diff) | |
| download | bcm5719-llvm-0c35dbdf03209adef3c16aad8e3f191e1820dfec.tar.gz bcm5719-llvm-0c35dbdf03209adef3c16aad8e3f191e1820dfec.zip | |
Cosmetic changes.
s/validName/isValidName/g
s/with an Instruction/to an Instruction/g
s/RegisterMDKind/registerMDKind/g
llvm-svn: 84689
Diffstat (limited to 'llvm/lib/VMCore/Metadata.cpp')
| -rw-r--r-- | llvm/lib/VMCore/Metadata.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/llvm/lib/VMCore/Metadata.cpp b/llvm/lib/VMCore/Metadata.cpp index 0434c6dd2a1..eaefb4a3fd4 100644 --- a/llvm/lib/VMCore/Metadata.cpp +++ b/llvm/lib/VMCore/Metadata.cpp @@ -245,10 +245,10 @@ NamedMDNode::~NamedMDNode() { // MetadataContext implementation. // -/// RegisterMDKind - Register a new metadata kind and return its ID. +/// registerMDKind - Register a new metadata kind and return its ID. /// A metadata kind can be registered only once. -unsigned MetadataContext::RegisterMDKind(const char *Name) { - assert(validName(Name) && "Invalid custome metadata name!"); +unsigned MetadataContext::registerMDKind(const char *Name) { + assert(isValidName(Name) && "Invalid custome metadata name!"); unsigned Count = MDHandlerNames.size(); assert(MDHandlerNames.find(Name) == MDHandlerNames.end() && "Already registered MDKind!"); @@ -256,8 +256,8 @@ unsigned MetadataContext::RegisterMDKind(const char *Name) { return Count + 1; } -/// validName - Return true if Name is a valid custom metadata handler name. -bool MetadataContext::validName(const char *Name) { +/// isValidName - Return true if Name is a valid custom metadata handler name. +bool MetadataContext::isValidName(const char *Name) { if (!Name) return false; @@ -280,7 +280,7 @@ bool MetadataContext::validName(const char *Name) { /// getMDKind - Return metadata kind. If the requested metadata kind /// is not registered then return 0. unsigned MetadataContext::getMDKind(const char *Name) { - assert(validName(Name) && "Invalid custome metadata name!"); + assert(isValidName(Name) && "Invalid custome metadata name!"); StringMap<unsigned>::iterator I = MDHandlerNames.find(Name); if (I == MDHandlerNames.end()) return 0; @@ -288,7 +288,7 @@ unsigned MetadataContext::getMDKind(const char *Name) { return I->getValue(); } -/// addMD - Attach the metadata of given kind with an Instruction. +/// addMD - Attach the metadata of given kind to an Instruction. void MetadataContext::addMD(unsigned MDKind, MDNode *Node, Instruction *Inst) { assert(Node && "Invalid null MDNode"); Inst->HasMetadata = true; @@ -362,7 +362,7 @@ void MetadataContext::copyMD(Instruction *In1, Instruction *In2) { addMD(I->first, MD, In2); } -/// getMD - Get the metadata of given kind attached with an Instruction. +/// getMD - Get the metadata of given kind attached to an Instruction. /// If the metadata is not found then return 0. MDNode *MetadataContext::getMD(unsigned MDKind, const Instruction *Inst) { MDStoreTy::iterator I = MetadataStore.find(Inst); @@ -376,7 +376,7 @@ MDNode *MetadataContext::getMD(unsigned MDKind, const Instruction *Inst) { return NULL; } -/// getMDs - Get the metadata attached with an Instruction. +/// getMDs - Get the metadata attached to an Instruction. const MetadataContext::MDMapTy * MetadataContext::getMDs(const Instruction *Inst) { MDStoreTy::iterator I = MetadataStore.find(Inst); |

