[llvm-commits] [llvm] r84689 - in /llvm/trunk: include/llvm/Metadata.h include/llvm/Support/IRBuilder.h lib/AsmParser/LLParser.cpp lib/VMCore/Metadata.cpp
Devang Patel
dpatel at apple.com
Tue Oct 20 15:50:27 PDT 2009
Author: dpatel
Date: Tue Oct 20 17:50:27 2009
New Revision: 84689
URL: http://llvm.org/viewvc/llvm-project?rev=84689&view=rev
Log:
Cosmetic changes.
s/validName/isValidName/g
s/with an Instruction/to an Instruction/g
s/RegisterMDKind/registerMDKind/g
Modified:
llvm/trunk/include/llvm/Metadata.h
llvm/trunk/include/llvm/Support/IRBuilder.h
llvm/trunk/lib/AsmParser/LLParser.cpp
llvm/trunk/lib/VMCore/Metadata.cpp
Modified: llvm/trunk/include/llvm/Metadata.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Metadata.h?rev=84689&r1=84688&r2=84689&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Metadata.h (original)
+++ llvm/trunk/include/llvm/Metadata.h Tue Oct 20 17:50:27 2009
@@ -295,25 +295,25 @@
StringMap<unsigned> MDHandlerNames;
public:
- /// 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 RegisterMDKind(const char *Name);
+ unsigned registerMDKind(const char *Name);
/// getMDKind - Return metadata kind. If the requested metadata kind
/// is not registered then return 0.
unsigned getMDKind(const char *Name);
- /// validName - Return true if Name is a valid custom metadata handler name.
- bool validName(const char *Name);
+ /// isValidName - Return true if Name is a valid custom metadata handler name.
+ bool isValidName(const char *Name);
- /// 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 *getMD(unsigned Kind, const Instruction *Inst);
- /// getMDs - Get the metadata attached with an Instruction.
+ /// getMDs - Get the metadata attached to an Instruction.
const MDMapTy *getMDs(const Instruction *Inst);
- /// addMD - Attach the metadata of given kind with an Instruction.
+ /// addMD - Attach the metadata of given kind to an Instruction.
void addMD(unsigned Kind, MDNode *Node, Instruction *Inst);
/// removeMD - Remove metadata of given kind attached with an instuction.
Modified: llvm/trunk/include/llvm/Support/IRBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/IRBuilder.h?rev=84689&r1=84688&r2=84689&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/IRBuilder.h (original)
+++ llvm/trunk/include/llvm/Support/IRBuilder.h Tue Oct 20 17:50:27 2009
@@ -139,7 +139,7 @@
if (MDKind == 0)
MDKind = Context.getMetadata().getMDKind("dbg");
if (MDKind == 0)
- MDKind = Context.getMetadata().RegisterMDKind("dbg");
+ MDKind = Context.getMetadata().registerMDKind("dbg");
CurDbgLocation = L;
}
Modified: llvm/trunk/lib/AsmParser/LLParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.cpp?rev=84689&r1=84688&r2=84689&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLParser.cpp (original)
+++ llvm/trunk/lib/AsmParser/LLParser.cpp Tue Oct 20 17:50:27 2009
@@ -1067,7 +1067,7 @@
MetadataContext &TheMetadata = M->getContext().getMetadata();
unsigned MDK = TheMetadata.getMDKind(Name.c_str());
if (!MDK)
- MDK = TheMetadata.RegisterMDKind(Name.c_str());
+ MDK = TheMetadata.registerMDKind(Name.c_str());
MDsOnInst.push_back(std::make_pair(MDK, cast<MDNode>(Node)));
return false;
Modified: llvm/trunk/lib/VMCore/Metadata.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Metadata.cpp?rev=84689&r1=84688&r2=84689&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Metadata.cpp (original)
+++ llvm/trunk/lib/VMCore/Metadata.cpp Tue Oct 20 17:50:27 2009
@@ -245,10 +245,10 @@
// 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 @@
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 @@
/// 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 @@
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 @@
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 @@
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);
More information about the llvm-commits
mailing list